jQuery.cookie=function(b,j,m){if(typeof j!="undefined"){m=m||{};if(j===null){j="";m.expires=-1}var e="";if(m.expires&&(typeof m.expires=="number"||m.expires.toUTCString)){var f;if(typeof m.expires=="number"){f=new Date();f.setTime(f.getTime()+(m.expires*24*60*60*1000))}else{f=m.expires}e="; expires="+f.toUTCString()}var l=m.path?"; path="+(m.path):"";var g=m.domain?"; domain="+(m.domain):"";var a=m.secure?"; secure":"";document.cookie=[b,"=",encodeURIComponent(j),e,l,g,a].join("")}else{var d=null;if(document.cookie&&document.cookie!=""){var k=document.cookie.split(";");for(var h=0;h<k.length;h++){var c=jQuery.trim(k[h]);if(c.substring(0,b.length+1)==(b+"=")){d=decodeURIComponent(c.substring(b.length+1));break}}}return d}};(function(f){f.facebox=function(m,l){f.facebox.loading();if(m.ajax){g(m.ajax)}else{if(m.image){c(m.image)}else{if(m.div){j(m.div)}else{if(f.isFunction(m)){m.call(f)}else{f.facebox.reveal(m,l)}}}}};f.extend(f.facebox,{settings:{opacity:0,overlay:true,loadingImage:"http://mrte.ch/js/facebox/loading.gif",closeImage:"http://mrte.ch/js/facebox/closelabel.gif",imageTypes:["png","jpg","jpeg","gif"],faceboxHtml:'    <div id="facebox" style="display:none;">       <div class="popup">         <table>           <tbody>             <tr>               <td class="tl"/><td class="b"/><td class="tr"/>             </tr>             <tr>               <td class="b"/>               <td class="body">                 <div class="content">                 </div>                 <div class="footer">                   <a href="#" class="close">                     <img src="http://mrte.ch/js/facebox/closelabel.gif" title="close" class="close_image" />                   </a>                 </div>               </td>               <td class="b"/>             </tr>             <tr>               <td class="bl"/><td class="b"/><td class="br"/>             </tr>           </tbody>         </table>       </div>     </div>'},loading:function(){k();if(f("#facebox .loading").length==1){return true}e();f("#facebox .content").empty();f("#facebox .body").children().hide().end().append('<div class="loading"><img src="'+f.facebox.settings.loadingImage+'"/></div>');f("#facebox").css({top:h()[1]+(i()/10),left:385.5}).show();f(document).bind("keydown.facebox",function(l){if(l.keyCode==27){f.facebox.close()}return true});f(document).trigger("loading.facebox")},reveal:function(m,l){f(document).trigger("beforeReveal.facebox");if(l){f("#facebox .content").addClass(l)}f("#facebox .content").append(m);f("#facebox .loading").remove();f("#facebox .body").children().fadeIn("normal");f("#facebox").css("left",f(window).width()/2-(f("#facebox table").width()/2));f(document).trigger("reveal.facebox").trigger("afterReveal.facebox")},close:function(){f(document).trigger("close.facebox");return false}});f.fn.facebox=function(l){k(l);function m(){f.facebox.loading(true);var n=this.rel.match(/facebox\[?\.(\w+)\]?/);if(n){n=n[1]}j(this.href,n);return false}return this.click(m)};function k(n){if(f.facebox.settings.inited){return true}else{f.facebox.settings.inited=true}f(document).trigger("init.facebox");d();var l=f.facebox.settings.imageTypes.join("|");f.facebox.settings.imageTypesRegexp=new RegExp("."+l+"$","i");if(n){f.extend(f.facebox.settings,n)}f("body").append(f.facebox.settings.faceboxHtml);var m=[new Image(),new Image()];m[0].src=f.facebox.settings.closeImage;m[1].src=f.facebox.settings.loadingImage;f("#facebox").find(".b:first, .bl, .br, .tl, .tr").each(function(){m.push(new Image());m.slice(-1).src=f(this).css("background-image").replace(/url\((.+)\)/,"$1")});f("#facebox .close").click(f.facebox.close);f("#facebox .close_image").attr("src",f.facebox.settings.closeImage)}function h(){var m,l;if(self.pageYOffset){l=self.pageYOffset;m=self.pageXOffset}else{if(document.documentElement&&document.documentElement.scrollTop){l=document.documentElement.scrollTop;m=document.documentElement.scrollLeft}else{if(document.body){l=document.body.scrollTop;m=document.body.scrollLeft}}}return new Array(m,l)}function i(){var l;if(self.innerHeight){l=self.innerHeight}else{if(document.documentElement&&document.documentElement.clientHeight){l=document.documentElement.clientHeight}else{if(document.body){l=document.body.clientHeight}}}return l}function d(){var l=f.facebox.settings;l.loadingImage=l.loading_image||l.loadingImage;l.closeImage=l.close_image||l.closeImage;l.imageTypes=l.image_types||l.imageTypes;l.faceboxHtml=l.facebox_html||l.faceboxHtml}function j(m,l){if(m.match(/#/)){var n=window.location.href.split("#")[0];var o=m.replace(n,"");f.facebox.reveal(f(o).clone().show(),l)}else{if(m.match(f.facebox.settings.imageTypesRegexp)){c(m,l)}else{g(m,l)}}}function c(m,l){var n=new Image();n.onload=function(){f.facebox.reveal('<div class="image"><img src="'+n.src+'" /></div>',l)};n.src=m}function g(m,l){f.get(m,function(n){f.facebox.reveal(n,l)})}function b(){return f.facebox.settings.overlay==false||f.facebox.settings.opacity===null}function e(){if(b()){return}if(f("facebox_overlay").length==0){f("body").append('<div id="facebox_overlay" class="facebox_hide"></div>')}f("#facebox_overlay").hide().addClass("facebox_overlayBG").css("opacity",f.facebox.settings.opacity).click(function(){f(document).trigger("close.facebox")}).fadeIn(200);return false}function a(){if(b()){return}f("#facebox_overlay").fadeOut(200,function(){f("#facebox_overlay").removeClass("facebox_overlayBG");f("#facebox_overlay").addClass("facebox_hide");f("#facebox_overlay").remove()});return false}f(document).bind("close.facebox",function(){f(document).unbind("keydown.facebox");f("#facebox").fadeOut(function(){f("#facebox .content").removeClass().addClass("content");a();f("#facebox .loading").remove()})})})(jQuery);(function(a){a.fn.extend({bstip:function(b){var c=a.extend({},a.fn.bstip.defaults,b);return this.each(function(g){var f=a(this).id,k=a(this).attr("title"),e=a(this);var j=e.attr("class"),d=e.attr("rel");e.addClass("souniqueithurts");if(j==""){newclass=""}else{newclass=j;newclass=newclass.replace(/ /,"")}if(f==""){newid=""}else{newid=f}if(d==""){newrel=""}else{newrel=d}if(c.type=="tip"){a("body").append("<div class='"+c.color+"' id='bs"+g+newclass+newid+newrel+"'>"+c.forewrap+k+c.backwrap+"</div>")}else{if(c.type=="menu"){nextitem=a("#"+k);nextcont=nextitem.html();a("body").append("<div class='"+c.color+"' id='bs"+g+newclass+newid+newrel+"'>"+c.forewrap+nextcont+c.backwrap+"</div>");nextitem.remove()}}var h=a("#bs"+g+newclass+newid+newrel);tipwidth=h.width();tipheight=h.height();offset=e.offset();left=offset.left;right=offset.right;nwidth=a(this).width();nheight=a(this).height();if(c.hook=="bottom-right"||c.hook=="mid-right"||c.hook=="top-right"){bleft=offset.left+nwidth+c.xnudge}else{if(c.hook=="bottom-mid"||c.hook=="mid-mid"||c.hook=="top-mid"){bleft=offset.left+(nwidth/2)-(tipwidth/2)+c.xnudge}else{if(c.hook=="bottom-left"||c.hook=="mid-left"||c.hook=="top-left"){bleft=offset.left-c.xnudge-tipwidth}}}if(c.hook=="top-right"||c.hook=="top-mid"||c.hook=="top-left"){btop=offset.top-c.ynudge-tipheight}else{if(c.hook=="mid-right"||c.hook=="mid-mid"||c.hook=="mid-left"){btop=offset.top+c.ynudge}else{if(c.hook=="bottom-right"||c.hook=="bottom-mid"||c.hook=="bottom-left"){btop=offset.top+nheight+c.ynudge}}}h.css({top:btop,left:bleft,position:"absolute",display:"none"});if(c.sticky=="none"){a(this).removeAttr("title").hover(function(){h.css({opacity:c.opacity}).fadeIn(c.speed)},function(){t=setTimeout(function(){h.fadeOut(c.speed)},c.tack)});h.hover(function(){clearTimeout(t)},function(){t=setTimeout(function(){h.fadeOut(c.speed)},c.tack)})}else{if(c.sticky=="move"){a(this).removeAttr("title").mouseover(function(){h.css({opacity:c.opacity,display:"none"}).fadeIn(c.speed)}).mousemove(function(i){tipwidth=h.width();tipheight=h.height();if(c.hook=="bottom-right"||c.hook=="mid-right"||c.hook=="top-right"){bleft=i.pageX+c.xnudge}else{if(c.hook=="bottom-mid"||c.hook=="mid-mid"||c.hook=="top-mid"){bleft=i.pageX-(tipwidth/2)+c.xnudge}else{if(c.hook=="bottom-left"||c.hook=="mid-left"||c.hook=="top-left"){bleft=i.pageX-c.xnudge-tipwidth}}}if(c.hook=="top-right"||c.hook=="top-mid"||c.hook=="top-left"){btop=i.pageY-tipheight-c.ynudge}else{if(c.hook=="mid-right"||c.hook=="mid-mid"||c.hook=="mid-left"){btop=i.pageY-(tipheight/2)+c.ynudge}else{if(c.hook=="bottom-right"||c.hook=="bottom-mid"||c.hook=="bottom-left"){btop=i.pageY+c.ynudge}}}h.css({left:bleft,top:btop})}).mouseout(function(){h.fadeOut(c.speed)})}else{if(c.sticky=="slide"){a(this).removeAttr("title").mouseover(function(){h.css({opacity:c.opacity,display:"none"}).fadeIn(c.speed)}).mousemove(function(i){if(c.hook=="bottom-right"||c.hook=="mid-right"||c.hook=="top-right"){bleft=i.pageX+c.xnudge}else{if(c.hook=="bottom-mid"||c.hook=="mid-mid"||c.hook=="top-mid"){bleft=i.pageX-(tipwidth/2)+c.xnudge}else{if(c.hook=="bottom-left"||c.hook=="mid-left"||c.hook=="top-left"){bleft=i.pageX-c.xnudge-tipwidth}}}if(c.hook=="top-right"||c.hook=="top-mid"||c.hook=="top-left"){btop=top-c.ynudge-tipheight}else{if(c.hook=="mid-right"||c.hook=="mid-mid"||c.hook=="mid-left"){btop=top+c.ynudge}else{if(c.hook=="bottom-right"||c.hook=="bottom-mid"||c.hook=="bottom-left"){btop=top+nheight+c.ynudge}}}h.css({left:bleft,top:btop})}).mouseout(function(){t=setTimeout(function(){h.fadeOut(c.speed)},c.tack)});h.hover(function(){clearTimeout(t)},function(){t=setTimeout(function(){h.fadeOut(c.speed)},c.tack)})}}}})}});a.fn.bstip.defaults={sticky:"move",forewrap:"<p>",backwrap:"</p>",hook:"bottom-right",color:"bstip",speed:"fast",type:"tip",tack:0,keep:2000,ynudge:15,xnudge:15,opacity:0.8}})(jQuery);var focusOnSearch=$.cookie("focusOnSearch");function checkSearchFocus(a){if(a){focusOnSearch=(focusOnSearch=="False")?"True":"False"}if(focusOnSearch!="False"){$("#searchFocus").attr("checked",true);focusOnSearch="True";$("#q_top").focus()}else{$("#searchFocus").attr("checked",false);focusOnSearch="False"}$.cookie("focusOnSearch",focusOnSearch,{path:"/",expires:30})}function searchOptions(){$("#displaySearchFocus").dialog({height:140,modal:true,overlay:{backgroundColor:"#000000",opacity:0.5},closeOnEscape:true})}function mrtechReflow(){var a=$("body").width();if(!$.browser.msie&&a>800){$("a.bstip").bstip({color:"bswrap",forewrap:"<table cellpadding='0' cellspacing='0' style='background: transparent;'><tr><td class='bstip_ul'></td><td class='bstip_u'></td><td class='bstip_ur'></td></tr><tr><td class='bstip_l'></td><td class='bstip_c'>",backwrap:"</td><td class='bstip_r'></td></tr><tr><td class='bstip_bl'></td><td class='bstip_b'></td><td class='bstip_br'></td></tr></table>",hook:"top-right",opacity:0.9})}}function getTweets(){getTwitters("twitter_updates",{id:"mrtech",count:20,timeout:10,enableLinks:true,ignoreReplies:true,clearContents:true,onTimeoutCancel:true,template:'%text% <a href="http://twitter.com/%user_screen_name%/statuses/%id%/">%time%</a>',callback:function(){$("#twitter_update_list li:nth-child(odd)").addClass("odd");$("#twitter_update_list").simpleSpy(12,7000)}})}$(function(){mrtechReflow();$("a[rel*=embed]").live("click",function(a){if(a.button!=0){return true}if(!$.browser.msie){jQuery.facebox({ajax:$(this).attr("href")+"?embed=true"});a.preventDefault();return false}});if(!$.browser.msie){$(window).resize(function(){mrtechReflow()})}else{$(document).addClass("noHtmlOverflow")}$("a[rel*=facebox]").facebox();$('input[type="text"]:not(#noBlur)').addClass("idleField").focus(function(){$(this).removeClass("idleField").addClass("focusField");if(this.value==this.defaultValue){this.value=""}if(this.value!=this.defaultValue){this.select()}}).blur(function(){$(this).removeClass("focusField").addClass("idleField");if($.trim(this.value)==""){this.value=(this.defaultValue?this.defaultValue:"")}});checkSearchFocus(false);$("#blog_results li:nth-child(odd)").addClass("odd")});(function(D){var A="Lite-1.0";D.fn.cycle=function(E){return this.each(function(){E=E||{};if(this.cycleTimeout){clearTimeout(this.cycleTimeout)}this.cycleTimeout=0;this.cyclePause=0;var I=D(this);var J=E.slideExpr?D(E.slideExpr,this):I.children();var G=J.get();if(G.length<2){if(window.console&&window.console.log){window.console.log("terminating; too few slides: "+G.length)}return }var H=D.extend({},D.fn.cycle.defaults,E||{},D.metadata?I.metadata():D.meta?I.data():{});H.before=H.before?[H.before]:[];H.after=H.after?[H.after]:[];H.after.unshift(function(){H.busy=0});var F=this.className;H.width=parseInt((F.match(/w:(\d+)/)||[])[1])||H.width;H.height=parseInt((F.match(/h:(\d+)/)||[])[1])||H.height;H.timeout=parseInt((F.match(/t:(\d+)/)||[])[1])||H.timeout;if(I.css("position")=="static"){I.css("position","relative")}if(H.width){I.width(H.width)}if(H.height&&H.height!="auto"){I.height(H.height)}var K=0;J.css({position:"absolute",top:0,left:0}).hide().each(function(M){D(this).css("z-index",G.length-M)});D(G[K]).css("opacity",1).show();if(D.browser.msie){G[K].style.removeAttribute("filter")}if(H.fit&&H.width){J.width(H.width)}if(H.fit&&H.height&&H.height!="auto"){J.height(H.height)}if(H.pause){I.hover(function(){this.cyclePause=1},function(){this.cyclePause=0})}D.fn.cycle.transitions.fade(I,J,H);J.each(function(){var M=D(this);this.cycleH=(H.fit&&H.height)?H.height:M.height();this.cycleW=(H.fit&&H.width)?H.width:M.width()});J.not(":eq("+K+")").css({opacity:0});if(H.cssFirst){D(J[K]).css(H.cssFirst)}if(H.timeout){if(H.speed.constructor==String){H.speed={slow:600,fast:200}[H.speed]||400}if(!H.sync){H.speed=H.speed/2}while((H.timeout-H.speed)<250){H.timeout+=H.speed}}H.speedIn=H.speed;H.speedOut=H.speed;H.slideCount=G.length;H.currSlide=K;H.nextSlide=1;var L=J[K];if(H.before.length){H.before[0].apply(L,[L,L,H,true])}if(H.after.length>1){H.after[1].apply(L,[L,L,H,true])}if(H.click&&!H.next){H.next=H.click}if(H.next){D(H.next).bind("click",function(){return C(G,H,H.rev?-1:1)})}if(H.prev){D(H.prev).bind("click",function(){return C(G,H,H.rev?1:-1)})}if(H.timeout){this.cycleTimeout=setTimeout(function(){B(G,H,0,!H.rev)},H.timeout+(H.delay||0))}})};function B(J,E,I,K){if(E.busy){return }var H=J[0].parentNode,M=J[E.currSlide],L=J[E.nextSlide];if(H.cycleTimeout===0&&!I){return }if(I||!H.cyclePause){if(E.before.length){D.each(E.before,function(N,O){O.apply(L,[M,L,E,K])})}var F=function(){if(D.browser.msie){this.style.removeAttribute("filter")}D.each(E.after,function(N,O){O.apply(L,[M,L,E,K])})};if(E.nextSlide!=E.currSlide){E.busy=1;D.fn.cycle.custom(M,L,E,F)}var G=(E.nextSlide+1)==J.length;E.nextSlide=G?0:E.nextSlide+1;E.currSlide=G?J.length-1:E.nextSlide-1}if(E.timeout){H.cycleTimeout=setTimeout(function(){B(J,E,0,!E.rev)},E.timeout)}}function C(E,F,I){var H=E[0].parentNode,G=H.cycleTimeout;if(G){clearTimeout(G);H.cycleTimeout=0}F.nextSlide=F.currSlide+I;if(F.nextSlide<0){F.nextSlide=E.length-1}else{if(F.nextSlide>=E.length){F.nextSlide=0}}B(E,F,1,I>=0);return false}D.fn.cycle.custom=function(K,H,I,E){var J=D(K),G=D(H);G.css({opacity:0});var F=function(){G.animate({opacity:1},I.speedIn,I.easeIn,E)};J.animate({opacity:0},I.speedOut,I.easeOut,function(){J.css({display:"none"});if(!I.sync){F()}});if(I.sync){F()}};D.fn.cycle.transitions={fade:function(F,G,E){G.not(":eq(0)").css("opacity",0);E.before.push(function(){D(this).show()})}};D.fn.cycle.ver=function(){return A};D.fn.cycle.defaults={timeout:4000,speed:1000,next:null,prev:null,before:null,after:null,height:"auto",sync:1,fit:0,pause:0,delay:0,slideExpr:null}})(jQuery)