/*Name : TweeCool *version: 1.5 *Description: get the latest tweets from twitter. *Website: www.tweecool.com *Licence: no licence, feel free to do whatever you want. * Author: TweeCool */ (function(a){a.fn.extend({tweecool:function(b){var c={username:"tweecool",limit:5,profile_image:true,show_time:true,show_media:false,show_media_size:"thumb"};var b=a.extend(c,b);function d(h){var k=new Date();var o=Date.parse(k);var p=h*1000;var e=(o-p)/1000;var g=1,i=60,j=60*60,n=60*60*24,f=60*60*24*7,l=60*60*24*30,m=60*60*24*365;if(e>g&&e=i&&e=j&&e=n&&e=f&&e=l&&e").appendTo(i);var f=/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig;var g="";a.getJSON("https://www.api.tweecool.com/?screenname="+h.username+"&count="+h.limit,function(k){if(k.errors||k==null){i.html("No tweets available.");return false}if(h.profile_image){var j=''+h.username+''}else{j=""}a.each(k.tweets,function(l,n){if(h.show_time){var m=d(n.timestamp)}else{var m=""}if(h.show_media&&n.media_url){g=''+h.username+''}else{g=""}e.append("
  • "+j+'
    '+n.text.replace(f,'$1')+g+" "+m+"
  • ")})}).fail(function(k,l,j){i.html("No tweets available")})})}})})(jQuery);