var TabbedContent={init:function(){$(".tab_item").mouseover(function(){var background=$(this).parent().find(".moving_bg");$(background).stop().animate({left:$(this).position()["left"]},{duration:300});TabbedContent.slideContent($(this))})},slideContent:function(obj){var margin=$(obj).parent().parent().find(".slide_content").width();margin=margin*($(obj).prevAll().size()-1);margin=margin*-1;$(obj).parent().parent().find(".tabslider").stop().animate({marginLeft:margin+"px"},{duration:300})}};$(document).ready(function(){TabbedContent.init()});$(document).ready(function(){$("a.switch_fondo").click(function(){$("a.switch_fondo").toggleClass("swap");$("div#page").fadeOut("fast",function(){$(this).fadeIn("fast").toggleClass("white")})});$("#oscuro_blanco_aviso").hover(function(){$(this).fadeOut("fast")});setTimeout(function(){$("#oscuro_blanco_aviso").fadeOut("slow")},3000);$("input[title]").each(function(){if($(this).val()===""){$(this).val($(this).attr("title"))}$(this).focus(function(){if($(this).val()==$(this).attr("title")){$(this).val("").addClass("focused")}});$(this).blur(function(){if($(this).val()===""){$(this).val($(this).attr("title")).removeClass("focused")}})});$("textarea[title]").each(function(){if($(this).val()===""){$(this).val($(this).attr("title"))}$(this).focus(function(){if($(this).val()==$(this).attr("title")){$(this).val("").addClass("focused")}});$(this).blur(function(){if($(this).val()===""){$(this).val($(this).attr("title")).removeClass("focused")}})});$(".slidepanel").click(function(){$("#slidepanel").slideToggle("slow");$(this).toggleClass("slidepanel_active");return false});$(".boxgrid.captionfull").hover(function(){$(".cover",this).stop().animate({top:"100px"},{queue:false,duration:300});$(this).find("img").stop().fadeTo("fast",0.4)},function(){$(".cover",this).stop().animate({top:"160px"},{queue:false,duration:300});$(this).find("img").stop().fadeTo("fast",1)});var $ul=$("ul#post_container");$ul.hover(function(){$("li",$ul).stop().fadeTo("fast",0.5);$("li",$ul).hover(function(){$(this).stop().fadeTo("fast",1)},function(){$(this).stop().fadeTo("fast",0.5)})},function(){$("li",$ul).stop().fadeTo(500,1)});$(".fadethis").append('<span class="hover"></span>').each(function(){var $span=$("> span.hover",this).css("opacity",0);$(this).hover(function(){$span.stop().fadeTo(300,1)},function(){$span.stop().fadeTo(300,0)})});$("#sidebar_portfolio").hover(function(){$(".sidebar_portfolio_slide").stop().animate({marginTop:"-33px"},"fast")},function(){$(".sidebar_portfolio_slide").stop().animate({marginTop:"0px"},"fast")});$(".fadetwitterfooter").append('<span class="hover"></span>').each(function(){var $span=$("> span.hover",this).css("opacity",0);$(this).hover(function(){$span.stop().stop().fadeTo(300,1);$(".footergracias").animate({marginTop:"-108px"},"fast")},function(){$span.stop().stop().fadeTo(300,0);$(".footergracias").animate({marginTop:"0px"},"fast")})});var move=-15;var zoom=1.2;$(".zoom").hover(function(){width=$(".zoom").width()*zoom;height=$(".zoom").height()*zoom;$(this).find("img").stop(false,true).animate({width:width,height:height,top:move,left:move},{duration:200});$(this).find("div.caption").stop(false,true).fadeIn(200)},function(){$(this).find("img").stop(false,true).animate({width:$(".zoom").width(),height:$(".zoom").height(),top:"0",left:"0"},{duration:100});$(this).find("div.caption").stop(false,true).fadeOut(200)});function filterPath(string){return string.replace(/^\//,"").replace(/(index|default).[a-zA-Z]{3,4}$/,"").replace(/\/$/,"")}var locationPath=filterPath(location.pathname);$("a[href*=#]").each(function(){var thisPath=filterPath(this.pathname)||locationPath;if(locationPath==thisPath&&(location.hostname==this.hostname||!this.hostname)&&this.hash.replace(/#/,"")){var $target=$(this.hash),target=this.hash;if(target){var targetOffset=$target.offset().top;$(this).click(function(event){event.preventDefault();$("html, body").animate({scrollTop:targetOffset},1000,function(){location.hash=target})})}}})});jQuery.preloadImages=function(){for(var i=0;i<arguments.length;i++){jQuery("<img>").attr("src",arguments[i])}};