(function(b){b.fn.tabs=function(){return this.each(function(){var a=b(this),c=a.attr("id");b(".section",a).css({position:"absolute",width:"100%"});b(".sections",a).css("height",b("#"+b(".navi li.active a",a).attr("href"),a).outerHeight(!0));b(".navi li a",a).bind(a.data("event")||"click",function(d){if(b(".sections, .sections li",a).is(":animated")||b(this).parent("li").hasClass("active"))return!1;d.preventDefault();var e=b("#"+b(".navi li.active",a).removeClass("active").find("a").attr("href"),a),
g=b("#"+b(this).parent("li").addClass("active").find("a").attr("href"),a);b.cookie(c,g.attr("id"),{path:"/"});switch(a.data("fx")){case "height":b(".sections",a).animate({height:0},{duration:333,easing:"easeInBack",complete:function(){e.hide();g.show();b(this).animate({height:g.outerHeight(!0)},{duration:333,easing:"easeOutCirc"})}});break;case "fade":e.fadeOut(333);g.fadeIn(333);b(".sections",a).animate({height:g.outerHeight(!0)},{duration:300,specialEasing:{opacity:"easeOutQuad",height:"easeOutExpo"}});
break;default:e.hide(),g.show(),b(".sections",a).css("height",g.outerHeight(!0))}});b(".navi li a",a).each(function(){window.location.hash==b(this).attr("href")&&b(this).trigger("click")})})}})(jQuery);
(function(b){b.fn.gridOverlay=function(a){var a=b.extend({columns:12,columnWidth:60,color:"#ccc",opacity:40},a),c=b('<div style="display:none;overflow:hidden;position:absolute;left:0;top:0;width:100%;height:'+(this.height()-40)+'px;z-index: 999;">'),d=b('<div style="position:relative;width:960px;height:100%;margin:0 auto;overflow:hidden;">');b('<a style="position:fixed;top:140px;left:20px;cursor:pointer;padding:5px;background:red;color:#fff;font-weight:bold;z-index:9999;">GRID</a>').appendTo("#page").click(function(){c.toggle()});
for(var e=0;e<a.columns;e++)d.append('<div style="width:'+(e!=0?20:10)+'px;float:left;height:100%;"></div>'),d.append('<div style="width:'+a.columnWidth+"px;height:100%;float:left;background:"+a.color+";opacity:"+a.opacity/100+';"></div>');return this.each(function(){b(this).prepend(c.prepend(d))})}})(jQuery);
(function(b){b.fn.highlightText=function(b,c,d){b=RegExp("(<[^>]*>)|(\\b"+b.replace(/([-.*+?^${}()|[\]\/\\])/g,"\\$1")+")",c?"ig":"g");if(this.length>0)return this.html(this.html().replace(b,function(b,a,c){return b.charAt(0)=="<"?b:'<strong class="'+d+'">'+c+"</strong>"}))}})(jQuery);
(function(b){b.fn.CollapsibleMenu=function(){return this.each(function(){b("li.extends",this).addClass("collapsed");b("li.extends.active, li.extends.active-parent",this).removeClass("collapsed").addClass("expanded");var a=/event-([^\s]+)/.exec(b(this).attr("class"))[1];b('li.extends span.expand, li.extends a[href="#"]',this).bind(a,function(a){a.stopImmediatePropagation();var a=b(this),d=a.nextAll("ul:first"),e=a.parent(),g=a.closest(".collapsible, .accordion"),a=function(a,c){b(a).animate({opacity:c,
height:c,marginTop:c,marginBottom:c,paddingTop:c,paddingBottom:c},{duration:200,step:function(){g.parents("li.block .sections").height(g.height())},complete:function(){e.removeClass("expanded collapsed");d.is("ul:visible")?e.addClass("expanded"):e.addClass("collapsed")}})};if(g.hasClass("collapsible")){if(d[0]===void 0)window.location.href=this.href;a(d,"toggle")}else{context_menu=this.parentNode.parentNode;if(d.is("ul:visible"))return g.hasClass("collapsible")&&a(b("ul:visible",context_menu).first(),
"hide"),!1;d.is("ul:visible")||(a(b("ul:visible",context_menu).first(),"hide"),a(d,"show"))}return!1})})}})(jQuery);(function(b){b.fn.bubble=function(){var a=b('<div class="tip"></div>').appendTo("body"),c;return this.mouseover(function(){c=b(this).attr("title");a.html(c);b(this).attr("title","");a.show()}).mousemove(function(b){a.css({top:b.pageY+22,left:b.pageX+10})}).mouseout(function(){a.hide();b(this).attr("title",c)}).click(function(){a.hide();b(this).attr("title",c)})}})(jQuery);
(function(b){b.fn.clearField=function(a){a=b.extend({blurClass:"clearFieldBlurred",activeClass:"clearFieldActive",attribute:"data-default",value:""},a);return this.each(function(){var c=b(this),d=c.attr(a.attribute),e=!1;a.value=c.val();d==void 0?c.attr(a.attribute,c.val()).addClass(a.blurClass):a.value=d;if(c.is(":password")){var g=b('<input type="text" />').attr("class",c.attr("class")).val(d).addClass("pass-label").hide();c.after(g);e=!0;g.focus(function(){g.hide();c.show().focus()})}c.focus(function(){c.val()==
d&&!c.is(":password")&&c.val("").removeClass(a.blurClass).addClass(a.activeClass);c.attr("name")=="url"&&c.val()==""&&c.val("http://").removeClass(a.blurClass).addClass(a.activeClass)});c.blur(function(){c.val()==""||c.attr("name")=="url"&&c.val()=="http://"?c.is(":password")&&e?(c.hide(),g.show()):c.val(d).removeClass(a.activeClass).addClass(a.blurClass):c.removeClass(a.blurClass).addClass(a.activeClass)});c.blur()})}})(jQuery);
(function(b){b.fn.clearFieldCheck=function(){return this.each(function(){var a=b(this);a.val()==(a.data("default")||"http://")&&a.val("");a.is(":password")&&(a.next(".pass-label").hide(),a.show())})}})(jQuery);
(function(b){b.fn.commentControls=function(){return this.each(function(){var a=b(this);a.delegate("#email","change",function(){b.ajax({url:blog_url,type:"GET",context:this,data:{atom:"get_avatar",email:b(this).val(),name:a.find("#name").val()},success:function(b){b!=""&&a.find(".comment.new .avatar").html(b)}})});a.delegate(".comment-reply","click",function(c){c.preventDefault();var c=b(this).attr("id"),d=c.lastIndexOf("-"),c=c.substr(++d);a.find(".comment.new").hide();a.find("#comment_parent").attr("value",
c);a.find("#cancel-reply").show();a.find(".comment.new").appendTo("#comment-body-"+c).show(0,function(){a.find("#comment").each(function(){if(this.createTextRange){var a=this.createTextRange();a.collapse(!1);a.select()}b(this).focus()})})});a.delegate("#cancel-reply","click",function(c){c.preventDefault();a.find(".comment.new").hide();a.find("#comment_parent").attr("value","0");b(this).hide();a.find(".comment.new").appendTo(a.find("li.new")).show(0,function(){a.find("#comment").each(function(){if(this.createTextRange){var a=
this.createTextRange();a.collapse(!1);a.select()}b(this).focus()})})});a.delegate(".comment-quote","click",function(c){var d=a.find("#comment"),e=b(this).parents(".comment");c.preventDefault();d.clearFieldCheck();jQuery.fn.appendVal=function(b){return this.each(function(){this.value+=b})};d.appendVal('<blockquote>\n<a href="'+b(".comment-id",e).attr("href")+'">\n<strong><em>'+b(".comment-author",e).html()+":</em></strong>\n</a>\n "+function(b,a){var c,d=0,e=0;b+="";a?(a+="",c=a.replace(/([\[\]\(\)\.\?\/\*\{\}\+\$\^\:])/g,
"$1")):c=" \n\r\t\u000c\u000b\u00a0\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u200b\u2028\u2029\u3000";d=b.length;for(e=0;e<d;e++)if(c.indexOf(b.charAt(e))===-1){b=b.substring(e);break}d=b.length;for(e=d-1;e>=0;e--)if(c.indexOf(b.charAt(e))===-1){b=b.substring(0,e+1);break}return c.indexOf(b.charAt(0))===-1?b:""}(function(b,a){a=(((a||"")+"").toLowerCase().match(/<[a-z][a-z0-9]*>/g)||[]).join("");return b.replace(/<\!--[\s\S]*?--\>|<\?(?:php)?[\s\S]*?\?>/gi,"").replace(/<\/?([a-z][a-z0-9]*)\b[^>]*>/gi,
function(b,c){return a.indexOf("<"+c.toLowerCase()+">")>-1?b:""})}(b(".comment-text",e).html(),"<em><strong><i><b><a><code>"))+"\n</blockquote>\n");d.clearFieldCheck();d.focus()});a.delegate("a.vote","click",function(a){a.preventDefault();b.ajax({url:blog_url,type:"GET",context:this,data:{atom:"comment_karma",karma:b(this).data("vote")},success:function(a){var c=b(this).parent().find(".karma");c.html(a);parseInt(a)>0?(c.removeClass("negative"),c.addClass("positive")):parseInt(a)<0&&(c.removeClass("positive"),
c.addClass("negative"));b(this).parent().find("a").remove()}})});a.delegate("a.show","click",function(c){c.preventDefault();b.ajax({url:blog_url,type:"GET",context:this,data:{atom:"get_comment",comment_id:b(this).data("comment")},success:function(c){c=b("<ul />").html(c).find(".comment-body").hide();c=c[0].outerHTML||c.clone().appendTo("<div>").parent().html();b(this).parents(".comment-head").after(c);b("body").hasClass("no-fx")?(b(this).parents("li").find(".comment-body").show(),b(this).parents(".sections").height(a.height()+
15)):b(this).parents("li").find(".comment-body").animate({opacity:"show",height:"show",marginTop:"show",marginBottom:"show",paddingTop:"show",paddingBottom:"show"},{duration:333,complete:function(){b(this).parents(".sections").height(a.height()+15)}});b(this).remove()}})})})}})(jQuery);
(function(b){b.fn.toggleVisibility=function(){return this.live("click",function(){event.preventDefault();var a=b("#"+b(this).data("target"));return b("body").hasClass("no-fx")?b(a).toggle(0):b.support.opacity?b(a).animate({opacity:"toggle",height:"toggle"},333,"easeOutQuart"):b(a).animate({height:"toggle"},333,"easeOutQuart")})}})(jQuery);
(function(b){b.fn.webShots=function(){return this.each(function(a){var c=b(this).attr("title"),d="http://s.wordpress.com/mshots/v1/"+encodeURIComponent(b(this).attr("href"))+"?w=400",e=b('<div class="webshot" id="webshot-'+a+'"><img src="'+d+'" width="400" alt="'+c+'" /></div>').hide().appendTo(document.body);b("body").hasClass("no-fx");return b(this).mouseover(function(){e.show()}).mousemove(function(b){e.css({left:b.pageX+15,top:b.pageY+15})}).mouseout(function(){e.hide()})})}})(jQuery);
(function(b){b.fn.goTopControl=function(){return this.each(function(){var a=b(this);b(window).scroll(function(){b.support.hrefNormalized||a.css({position:"absolute",top:b(window).scrollTop()+b(window).height()-50});b(window).scrollTop()>=500?a.fadeIn(200):a.fadeOut(200)});a.click(function(){b("html, body.browser-chrome").animate({scrollTop:0},"slow");return!1})})}})(jQuery);
(function(b){b.fn.showMoreControl=function(a,c,d){return this.each(function(){var e=b(this);b("a.more",this).click(function(g){g.preventDefault();var g=parseInt(b(this).data("count")),i=b(this);b.ajax({type:"GET",url:blog_url,data:{instance:a,atom:c,offset:g,_ajax_nonce:d},dataType:"json",context:this,beforeSend:function(){b(this).addClass("loading")},complete:function(){b(this).removeClass("loading")},success:function(a){a.output!=""&&(b("body").hasClass("no-fx")?(b(a.output).appendTo(e.find("ul")),
i.parents(".sections").height(e.height())):b(a.output).appendTo(e.find("ul")).hide().each(function(a){b(this).delay(333*a).animate({opacity:"show",height:"show",marginTop:"show",marginBottom:"show",paddingTop:"show",paddingBottom:"show"},{duration:333,step:function(){i.parents(".sections").height(e.height())}})}));i.data("count",a.offset);a.more||i.hide()}})})})}})(jQuery);
(function(b){b.fn.nudgeLinks=function(){return this.each(function(){var a=b(this).data("dir"),c="margin"+a.charAt(0).toUpperCase()+a.slice(1),d=-parseInt(b(this).data("amt"));b("a",this).each(function(){var a=b(this),g=a.css(c),i={},j={};i[c]=d+parseInt(g);j[c]=g;a.hover(function(){a.stop().animate(i,166)},function(){a.stop().animate(j,166)})})})}})(jQuery);
(function(b){b.fn.fadeLinks=function(){return!b.support.opacity||!window.XMLHttpRequest?void 0:this.each(function(){b(this).delegate("a","mouseover",function(){var a=b(this).children("span.hover");a.length===0&&(a=b('<span class="hover"></span>').appendTo(this).css("opacity",0));a.stop().fadeTo(200,1)});b(this).delegate("a","mouseout",function(){b(this).children("span.hover").stop().fadeTo(800,0)})})}})(jQuery);
(function(b){b.fn.imageSlider=function(a){a=b.extend({width:!1,height:!1,squareSize:80,stripeWidth:80,showPager:!0,showArrows:!0,autoplay:!0,transition:"random",delay:10},a);return this.each(function(){a.width=a.width||b(this).width();a.height=a.height||b(this).height();a.squareSize=Math.min(Math.max(a.squareSize,47),188);a.stripeWidth=Math.min(Math.max(a.stripeWidth,30),188);a.delay=parseInt(b(this).data("delay"),10)*1E3||a.delay*1E3;var c=b('<div class="loading"></div>').css({left:a.width/2-80,
top:a.height/2-10}),d=b('<div class="i-controls"></div>'),e=b('<div class="next-slide"></div>'),g=b('<a href="" class="link"></a>').hide().appendTo(d),i=b(this).prepend(e).append(d).prepend(c),j=[],l=0,o=0,k=b(".slide",i).length,f=0,s=null,q=typeof i.data("autoplay")!=="undefined"?i.data("autoplay"):a.autoplay,h=!1,m=Math.ceil(a.height/a.squareSize),r=Math.ceil(a.width/a.squareSize),p=Math.ceil(a.width/a.stripeWidth),y={animationFade:function(b,a,c){e.css({backgroundImage:"url("+j[a].image+")",opacity:0}).animate({opacity:1},
{duration:1333,complete:c,easing:"easeOutSine"})},animationSlideH:function(b,c,d,f){e.css({backgroundImage:"url("+j[c].image+")",left:f?a.width:-a.width}).animate({left:0},{duration:999,complete:d,easing:"easeOutExpo"})},animationSlideV:function(b,c,d,f){e.css({backgroundImage:"url("+j[c].image+")",top:f?a.height:-a.height}).animate({top:0},{duration:999,complete:d,easing:"easeOutExpo"})},animationRandomTiles:function(a,c,d){for(var f=[],a=0;a<m*r-1;++a)f[a]=20*a;for(var g,h,a=f.length;a;g=parseInt(Math.random()*
a),h=f[--a],f[a]=f[g],f[g]=h);b(".square",e).css({backgroundImage:"url("+j[c].image+")",opacity:0}).each(function(a){b(this).stop().delay(f[a]).animate({opacity:1},{duration:999,easing:"easeOutQuad",complete:Math.max.apply(Math,f)!==f[a]||d})})},animationHorizontalTiles:function(a,c,d,f){var g=f?0:m*r-1;b(".square",e).css({backgroundImage:"url("+j[c].image+")",opacity:0}).each(function(a){b(this).stop().delay(30*(f?m*r-a:a)).animate({opacity:1},{duration:666,easing:"easeOutSine",complete:a!==g||d})})},
animationDiagonalTiles:function(c,d,f,g){var h=0,k=g?0:m*r-1;b(".square",e).css({backgroundImage:"url("+j[g?d:c].image+")",opacity:g?0:1});g?n(-20,-20):e.css("background-image","url("+j[d].image+")");i.removeClass("no-overflow");for(c=0;c<m;c++)for(d=0;d<r;d++)b(".square-"+h,e).stop().delay(100*(g?m-c+r-d:d+c)).animate({opacity:g?1:0,left:g?d*a.squareSize:d*a.squareSize-20,top:g?c*a.squareSize:c*a.squareSize-20},{duration:333,complete:h!==k||f}),++h},animationSpiral:function(a,c,d,f){var a=[],g=Math.ceil(m/
2),h,i,k,l=0;for(k=0;k<g;k++){for(h=i=k;h<r-k-1;h++)a[l++]=i*r+h;h=r-k-1;for(i=k;i<m-k-1;i++)a[l++]=i*r+h;i=m-k-1;for(h=r-k-1;h>k;h--)a[l++]=i*r+h;h=k;for(i=m-k-1;i>k;i--)a[l++]=i*r+h}f&&a.reverse();for(var n=0;n<l;n++)b(".square-"+a[n],e).css({backgroundImage:"url("+j[c].image+")",opacity:0}).each(function(){b(this).stop().delay(30*n).animate({opacity:1},{duration:666,easing:"easeOutSine",complete:n!=l-1||d})})},animationRandomStripes:function(a,c,d){for(var a=[],f=0;f<p-1;++f)a[f]=60*f;for(var g,
h,f=a.length;f;g=parseInt(Math.random()*f),h=a[--f],a[f]=a[g],a[g]=h);b(".stripe",e).css({backgroundImage:"url("+j[c].image+")",opacity:0,top:-40});for(f=0;f<p;f++)b(".stripe-"+f,e).stop().delay(a[f]).animate({opacity:1,top:0},{duration:999,specialEasing:{opacity:"easeOutQuad",top:"easeOutElastic"},complete:Math.max.apply(Math,a)!==a[f]||d})},animationStripeWave:function(a,c,d,f){a=f?0:p-1;b(".stripe",e).css({backgroundImage:"url("+j[c].image+")",opacity:0,top:-30});i.removeClass("no-overflow");for(c=
0;c<p;c++)b(".stripe-"+c,e).stop().delay(30*(f?p-c:c)).animate({opacity:1,top:0},{duration:999,specialEasing:{opacity:"easeOutSine",top:"easeOutElastic"},complete:c!==a||d})},animationCurtain:function(c,d,f,g){c=g?0:p-1;b(".stripe",e).css({backgroundImage:"url("+j[d].image+")",opacity:0,height:0,top:-(a.height/2)});i.removeClass("no-overflow");for(d=0;d<p;d++)b(".stripe-"+d,e).stop().delay(70*(g?p-d:d)).animate({opacity:1,height:a.height,top:0},{duration:333,specialEasing:{opacity:"easeInSine",height:"easeOutQuad",
top:"easeOutQuad"},complete:d!==c||f})},animationInterweave:function(c,d,f,g){c=g?0:p-1;b(".stripe",e).css({backgroundImage:"url("+j[d].image+")",opacity:0});b(".stripe:even",e).css("top",-a.height);b(".stripe:odd",e).css("top",a.height);i.removeClass("no-overflow");for(d=0;d<p;d++)b(".stripe-"+d,e).stop().delay(50*(g?p-d:d)).animate({opacity:1,top:0},{duration:666,specialEasing:{opacity:"easeOutSine",top:"easeOutExpo"},complete:d!==c||f})}},A=function(){return e.is(":animated")||b("div",e).is(":animated")||
b(".caption",d).is(":animated")},w=function(a,c){clearTimeout(s);o=l;l=a;i.css("background-image","url("+j[o].image+")");g.hide();b(".pager a",d).removeClass("current");b(".pager a:eq("+l+")",d).addClass("current");t();var f;(j[l].transition!="random"?y["animation"+j[l].transition]:y[function(){var b=0,a,c;for(c in y)Math.random()<1/++b&&(a=c);return a}()])(o,l,function(){i.removeClass("no-overflow").addClass("no-overflow").css("background-image","url("+j[l].image+")");b("div",e).add(e).css("background-image",
"");n(0,0);x();u(l);j[l].link&&g.attr("href",j[l].link).show().trigger("href_updated");q&&v()},c)},v=function(){s=setTimeout(function(){w(typeof j[l+1]=="undefined"?0:l+1)},j[l].delay)},u=function(c){c=b(".caption",d).length===0?b(j[c].caption).appendTo(d):b(".caption",d).replaceAll(b(j[c].caption));c.hasClass("push-left")?c.css("width",0.3*a.width).css({opacity:0,left:-(0.3*a.width)}).stop().show().animate({opacity:1,left:0},{duration:333,easing:"easeOutExpo"}):c.hasClass("push-right")?c.css("width",
0.3*a.width).css({opacity:0,right:-(0.3*a.width)}).stop().show().animate({opacity:1,right:0},{duration:333,easing:"easeOutExpo"}):c.css({opacity:0,bottom:-c.outerHeight()}).stop().show().animate({opacity:1,bottom:0},{duration:333,easing:"easeOutExpo"})},t=function(){var c=b(".caption",d);c.hasClass("push-left")?c.stop().animate({opacity:0,left:-(0.3*a.width)},{duration:333,easing:"easeOutExpo",complete:function(){c.remove()}}):c.hasClass("push-right")?c.stop().animate({right:-(0.3*a.width),opacity:0},
{duration:333,easing:"easeOutExpo",complete:function(){c.remove()}}):c.stop().animate({opacity:0,bottom:-c.outerHeight()},{duration:333,easing:"easeOutExpo",complete:function(){c.remove()}})},n=function(c,d){for(var f=0;f<m;f++)for(var g=0;g<r;g++)b(".square-"+(r*f+g),e).css({backgroundPosition:-g*a.squareSize+"px "+-f*a.squareSize+"px",backgroundRepeat:"no-repeat",position:"absolute",left:g*a.squareSize+c,top:f*a.squareSize+d,opacity:0,width:a.squareSize,height:a.squareSize})},x=function(){for(var c=
0;c<p;c++)b(".stripe-"+c,e).css({backgroundPosition:-c*a.stripeWidth+"px 0",backgroundRepeat:"no-repeat",position:"absolute",left:c*a.stripeWidth,top:0,opacity:0,width:a.stripeWidth,height:a.height})};b(".slide",i).each(function(){var o={delay:parseInt(b(this).data("delay"))*1E3||a.delay,transition:b(this).data("fx")||a.transition,link:b("img:first",this).parent("a").attr("href")||"",image:b("img:first",this).attr("src"),caption:b(".caption",this).clone().wrap("<div></div>").parent().html()};j.push(o);
b("<img>",this).load(function(){++f;if(k===f){i.css("background-image","url("+j[0].image+")").addClass("no-overflow");j[0].link&&g.attr("href",j[0].link).show().trigger("href_updated");b(".slide",i).remove();c.remove();if(i.data("controls")){var o=i.data("controls").replace(/ /g,"").split(",");a.showPager=!!~b.inArray("pager",o);a.showArrows=!!~b.inArray("arrows",o)}a.showArrows&&(b("<a>",{"class":"prev",css:{top:a.height/2-48,opacity:0},click:function(){if(!A()){var b=l-1;typeof j[b]=="undefined"&&
(b=k-1);w(b,!0);return!1}}}).appendTo(d),b("<a>",{"class":"next",css:{top:a.height/2-48,opacity:0},click:function(){if(!A()){var b=l+1;typeof j[b]=="undefined"&&(b=0);w(b);return!1}}}).appendTo(d));if(a.showPager){b("<div>",{"class":"pager",css:{opacity:0}}).appendTo(d);for(o=0;o<k;o++)b(".pager",d).append(b("<a"+(o==0?' class="current"':"")+">"+(o+1)+"</a>"));b(".pager a",d).click(function(){if(b(this).index()==l||A())return!1;clearInterval(s);w(b(this).index(),l>b(this).index());return!1})}d.hover(function(){b(".pager, a.next, a.prev",
d).stop().animate({opacity:1},333);clearInterval(s);q&&(h=!0,q=!1)},function(){b(".pager, a.next, a.prev",d).stop().animate({opacity:0},666);h&&(v(),q=!0)});u(0);for(o=0;o<m*r;o++)e.append(b("<div />").addClass("square square-"+o));n(0,0);for(o=0;o<p;o++)e.append(b("<div />").addClass("stripe stripe-"+o));x();d.fadeIn(333);!(k<2)&&q&&v()}}).attr("src",o.image)})})}})(jQuery);
jQuery.cookie=function(b,a,c){if(typeof a!="undefined"){c=c||{};if(a===null)a="",c.expires=-1;var d="";if(c.expires&&(typeof c.expires=="number"||c.expires.toUTCString))typeof c.expires=="number"?(d=new Date,d.setTime(d.getTime()+c.expires*864E5)):d=c.expires,d="; expires="+d.toUTCString();var e=c.path?"; path="+c.path:"",g=c.domain?"; domain="+c.domain:"",c=c.secure?"; secure":"";document.cookie=[b,"=",encodeURIComponent(a),d,e,g,c].join("")}else{a=null;if(document.cookie&&document.cookie!=""){c=
document.cookie.split(";");for(d=0;d<c.length;d++)if(e=jQuery.trim(c[d]),e.substring(0,b.length+1)==b+"="){a=decodeURIComponent(e.substring(b.length+1));break}}return a}};jQuery.easing.jswing=jQuery.easing.swing;
jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(b,a,c,d,e){return jQuery.easing[jQuery.easing.def](b,a,c,d,e)},easeInQuad:function(b,a,c,d,e){return d*(a/=e)*a+c},easeOutQuad:function(b,a,c,d,e){return-d*(a/=e)*(a-2)+c},easeInOutQuad:function(b,a,c,d,e){return(a/=e/2)<1?d/2*a*a+c:-d/2*(--a*(a-2)-1)+c},easeInCubic:function(b,a,c,d,e){return d*(a/=e)*a*a+c},easeOutCubic:function(b,a,c,d,e){return d*((a=a/e-1)*a*a+1)+c},easeInOutCubic:function(b,a,c,d,e){return(a/=e/2)<1?d/2*a*a*a+c:d/
2*((a-=2)*a*a+2)+c},easeInQuart:function(b,a,c,d,e){return d*(a/=e)*a*a*a+c},easeOutQuart:function(b,a,c,d,e){return-d*((a=a/e-1)*a*a*a-1)+c},easeInOutQuart:function(b,a,c,d,e){return(a/=e/2)<1?d/2*a*a*a*a+c:-d/2*((a-=2)*a*a*a-2)+c},easeInQuint:function(b,a,c,d,e){return d*(a/=e)*a*a*a*a+c},easeOutQuint:function(b,a,c,d,e){return d*((a=a/e-1)*a*a*a*a+1)+c},easeInOutQuint:function(b,a,c,d,e){return(a/=e/2)<1?d/2*a*a*a*a*a+c:d/2*((a-=2)*a*a*a*a+2)+c},easeInSine:function(b,a,c,d,e){return-d*Math.cos(a/
e*(Math.PI/2))+d+c},easeOutSine:function(b,a,c,d,e){return d*Math.sin(a/e*(Math.PI/2))+c},easeInOutSine:function(b,a,c,d,e){return-d/2*(Math.cos(Math.PI*a/e)-1)+c},easeInExpo:function(b,a,c,d,e){return a==0?c:d*Math.pow(2,10*(a/e-1))+c},easeOutExpo:function(b,a,c,d,e){return a==e?c+d:d*(-Math.pow(2,-10*a/e)+1)+c},easeInOutExpo:function(b,a,c,d,e){return a==0?c:a==e?c+d:(a/=e/2)<1?d/2*Math.pow(2,10*(a-1))+c:d/2*(-Math.pow(2,-10*--a)+2)+c},easeInCirc:function(b,a,c,d,e){return-d*(Math.sqrt(1-(a/=e)*
a)-1)+c},easeOutCirc:function(b,a,c,d,e){return d*Math.sqrt(1-(a=a/e-1)*a)+c},easeInOutCirc:function(b,a,c,d,e){return(a/=e/2)<1?-d/2*(Math.sqrt(1-a*a)-1)+c:d/2*(Math.sqrt(1-(a-=2)*a)+1)+c},easeInElastic:function(b,a,c,d,e){var b=1.70158,g=0,i=d;if(a==0)return c;if((a/=e)==1)return c+d;g||(g=e*0.3);i<Math.abs(d)?(i=d,b=g/4):b=g/(2*Math.PI)*Math.asin(d/i);return-(i*Math.pow(2,10*(a-=1))*Math.sin((a*e-b)*2*Math.PI/g))+c},easeOutElastic:function(b,a,c,d,e){var b=1.70158,g=0,i=d;if(a==0)return c;if((a/=
e)==1)return c+d;g||(g=e*0.3);i<Math.abs(d)?(i=d,b=g/4):b=g/(2*Math.PI)*Math.asin(d/i);return i*Math.pow(2,-10*a)*Math.sin((a*e-b)*2*Math.PI/g)+d+c},easeInOutElastic:function(b,a,c,d,e){var b=1.70158,g=0,i=d;if(a==0)return c;if((a/=e/2)==2)return c+d;g||(g=e*0.3*1.5);i<Math.abs(d)?(i=d,b=g/4):b=g/(2*Math.PI)*Math.asin(d/i);return a<1?-0.5*i*Math.pow(2,10*(a-=1))*Math.sin((a*e-b)*2*Math.PI/g)+c:i*Math.pow(2,-10*(a-=1))*Math.sin((a*e-b)*2*Math.PI/g)*0.5+d+c},easeInBack:function(b,a,c,d,e,g){g==void 0&&
(g=1.70158);return d*(a/=e)*a*((g+1)*a-g)+c},easeOutBack:function(b,a,c,d,e,g){g==void 0&&(g=1.70158);return d*((a=a/e-1)*a*((g+1)*a+g)+1)+c},easeInOutBack:function(b,a,c,d,e,g){g==void 0&&(g=1.70158);return(a/=e/2)<1?d/2*a*a*(((g*=1.525)+1)*a-g)+c:d/2*((a-=2)*a*(((g*=1.525)+1)*a+g)+2)+c},easeInBounce:function(b,a,c,d,e){return d-jQuery.easing.easeOutBounce(b,e-a,0,d,e)+c},easeOutBounce:function(b,a,c,d,e){return(a/=e)<1/2.75?d*7.5625*a*a+c:a<2/2.75?d*(7.5625*(a-=1.5/2.75)*a+0.75)+c:a<2.5/2.75?d*
(7.5625*(a-=2.25/2.75)*a+0.9375)+c:d*(7.5625*(a-=2.625/2.75)*a+0.984375)+c},easeInOutBounce:function(b,a,c,d,e){return a<e/2?jQuery.easing.easeInBounce(b,a*2,0,d,e)*0.5+c:jQuery.easing.easeOutBounce(b,a*2-e,0,d,e)*0.5+d*0.5+c}});
(function(b){b.extend(b.fn,{livequery:function(a,c,d){var e=this,g;b.isFunction(a)&&(d=c,c=a,a=void 0);b.each(b.livequery.queries,function(b,j){if(e.selector==j.selector&&e.context==j.context&&a==j.type&&(!c||c.$lqguid==j.fn.$lqguid)&&(!d||d.$lqguid==j.fn2.$lqguid))return(g=j)&&!1});g=g||new b.livequery(this.selector,this.context,a,c,d);g.stopped=!1;g.run();return this},expire:function(a,c,d){var e=this;b.isFunction(a)&&(d=c,c=a,a=void 0);b.each(b.livequery.queries,function(g,i){e.selector==i.selector&&
e.context==i.context&&(!a||a==i.type)&&(!c||c.$lqguid==i.fn.$lqguid)&&(!d||d.$lqguid==i.fn2.$lqguid)&&!this.stopped&&b.livequery.stop(i.id)});return this}});b.livequery=function(a,c,d,e,g){this.selector=a;this.context=c;this.type=d;this.fn=e;this.fn2=g;this.elements=[];this.stopped=!1;this.id=b.livequery.queries.push(this)-1;e.$lqguid=e.$lqguid||b.livequery.guid++;if(g)g.$lqguid=g.$lqguid||b.livequery.guid++;return this};b.livequery.prototype={stop:function(){var b=this;this.type?this.elements.unbind(this.type,
this.fn):this.fn2&&this.elements.each(function(c,d){b.fn2.apply(d)});this.elements=[];this.stopped=!0},run:function(){if(!this.stopped){var a=this,c=this.elements,d=b(this.selector,this.context),e=d.not(c);this.elements=d;this.type?(e.bind(this.type,this.fn),c.length>0&&b.each(c,function(c,e){b.inArray(e,d)<0&&b.event.remove(e,a.type,a.fn)})):(e.each(function(){a.fn.apply(this)}),this.fn2&&c.length>0&&b.each(c,function(c,e){b.inArray(e,d)<0&&a.fn2.apply(e)}))}}};b.extend(b.livequery,{guid:0,queries:[],
queue:[],running:!1,timeout:null,checkQueue:function(){if(b.livequery.running&&b.livequery.queue.length)for(var a=b.livequery.queue.length;a--;)b.livequery.queries[b.livequery.queue.shift()].run()},pause:function(){b.livequery.running=!1},play:function(){b.livequery.running=!0;b.livequery.run()},registerPlugin:function(){b.each(arguments,function(a,c){if(b.fn[c]){var d=b.fn[c];b.fn[c]=function(){var a=d.apply(this,arguments);b.livequery.run();return a}}})},run:function(a){a!=void 0?b.inArray(a,b.livequery.queue)<
0&&b.livequery.queue.push(a):b.each(b.livequery.queries,function(a){b.inArray(a,b.livequery.queue)<0&&b.livequery.queue.push(a)});b.livequery.timeout&&clearTimeout(b.livequery.timeout);b.livequery.timeout=setTimeout(b.livequery.checkQueue,1E3)},stop:function(a){a!=void 0?b.livequery.queries[a].stop():b.each(b.livequery.queries,function(a){b.livequery.queries[a].stop()})}});b.livequery.registerPlugin("append","prepend","after","before","wrap","attr","removeAttr","addClass","removeClass","toggleClass",
"empty","remove","html");b(function(){b.livequery.play()})})(jQuery);
(function(b){b.fn.superfish=function(a){var d=b.fn.superfish,e=d.c,g=b(['<span class="',e.arrowClass,'">&nbsp;</span>'].join("")),i=function(){var a=l(b(this));clearTimeout(a.sfTimer);b(this).showSuperfishUl().siblings().hideSuperfishUl()},j=function(){var a=l(b(this)),c=b(this),e=d.op;clearTimeout(a.sfTimer);a.sfTimer=setTimeout(function(){e.retainPath=b.inArray(c[0],e.path)>-1;c.hideSuperfishUl();e.path.length&&c.parents(["li.",e.hoverClass].join("")).length<1&&i.call(e.path)},e.delay)},l=function(b){b=
b.parents(["ul.",e.menuClass,":first"].join(""))[0];d.op=d.o[b.serial];return b};return this.each(function(){var l=this.serial=d.o.length,k=b.extend({},d.defaults,a);if(b("body").hasClass("no-fx"))k.fx=!1;if(k.fx){if(b(this).hasClass("slide-up"))k.dir="marginBottom";if(b(this).hasClass("slide-left"))k.dir="marginLeft";if(b(this).hasClass("slide-right"))k.dir="marginRight"}k.path=b("li."+k.pathClass,this).slice(0,k.pathLevels).each(function(){b(this).addClass([k.hoverClass,e.bcClass].join(" ")).filter("li:has(ul)").removeClass(k.pathClass)});
d.o[l]=d.op=k;b("li:has(ul)",this).hover(i,j).each(function(){k.autoArrows&&b(">a:first-child",this).addClass(e.anchorClass).append(g.clone())}).not("."+e.bcClass).hideSuperfishUl();var f=b("a",this);f.each(function(b){var a=f.eq(b).parents("li");f.eq(b).focus(function(){i.call(a)}).blur(function(){j.call(a)})})}).each(function(){var a=[e.menuClass];b(this).addClass(a.join(" "))})};var a=b.fn.superfish;a.o=[];a.op={};a.c={bcClass:"breadcrumb",menuClass:"superfish",anchorClass:"has-submenus",arrowClass:"arrow"};
a.defaults={hoverClass:"open",pathClass:"overideThisToUse",pathLevels:1,delay:500,dir:"marginTop",fx:!0,autoArrows:!0};b.fn.extend({hideSuperfishUl:function(){var c=a.op,d=c.retainPath===!0?c.path:"";c.retainPath=!1;d=b(["li.",c.hoverClass].join(""),this).add(this).not(d).removeClass(c.hoverClass).find(">ul");if(c.fx){var e={};e[c.dir]=20;b.support.opacity&&(e.opacity=0);d.stop().animate(e,150,"swing",function(){b(this).css({display:"none"})})}else d.css({display:"none"});return this},showSuperfishUl:function(){var c=
a.op;if(c.fx){var d={},e={};d.display="block";d[c.dir]=20;e[c.dir]=0;if(b.support.opacity)d.opacity=0,e.opacity=1;b(this).addClass(c.hoverClass).find(">ul:hidden").css(d).stop().animate(e,150,"swing")}else b(this).addClass(c.hoverClass).find(">ul:hidden").css({display:"block"});return this}})})(jQuery);
(function(b){var a,c,d,e,g,i,j,l,o,k=0,f={},s=[],q=0,h={},m=[],r=null,p=new Image,y=/\.(jpg|gif|png|bmp|jpeg)(.*)?$/i,A=/[^\.]\.(swf)\s*$/i,w=0,v="",u,t,n=!1,x=b.extend(b("<div/>")[0],{prop:0}),C=function(){c.hide();p.onerror=p.onload=null;r&&r.abort();a.empty()},D=function(){!1===f.onError(s,k,f)?(c.hide(),n=!1):(f.titleShow=!1,f.width="auto",f.height="auto",a.html('<p id="fb-error">The requested content cannot be loaded.<br />Please try again later.</p>'),z())},B=function(){var d=s[k],e,g,h,j,l,
m;C();f=b.extend({},b.fn.fancybox.defaults,typeof b(d).data("fancybox")=="undefined"?f:b(d).data("fancybox"));m=f.onStart(s,k,f);if(m===!1)n=!1;else{typeof m=="object"&&(f=b.extend(f,m));h=f.title||(d.nodeName?b(d).attr("title"):d.title)||"";if(d.nodeName&&!f.orig)f.orig=b(d).children("img:first").length?b(d).children("img:first"):b(d);h===""&&f.orig&&f.titleFromAlt&&(h=f.orig.attr("alt"));e=f.href||(d.nodeName?b(d).attr("href"):d.href)||null;if(/^(?:javascript)/i.test(e)||e=="#")e=null;if(f.type){if(g=
f.type,!e)e=f.content}else f.content?g="html":e&&(g=e.match(y)?"image":e.match(A)?"swf":e.indexOf("#")===0?"inline":"ajax");if(g){g=="inline"&&(d=e.substr(e.indexOf("#")),g=b(d).length>0?"inline":"ajax");f.type=g;f.href=e;f.title=h;if(f.autoDimensions)f.type=="html"||f.type=="inline"||f.type=="ajax"?(f.width="auto",f.height="auto"):f.autoDimensions=!1;if(f.modal)f.overlayShow=!0,f.hideOnOverlayClick=!1,f.hideOnContentClick=!1,f.enableEscapeButton=!1;f.padding=parseInt(f.padding,10);f.margin=parseInt(f.margin,
10);a.css("padding",f.padding+f.margin);b(".fb-inline-tmp").unbind("fb-cancel").bind("fb-change",function(){b(this).replaceWith(i.children())});switch(g){case "html":a.html(f.content);z();break;case "inline":if(b(d).parent().is("#fb-content")===!0){n=!1;break}b('<div class="fb-inline-tmp" />').hide().insertBefore(b(d)).bind("fb-cleanup",function(){b(this).replaceWith(i.children())}).bind("fb-cancel",function(){b(this).replaceWith(a.children())});b(d).appendTo(a);z();break;case "image":n=!1;c.show();
p=new Image;p.onerror=function(){D()};p.onload=function(){n=!0;p.onerror=p.onload=null;f.width=p.width;f.height=p.height;b("<img />").attr({id:"fb-img",src:p.src,alt:f.title}).appendTo(a);I()};p.src=e;break;case "swf":f.scrolling="no";j='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+f.width+'" height="'+f.height+'"><param name="movie" value="'+e+'"></param>';l="";b.each(f.swf,function(b,a){j+='<param name="'+b+'" value="'+a+'"></param>';l+=" "+b+'="'+a+'"'});j+='<embed src="'+
e+'" type="application/x-shockwave-flash" width="'+f.width+'" height="'+f.height+'"'+l+"></embed></object>";a.html(j);z();break;case "ajax":n=!1,c.show(),f.ajax.win=f.ajax.success,r=b.ajax(b.extend({},f.ajax,{url:e,data:f.ajax.data||{},error:function(b){b.status>0&&D()},success:function(b,d,g){if((typeof g=="object"?g:r).status==200){if(typeof f.ajax.win=="function")if(m=f.ajax.win(e,b,d,g),m===!1){c.hide();return}else if(typeof m=="string"||typeof m=="object")b=m;a.html(b);z()}}}))}}else D()}},z=
function(){var c=f.width,d=f.height,c=c.toString().indexOf("%")>-1?parseInt((b(window).width()-f.margin*2)*parseFloat(c)/100,10)+"px":c=="auto"?"auto":c+"px",d=d.toString().indexOf("%")>-1?parseInt((b(window).height()-f.margin*2)*parseFloat(d)/100,10)+"px":d=="auto"?"auto":d+"px";a.wrapInner('<div style="width:'+c+";height:"+d+";overflow: "+(f.scrolling=="auto"?"auto":f.scrolling=="yes"?"scroll":"hidden")+';position:relative;"></div>');f.width=a.width();f.height=a.height();I()},I=function(){var H,
J;c.hide();if(e.is(":visible")&&!1===h.onCleanup(m,q,h))b.event.trigger("fb-cancel"),n=!1;else{n=!0;b(i.add(d)).unbind();b(window).unbind("resize.fb scroll.fb");b(document).unbind("keydown.fb");e.is(":visible")&&e.css("height",e.height());m=s;q=k;h=f;h.overlayShow?(d.css({opacity:h.overlayOpacity,cursor:h.hideOnOverlayClick?"pointer":"auto",height:b(document).height()}),d.is(":visible")||d.show()):d.hide();t=M();v=h.title||"";w=0;j.empty().removeAttr("style").removeClass();if(h.titleShow!==!1&&(v=
b.isFunction(h.titleFormat)?h.titleFormat(v,m,q,h):v&&v.length?v:!1)&&v!=="")j.html(v).appendTo("body").show(),j.css({width:t.width-h.padding*2,marginLeft:h.padding,marginRight:h.padding}),w=j.outerHeight(!0),j.appendTo(g),t.height+=w;j.hide();if(e.is(":visible"))b(l.add(o)).hide(),H=e.position(),u={top:H.top,left:H.left,width:e.width(),height:e.height()},J=u.width==t.width&&u.height==t.height,i.fadeTo(h.changeFade,0.3,function(){var c=function(){i.html(a.contents()).fadeTo(h.changeFade,1,E)};b.event.trigger("fb-change");
i.empty().removeAttr("filter").css({"border-width":h.padding,width:t.width-h.padding*2,height:f.autoDimensions?"auto":t.height-w-h.padding*2});J?c():(x.prop=0,b(x).animate({prop:1},{duration:h.changeSpeed,easing:h.easingChange,step:F,complete:c}))});else if(e.removeAttr("style"),i.css("border-width",h.padding),h.transitionIn=="elastic"){u=K();i.html(a.contents());e.show();if(h.opacity)t.opacity=0;x.prop=0;b(x).animate({prop:1},{duration:h.speedIn,easing:h.easingIn,step:F,complete:E})}else w>0&&j.show(),
i.css({width:t.width-h.padding*2,height:f.autoDimensions?"auto":t.height-w-h.padding*2}).html(a.contents()),e.css(t).fadeIn(h.transitionIn=="none"?0:h.speedIn,E)}},L=function(){(h.enableEscapeButton||h.enableKeyboardNav)&&b(document).bind("keydown.fb",function(a){if(a.keyCode==27&&h.enableEscapeButton)a.preventDefault(),b.fancybox.close();else if((a.keyCode==37||a.keyCode==39)&&h.enableKeyboardNav&&a.target.tagName!=="INPUT"&&a.target.tagName!=="TEXTAREA"&&a.target.tagName!=="SELECT")a.preventDefault(),
b.fancybox[a.keyCode==37?"prev":"next"]()});if(h.showNavArrows){if(h.cyclic&&m.length>1||q!==0)b("a",l).css("top",e.height()/2-b("a",l).height()/2),l.show();if(h.cyclic&&m.length>1||q!=m.length-1)b("a",o).css("top",e.height()/2-b("a",l).height()/2),o.show()}else l.hide(),o.hide()},E=function(){b.support.opacity||(i.get(0).style.removeAttribute("filter"),e.get(0).style.removeAttribute("filter"));f.autoDimensions&&i.css("height","auto");e.css("height","auto");v&&v.length&&j.show();L();h.hideOnContentClick&&
i.bind("click",b.fancybox.close);h.hideOnOverlayClick&&d.bind("click",b.fancybox.close);b(window).bind("resize.fb",b.fancybox.resize);h.centerOnScroll&&b(window).bind("scroll.fb",b.fancybox.center);e.show();n=!1;b.fancybox.center();h.onComplete(m,q,h);var a,c;if(m.length-1>q&&(a=m[q+1].href,typeof a!=="undefined"&&a.match(y)))c=new Image,c.src=a;if(q>0&&(a=m[q-1].href,typeof a!=="undefined"&&a.match(y)))c=new Image,c.src=a},F=function(b){var a={width:parseInt(u.width+(t.width-u.width)*b,10),height:parseInt(u.height+
(t.height-u.height)*b,10),top:parseInt(u.top+(t.top-u.top)*b,10),left:parseInt(u.left+(t.left-u.left)*b,10)};if(typeof t.opacity!=="undefined")a.opacity=b<0.5?0.5:b;e.css(a);i.css({width:a.width-h.padding*2,height:a.height-w*b-h.padding*2})},G=function(){return[b(window).width()-h.margin*2,b(window).height()-h.margin*2,b(document).scrollLeft()+h.margin,b(document).scrollTop()+h.margin]},M=function(){var b=G(),a={},c=h.autoScale,d=h.padding*2;a.width=h.width.toString().indexOf("%")>-1?parseInt(b[0]*
parseFloat(h.width)/100,10):h.width+d;a.height=h.height.toString().indexOf("%")>-1?parseInt(b[1]*parseFloat(h.height)/100,10):h.height+d;if(c&&(a.width>b[0]||a.height>b[1]))if(f.type=="image"||f.type=="swf"){c=h.width/h.height;if(a.width>b[0])a.width=b[0],a.height=parseInt((a.width-d)/c+d,10);if(a.height>b[1])a.height=b[1],a.width=parseInt((a.height-d)*c+d,10)}else a.width=Math.min(a.width,b[0]),a.height=Math.min(a.height,b[1]);a.top=parseInt(Math.max(b[3]-20,b[3]+(b[1]-a.height-40)*0.5),10);a.left=
parseInt(Math.max(b[2]-20,b[2]+(b[0]-a.width-40)*0.5),10);return a},K=function(){var a=f.orig?b(f.orig):!1,c={};a&&a.length?(c=a.offset(),c.top+=parseInt(a.css("paddingTop"),10)||0,c.left+=parseInt(a.css("paddingLeft"),10)||0,c.top+=parseInt(a.css("border-top-width"),10)||0,c.left+=parseInt(a.css("border-left-width"),10)||0,c.width=a.width(),c.height=a.height(),c={width:c.width+h.padding*2,height:c.height+h.padding*2,top:c.top-h.padding-20,left:c.left-h.padding-20}):(a=G(),c={width:h.padding*2,height:h.padding*
2,top:parseInt(a[3]+a[1]*0.5,10),left:parseInt(a[2]+a[0]*0.5,10)});return c};b.fn.fancybox=function(a){if(!b(this).length)return this;b(this).data("fancybox",b.extend({},a,b.metadata?b(this).metadata():{})).unbind("click.fb").bind("click.fb",function(a){a.preventDefault();n||(n=!0,b(this).blur(),s=[],k=0,a=b(this).attr("rel")||"",!a||a==""||a==="nofollow"?s.push(this):(s=b("a[rel="+a+"], area[rel="+a+"]"),k=s.index(this)),B())});return this};b.fancybox=function(a,c){var d;if(!n){n=!0;d=typeof c!==
"undefined"?c:{};s=[];k=parseInt(d.index,10)||0;if(b.isArray(a)){for(var e=0,f=a.length;e<f;e++)typeof a[e]=="object"?b(a[e]).data("fancybox",b.extend({},d,a[e])):a[e]=b({}).data("fancybox",b.extend({content:a[e]},d));s=jQuery.merge(s,a)}else typeof a=="object"?b(a).data("fancybox",b.extend({},d,a)):a=b({}).data("fancybox",b.extend({content:a},d)),s.push(a);if(k>s.length||k<0)k=0;B()}};b.fancybox.next=function(){return b.fancybox.pos(q+1)};b.fancybox.prev=function(){return b.fancybox.pos(q-1)};b.fancybox.pos=
function(a){n||(a=parseInt(a),s=m,a>-1&&a<m.length?(k=a,B()):h.cyclic&&m.length>1&&(k=a>=m.length?0:m.length-1,B()))};b.fancybox.cancel=function(){n||(n=!0,b.event.trigger("fb-cancel"),C(),f.onCancel(s,k,f),n=!1)};b.fancybox.close=function(){function a(){d.fadeOut("fast");j.empty().hide();e.hide();b.event.trigger("fb-cleanup");i.empty();h.onClosed(m,q,h);m=f=[];q=k=0;h=f={};n=!1}if(!n&&!e.is(":hidden"))if(n=!0,h&&!1===h.onCleanup(m,q,h))n=!1;else if(C(),b(l.add(o)).hide(),b(i.add(d)).unbind(),b(window).unbind("resize.fb scroll.fb"),
b(document).unbind("keydown.fb"),i.find("iframe").attr("src","about:blank"),e.stop(),h.transitionOut=="elastic"){u=K();var c=e.position();t={top:c.top,left:c.left,width:e.width(),height:e.height()};if(h.opacity)t.opacity=1;j.empty().hide();x.prop=1;b(x).animate({prop:0},{duration:h.speedOut,easing:h.easingOut,step:F,complete:a})}else e.fadeOut(h.transitionOut=="none"?0:h.speedOut,a)};b.fancybox.resize=function(){d.is(":visible")&&d.css("height",b(document).height());b.fancybox.center(!0)};b.fancybox.center=
function(a){var b,c;if(!n&&(c=a===!0?1:0,b=G(),c||!(e.width()>b[0]||e.height()>b[1])))e.stop().animate({top:parseInt(Math.max(b[3]-20,b[3]+(b[1]-i.height()-40)*0.5-h.padding)),left:parseInt(Math.max(b[2]-20,b[2]+(b[0]-i.width()-40)*0.5-h.padding))},typeof a=="number"?a:200)};b.fancybox.init=function(){b("#fb-wrap").length||(b("body").append(a=b('<div id="fb-tmp"></div>'),c=b('<div id="fb-loading"></div>'),d=b('<div id="fb-overlay"></div>'),e=b('<div id="fb-wrap"></div>')),g=b('<div id="fb-outer"></div>').appendTo(e),
g.append(i=b('<div id="fb-content"></div>'),j=b('<div id="fb-title"></div>'),l=b('<div id="fb-left"><a>prev</a></<div'),o=b('<div id="fb-right"><a>next</a></<div')),c.click(b.fancybox.cancel),b("a",l).click(function(a){a.preventDefault();b.fancybox.prev()}),b("a",o).click(function(a){a.preventDefault();b.fancybox.next()}),b.fn.mousewheel&&e.bind("mousewheel.fb",function(a,c){if(n)a.preventDefault();else if(b(a.target).get(0).clientHeight==0||b(a.target).get(0).scrollHeight===b(a.target).get(0).clientHeight)a.preventDefault(),
b.fancybox[c>0?"prev":"next"]()}),b.support.opacity||e.addClass("fb-ie"))};b.fn.fancybox.defaults={padding:10,margin:40,opacity:!1,modal:!1,cyclic:!1,scrolling:"auto",width:560,height:340,autoScale:!0,autoDimensions:!0,centerOnScroll:!0,ajax:{},swf:{wmode:"transparent"},hideOnOverlayClick:!0,hideOnContentClick:!1,overlayShow:!0,overlayOpacity:0.5,titleShow:!0,titleFormat:null,titleFromAlt:!1,transitionIn:"elastic",transitionOut:"elastic",speedIn:300,speedOut:300,changeSpeed:300,changeFade:"fast",
easingIn:"easeOutBack",easingOut:"easeInBack",showNavArrows:!0,enableEscapeButton:!0,enableKeyboardNav:!0,onStart:function(){},onCancel:function(){},onComplete:function(){},onCleanup:function(){},onClosed:function(){},onError:function(){}};b(document).ready(function(){b.fancybox.init()})})(jQuery);
