(function(b){b.fn.tweetable=function(a){var d={limit:5,username:"philipbeel",time:false,replies:false,position:"append"};var a=b.extend(d,a);return this.each(function(o){var p=b(this);var c;var k="";var n=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];var m="http://api.twitter.com/1/statuses/user_timeline.json?screen_name=";var l="&count=";b.getJSON(m+d.username+l+d.limit+"&callback=?",p,function(e){b.each(e,function(f,h){if(f==0){c=b('<ul class="tweetList">')[d.position.toLowerCase()+"To"](p)}if(d.replies===false){if(h.in_reply_to_status_id===null){c.append('<li class="tweet_content_'+f+'"><p class="tweet_link_'+f+'">'+h.text.replace(/#(.*?)(\s|$)/g,'<span class="hash">#$1 </span>').replace(/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig,'<a href="$&">$&</a> ').replace(/@(.*?)(\s|\(|\)|$)/g,'<a href="http://twitter.com/$1">@$1 </a>$2')+"</p></li>")}}else{c.append('<li class="tweet_content_'+f+'"><p class="tweet_link_'+f+'">'+h.text.replace(/#(.*?)(\s|$)/g,'<span class="hash">#$1 </span>').replace(/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig,'<a href="$&">$&</a> ').replace(/@(.*?)(\s|\(|\)|$)/g,'<a href="http://twitter.com/$1">@$1 </a>$2')+"</p></li>")}if(d.time==true){for(var g=0;g<=12;g++){if(n[g]==h.created_at.substr(4,3)){k=g+1;if(k<10){k="0"+k}}}b(".tweet_link_"+f).append("<small> "+h.created_at.substr(8,2)+"/"+k+"/"+h.created_at.substr(26,4)+" "+h.created_at.substr(11,8)+"</small>")}})})})}})(jQuery);$(window).load(function(){if($.browser.msie&&$.browser.version>8||$.browser.mozilla&&$.browser.version>="1.9"||$.browser.webkit||$.browser.opera){$(".grises img").animate({opacity:1},500);$(".grises img").each(function(){var a=$(this);a.css({position:"absolute"}).wrap("<div class='img_wrapper' style='display: inline-block'>").clone().addClass("img_grayscale").css({position:"absolute","z-index":"998",opacity:"0"}).insertBefore(a).queue(function(){var b=$(this);b.parent().css({width:this.width,height:this.height});b.dequeue()});this.src=grayscale(this.src)});$(".grises img").mouseover(function(){$(this).parent().find("img:first").stop().animate({opacity:1},1000)});$(".img_grayscale").mouseout(function(){$(this).stop().animate({opacity:0},1000)})}$(".tips a[title]").tooltip({offset:[10,2],effect:"slide"}).dynamic({bottom:{direction:"down",bounce:true}});$("img[rel]").overlay({top:150})});function grayscale(a){var c=document.createElement("canvas");var j=c.getContext("2d");var d=new Image();d.src=a;c.width=d.width;c.height=d.height;j.drawImage(d,0,0);var b=j.getImageData(0,0,c.width,c.height);for(var g=0;g<b.height;g++){for(var h=0;h<b.width;h++){var e=(g*4)*b.width+h*4;var f=(b.data[e]+b.data[e+1]+b.data[e+2])/3;b.data[e]=f;b.data[e+1]=f;b.data[e+2]=f}}j.putImageData(b,0,0,0,0,b.width,b.height);return c.toDataURL()}$(document).ready(function(){$("#scroll").scrollable({circular:true,mousewheel:false});$.tools.validator.localize("es",{"*":"Por favor ingrese un valor",":email":"Por favor ingrese un email válido","[required]":"Este campo es requerido"});$("#frm-contacto").validator({lang:"es"});$("#ie div a.closePanel").click(function(){$("#ie").slideToggle("slow");return false})});
