var SearchText="Search Karel Donk’s Blog";function Main(){var a=["#FBButton","#LIButton","#BlogButton"];for(x=0;x<a.length;x++){var b=$(a[x]);b.animate({opacity:0.5});$("h3",b).animate({opacity:0.5});b.hover(function(){$(this).stop().animate({opacity:1})},function(){$(this).stop().animate({opacity:0.5})});b.click(function(){window.location.href=$("a",this).attr("href")})}$("#FooterText").animate({opacity:0.5});$("#FooterText").hover(function(){$(this).stop().animate({opacity:1})},function(){$(this).stop().animate({opacity:0.5})});$("#SubMenuItemsContainer").animate({opacity:0.70});$("#SubMenuItemsContainer").hover(function(){$(this).stop().animate({opacity:1})},function(){$(this).stop().animate({opacity:0.70})});var c=$("#SubMenuItemsContainer");var d=$("a",c);for(x=0;x<d.length;x++){$(d[x]).hover(function(){$(this).stop().animate({borderTopColor:'#ff9100',borderLeftColor:'#ff9100',borderRightColor:'#ff9100',borderBottomColor:'#ff9100',backgroundColor:'#a55e00',color:'#fff'})},function(){$(this).stop().animate({borderTopColor:'#000',borderLeftColor:'#000',borderRightColor:'#000',borderBottomColor:'#000',backgroundColor:'#000',color:'#FFF'})})}var e=$(".Reply");for(x=0;x<e.length;x++){var d=$("a",e[x]);if(d.length==0)$(e[x]).css("height","0px")}$("#submit").hover(function(){$(this).stop().css("backgroundColor","#333");$(this).stop().animate({backgroundColor:"#ff9100",color:"#ffffff"})},function(){$(this).stop().animate({backgroundColor:"#333",color:"#ffffff"})});SetupSearchBox();PageLinks();CommentPermalinks();PreloadImages();Cufon.replace('h1',{hover:'true'});Cufon.replace('h2',{hover:'true'});Cufon.replace('h3',{hover:'true'});Cufon.replace('#SubMenuItemsContainer',{hover:'true'});Cufon.replace('.Navigation',{hover:'true'});Cufon.replace('.CommentAuthor',{hover:'true'});Cufon.replace('label',{hover:'true'});Cufon.replace('.RandomQuoteContainer',{hover:'true'});Cufon.now();$("#SubMenuContainer").height(95+($("#PageHeader").height()-67))}function SetupSearchBox(){$("#s","#SearchBox").focus(function(){$("#SearchBox").css("backgroundImage","url("+MainSiteUrl+"/images/searchb2.png)");if($("#s","#SearchBox").attr("value")==SearchText){$("#s","#SearchBox").attr("value","")}});$("#s","#SearchBox").blur(function(){$("#SearchBox").css("backgroundImage","url("+MainSiteUrl+"/images/searchb1.png)");if($("#s","#SearchBox").attr("value")==""){$("#s","#SearchBox").attr("value",SearchText)}});$("#SearchBox").click(function(a){elem=a.target||a.srcElement;if(elem.tagName.toLowerCase()!="input"){$("#s","#SearchBox").focus();if($("#s","#SearchBox").attr("value")!=""&&$("#s","#SearchBox").attr("value")!=SearchText){$("#searchform").submit()}}});$("#searchform").submit(function(){if($("#s","#SearchBox").attr("value")==""||$("#s","#SearchBox").attr("value")==SearchText){return false}return true})}function PageLinks(){var a=$(".PostMetaData");var x=0;for(x=0;x<a.length;x++){AnimateLinks(a[x],'#ffffff','#ff9100','#ff9100','#fffffff')}a=$(".PostMetaDataSingle");for(x=0;x<a.length;x++){AnimateLinks(a[x],'#ffffff','#ff9100','#ff9100','#fffffff')}a=$(".PostMetaDataFull");for(x=0;x<a.length;x++){AnimateLinks(a[x],'#f8f8f8','#ff9100','#ff9100','#fffffff')}a=$(".PostContent");for(x=0;x<a.length;x++){AnimateLinks(a[x],'#ffffff','#ff9100','#ff9100','#fffffff')}a=$(".CommentBody");for(x=0;x<a.length;x++){AnimateLinks(a[x],'#ffffff','#ff9100','#ff9100','#fffffff')}a=$(".Pingback");for(x=0;x<a.length;x++){AnimateLinks(a[x],'#fcfcfc','#ff9100','#ff9100','#fffffff')}a=$(".CommentMetaData");for(x=0;x<a.length;x++){AnimateLinks(a[x],'#ffffff','#ff9100','#ff9100','#fffffff')}a=$("#FooterText");for(x=0;x<a.length;x++){AnimateLinks(a[x],'#252525','#ff9100','#ff9100','#fffffff')}a=$(".Reply");for(x=0;x<a.length;x++){AnimateLinks2(a[x],'#cacaca','#ffffff','#ff9100','#fffffff',false)}a=$(".Navigation");for(x=0;x<a.length;x++){AnimateLinks(a[x],'#ddd','#333','#f8f8f8','#333')}a=$(".WidgetContainer");for(x=0;x<a.length;x++){AnimateLinksBorder(a[x],'#ffffff','#6a6a6a','#ff9100','#000')}}function AnimateLinks(a,b,c,d,e){AnimateLinks2(a,b,c,d,e,true)}function AnimateLinks2(a,b,c,d,e,f){var g=$("a",a);var x=0;for(x=0;x<g.length;x++){var h=$("img",g[x]);if(h.length==0||(h.length>0&&!($(g[x]).html().substr(0,1)=="<"&&$(g[x]).html().substr($(g[x]).html().length-1,1)==">"))){if($(g[x]).html()==''){$(g[x]).css("display","none")}else{if(f){$(g[x]).hover(function(){$(this).stop().css("backgroundColor",b);$(this).stop().animate({backgroundColor:d,color:e})},function(){$(this).stop().animate({backgroundColor:b,color:c},500,function(){$(this).css("backgroundColor","transparent")})})}else{$(g[x]).hover(function(){$(this).stop().css("backgroundColor",b);$(this).stop().animate({backgroundColor:d,color:e})},function(){$(this).stop().animate({backgroundColor:b,color:c})})}}}}}function AnimateLinksBorder(a,b,c,d,e){var f=$("a",a);var x=0;for(x=0;x<f.length;x++){var g=$("img",f[x]);if(g.length==0||(g.length>0&&!($(f[x]).html().substr(0,1)=="<"&&$(f[x]).html().substr($(f[x]).html().length-1,1)==">"))){$(f[x]).hover(function(){$(this).stop().css("borderBottomColor",b);$(this).stop().animate({borderBottomColor:d,color:e})},function(){$(this).stop().animate({borderBottomColor:b,color:c},500,function(){$(this).css("borderBottomColor","transparent")})})}}}function PreloadImages(){preloads="searchb1.png,searchb2.png".split(",");var a=[];for(var x=0;x<preloads.length;x++){a[x]=new Image();a[x].src=MainSiteUrl+"/images/"+preloads[x]}}function CommentPermalinks(){var a=$(".Permalink");for(x=0;x<a.length;x++){a.hover(function(){$(this).stop().animate({opacity:1})},function(){$(this).stop().animate({opacity:0.5})})}}
