/*ColorBox*/

(function(z,L){var A={transition:"elastic",speed:300,width:false,initialWidth:"600",innerWidth:false,maxWidth:false,height:false,initialHeight:"450",innerHeight:false,maxHeight:false,scalePhotos:true,scrolling:true,inline:false,html:false,iframe:false,photo:false,href:false,title:false,rel:false,opacity:0.9,preloading:true,current:"image {current} of {total}",previous:"previous",next:"next",close:"close",open:false,loop:true,slideshow:false,slideshowAuto:true,slideshowSpeed:2500,slideshowStart:"start slideshow",slideshowStop:"stop slideshow",onOpen:false,onLoad:false,onComplete:false,onCleanup:false,onClosed:false,overlayClose:true,escKey:true,arrowKey:true},t="colorbox",I="cbox",K=I+"_open",e=I+"_load",J=I+"_complete",q=I+"_cleanup",Q=I+"_closed",r=z.browser.msie&&!z.support.opacity,T=r&&z.browser.version<7,P=I+"_IE6",G,U,V,d,x,m,b,F,c,O,C,i,g,l,p,M,o,H,u,W,k,h,a,s,j,y,R,w,N,B,n=I+"Element";function E(Y,X){Y=Y?' id="'+I+Y+'"':"";X=X?' style="'+X+'"':"";return z("<div"+Y+X+"/>")}function D(X,Y){Y=Y==="x"?O.width():O.height();return(typeof X==="string")?Math.round((X.match(/%/)?(Y/100)*parseInt(X,10):parseInt(X,10))):X}function v(X){X=z.isFunction(X)?X.call(s):X;return R.photo||X.match(/\.(gif|png|jpg|jpeg|bmp)(?:\?([^#]*))?(?:#(\.*))?$/i)}function S(){for(var X in R){if(z.isFunction(R[X])&&X.substring(0,2)!=="on"){R[X]=R[X].call(s)}}R.rel=R.rel||s.rel||"nofollow";R.href=R.href||z(s).attr("href");R.title=R.title||s.title}function f(X){s=X;R=z.extend({},z(s).data(t));S();if(R.rel!=="nofollow"){c=z("."+n).filter(function(){var Z=z(this).data(t).rel||this.rel;return(Z===R.rel)});y=c.index(s);if(y===-1){c=c.add(s);y=c.length-1}}else{c=z(s);y=0}if(!w){w=N=true;j=s;try{j.blur()}catch(Y){}z.event.trigger(K);if(R.onOpen){R.onOpen.call(s)}G.css({opacity:+R.opacity,cursor:R.overlayClose?"pointer":"auto"}).show();R.w=D(R.initialWidth,"x");R.h=D(R.initialHeight,"y");B.position(0);if(T){O.bind("resize."+P+" scroll."+P,function(){G.css({width:O.width(),height:O.height(),top:O.scrollTop(),left:O.scrollLeft()})}).trigger("scroll."+P)}}p.add(H).add(o).add(M).add(l).hide();u.html(R.close).show();B.slideshow();B.load()}B=z.fn[t]=z[t]=function(X,Z){var Y=this;if(!Y[0]&&Y.selector){return Y}X=X||{};if(Z){X.onComplete=Z}if(!Y[0]||Y.selector===undefined){Y=z("<a/>");X.open=true}Y.each(function(){z(this).data(t,z.extend({},z(this).data(t)||A,X)).addClass(n)});if(X.open){f(Y[0])}return Y};B.init=function(){O=z(L);U=E().attr({id:t,"class":r?I+"IE":""});G=E("Overlay",T?"position:absolute":"").hide();V=E("Wrapper");d=E("Content").append(C=E("LoadedContent","width:0; height:0"),g=E("LoadingOverlay").add(E("LoadingGraphic")),l=E("Title"),p=E("Current"),o=E("Next"),H=E("Previous"),M=E("Slideshow"),u=E("Close"));V.append(E().append(E("TopLeft"),x=E("TopCenter"),E("TopRight")),E().append(m=E("MiddleLeft"),d,b=E("MiddleRight")),E().append(E("BottomLeft"),F=E("BottomCenter"),E("BottomRight"))).children().children().css({"float":"left"});i=E(false,"position:absolute; width:9999px; visibility:hidden; display:none");z("body").prepend(G,U.append(V,i));d.children().hover(function(){z(this).addClass("hover")},function(){z(this).removeClass("hover")}).addClass("hover");W=x.height()+F.height()+d.outerHeight(true)-d.height();k=m.width()+b.width()+d.outerWidth(true)-d.width();h=C.outerHeight(true);a=C.outerWidth(true);U.css({"padding-bottom":W,"padding-right":k}).hide();o.click(B.next);H.click(B.prev);u.click(B.close);d.children().removeClass("hover");z("."+n).live("click",function(X){if((X.button!==0&&typeof X.button!=="undefined")||X.ctrlKey||X.shiftKey||X.altKey){return true}else{f(this);return false}});G.click(function(){if(R.overlayClose){B.close()}});z(document).bind("keydown",function(X){if(w&&R.escKey&&X.keyCode===27){X.preventDefault();B.close()}if(w&&R.arrowKey&&!N&&c[1]){if(X.keyCode===37&&(y||R.loop)){X.preventDefault();H.click()}else{if(X.keyCode===39&&(y<c.length-1||R.loop)){X.preventDefault();o.click()}}}})};B.remove=function(){U.add(G).remove();z("."+n).die("click").removeData(t).removeClass(n)};B.position=function(ab,Y){var aa,Z=Math.max(O.height()-R.h-h-W,0)/2+O.scrollTop(),X=Math.max(O.width()-R.w-a-k,0)/2+O.scrollLeft();aa=(U.width()===R.w+a&&U.height()===R.h+h)?0:ab;V[0].style.width=V[0].style.height="9999px";function ac(ad){x[0].style.width=F[0].style.width=d[0].style.width=ad.style.width;g[0].style.height=g[1].style.height=d[0].style.height=m[0].style.height=b[0].style.height=ad.style.height}U.dequeue().animate({width:R.w+a,height:R.h+h,top:Z,left:X},{duration:aa,complete:function(){ac(this);N=false;V[0].style.width=(R.w+a+k)+"px";V[0].style.height=(R.h+h+W)+"px";if(Y){Y()}},step:function(){ac(this)}})};B.resize=function(X){if(w){X=X||{};if(X.width){R.w=D(X.width,"x")-a-k}if(X.innerWidth){R.w=D(X.innerWidth,"x")}C.css({width:R.w});if(X.height){R.h=D(X.height,"y")-h-W}if(X.innerHeight){R.h=D(X.innerHeight,"y")}if(!X.innerHeight&&!X.height){var Y=C.wrapInner("<div style='overflow:auto'></div>").children();R.h=Y.height();Y.replaceWith(Y.children())}C.css({height:R.h});B.position(R.transition==="none"?0:R.speed)}};B.prep=function(aa){if(!w){return}var Z,ab=R.transition==="none"?0:R.speed;O.unbind("resize."+I);C.remove();C=E("LoadedContent").html(aa);function X(){R.w=R.w||C.width();R.w=R.mw&&R.mw<R.w?R.mw:R.w;return R.w}function ac(){R.h=R.h||C.height();R.h=R.mh&&R.mh<R.h?R.mh:R.h;return R.h}C.hide().appendTo(i.show()).css({width:X(),overflow:R.scrolling?"auto":"hidden"}).css({height:ac()}).prependTo(d);i.hide();z("#"+I+"Photo").css({cssFloat:"none"});if(T){z("select").not(U.find("select")).filter(function(){return this.style.visibility!=="hidden"}).css({visibility:"hidden"}).one(q,function(){this.style.visibility="inherit"})}function Y(ag){var ai,aj,af,ae,ah=c.length,ad=R.loop;B.position(ag,function(){function ak(){if(r){U[0].style.removeAttribute("filter")}}if(!w){return}if(r){if(Z){C.fadeIn(100)}}if(R.iframe){z("<iframe frameborder=0"+(R.scrolling?"":" scrolling='no'")+(r?" allowtransparency='true'":"")+"/>").attr({src:R.href,name:new Date().getTime()}).appendTo(C)}C.show();l.show().html(R.title);if(ah>1){p.html(R.current.replace(/\{current\}/,y+1).replace(/\{total\}/,ah)).show();o[(ad||y<ah-1)?"show":"hide"]().html(R.next);H[(ad||y)?"show":"hide"]().html(R.previous);ai=y?c[y-1]:c[ah-1];af=y<ah-1?c[y+1]:c[0];if(R.slideshow){M.show();if(y===ah-1&&!ad&&U.is("."+I+"Slideshow_on")){M.click()}}if(R.preloading){ae=z(af).data(t).href||af.href;aj=z(ai).data(t).href||ai.href;if(v(ae)){z("<img/>")[0].src=ae}if(v(aj)){z("<img/>")[0].src=aj}}}g.hide();if(R.transition==="fade"){U.fadeTo(ab,1,function(){ak()})}else{ak()}O.bind("resize."+I,function(){B.position(0)});z.event.trigger(J);if(R.onComplete){R.onComplete.call(s)}})}if(R.transition==="fade"){U.fadeTo(ab,0,function(){Y(0)})}else{Y(ab)}};B.load=function(){var Z,Y,aa,X=B.prep;N=true;s=c[y];R=z.extend({},z(s).data(t));S();z.event.trigger(e);if(R.onLoad){R.onLoad.call(s)}R.h=R.height?D(R.height,"y")-h-W:R.innerHeight&&D(R.innerHeight,"y");R.w=R.width?D(R.width,"x")-a-k:R.innerWidth&&D(R.innerWidth,"x");R.mw=R.w;R.mh=R.h;if(R.maxWidth){R.mw=D(R.maxWidth,"x")-a-k;R.mw=R.w&&R.w<R.mw?R.w:R.mw}if(R.maxHeight){R.mh=D(R.maxHeight,"y")-h-W;R.mh=R.h&&R.h<R.mh?R.h:R.mh}Z=R.href;g.show();if(R.inline){E("InlineTemp").hide().insertBefore(z(Z)[0]).bind(e+" "+q,function(){z(this).replaceWith(C.children())});X(z(Z))}else{if(R.iframe){X(" ")}else{if(R.html){X(R.html)}else{if(v(Z)){Y=new Image();Y.onload=function(){var ab;Y.onload=null;Y.id=I+"Photo";z(Y).css({margin:"auto",border:"none",display:"block",cssFloat:"left"});if(R.scalePhotos){aa=function(){Y.height-=Y.height*ab;Y.width-=Y.width*ab};if(R.mw&&Y.width>R.mw){ab=(Y.width-R.mw)/Y.width;aa()}if(R.mh&&Y.height>R.mh){ab=(Y.height-R.mh)/Y.height;aa()}}if(R.h){Y.style.marginTop=Math.max(R.h-Y.height,0)/2+"px"}setTimeout(function(){X(Y)},1);if(c[1]&&(y<c.length-1||R.loop)){z(Y).css({cursor:"pointer"}).click(B.next)}if(r){Y.style.msInterpolationMode="bicubic"}};Y.src=Z}else{E().appendTo(i).load(Z,function(ac,ab,ad){X(ab==="error"?"Request unsuccessful: "+ad.statusText:this)})}}}}};B.next=function(){if(!N){y=y<c.length-1?y+1:0;B.load()}};B.prev=function(){if(!N){y=y?y-1:c.length-1;B.load()}};B.slideshow=function(){var Y,X,Z=I+"Slideshow_";M.bind(Q,function(){M.unbind();clearTimeout(X);U.removeClass(Z+"off "+Z+"on")});function aa(){M.text(R.slideshowStop).bind(J,function(){X=setTimeout(B.next,R.slideshowSpeed)}).bind(e,function(){clearTimeout(X)}).one("click",function(){Y()});U.removeClass(Z+"off").addClass(Z+"on")}Y=function(){clearTimeout(X);M.text(R.slideshowStart).unbind(J+" "+e).one("click",function(){aa();X=setTimeout(B.next,R.slideshowSpeed)});U.removeClass(Z+"on").addClass(Z+"off")};if(R.slideshow&&c[1]){if(R.slideshowAuto){aa()}else{Y()}}};B.close=function(){if(w){w=false;z.event.trigger(q);if(R.onCleanup){R.onCleanup.call(s)}O.unbind("."+I+" ."+P);G.fadeTo("fast",0);U.stop().fadeTo("fast",0,function(){U.find("iframe").attr("src","about:blank");C.remove();U.add(G).css({opacity:1,cursor:"auto"}).hide();try{j.focus()}catch(X){}setTimeout(function(){z.event.trigger(Q);if(R.onClosed){R.onClosed.call(s)}},1)})}};B.element=function(){return z(s)};B.settings=A;z(B.init)}(jQuery,this));

/*hoverAccordion*/

(function(a){a.fn.hoverAccordion=function(b){b=jQuery.extend({speed:"fast",activateitem:"true",active:"active",header:"header",hover:"hover",opened:"opened",closed:"closed",keepheight:"true"},b);var g=this;var f=window.location.href;var c=0;function e(k){if(a(k).html()==undefined){k=this}if(!g.is(":animated")){var j=a(k).parent().children("ul");var i=a(k).parent().parent().children("li").children("ul:visible");if(b.keepheight=="true"){thisheight=h}else{thisheight=j.height()}if(!j.is(":visible")){j.children().hide();j.animate({height:thisheight},{step:function(m,l){j.height(thisheight-m)},duration:b.speed}).children().show();i.animate({height:"hide"},{step:function(m,l){j.height(thisheight-m)},duration:b.speed}).children().hide();i.parent().children("a").addClass(b.closed).removeClass(b.opened);j.parent().children("a").addClass(b.opened).removeClass(b.closed)}}}var d=0;var h=0;a(this).children("li").each(function(){var k=a(this);d++;var j=k.children("a");if(j.length>0){j.hover(function(){a(this).addClass(b.hover)},function(){a(this).removeClass(b.hover)});var i=j.attr("href");if(i=="#"){j.click(function(){e(this);this.blur();return false})}else{if(b.activateitem=="true"&&f.indexOf(i)>0&&f.length-f.lastIndexOf(i)==i.length){j.parent().addClass(b.active)}}}var l=k.children("ul");if(l.length>0){if(h<l.height()){h=l.height()}l.children("li."+b.active).parent().parent().children("a").addClass(b.header);j.hover(function(){var m=this;c=setInterval(function(){e(m);clearInterval(c)},400)},function(){clearInterval(c)});if(b.activateitem=="true"){l.children("li").each(function(){var n=a(this).children("a").attr("href");if(n){if(f.indexOf(n)>0&&f.length-f.lastIndexOf(n)==n.length){a(this).addClass(b.active).parent().parent().children("a").addClass(b.opened)}}})}else{if(parseInt(b.activateitem)==d){k.addClass(b.active).children("a").addClass(b.opened)}}}l.not(a(this).parent().children("li."+b.active).children("ul")).not(l.children("li."+b.active).parent()).hide().parent().children("a").addClass(b.closed)});return this}})(jQuery);

/*SlimBox2*/

(function(w){var E=w(window),u,f,F=-1,n,x,D,v,y,L,r,m=!window.XMLHttpRequest,s=[],l=document.documentElement,k={},t=new Image(),J=new Image(),H,a,g,p,I,d,G,c,A,K;w(function(){w("body").append(w([H=w('<div id="lbOverlay" />')[0],a=w('<div id="lbCenter" />')[0],G=w('<div id="lbBottomContainer" />')[0]]).css("display","none"));g=w('<div id="lbImage" />').appendTo(a).append(p=w('<div style="position: relative;" />').append([I=w('<a id="lbPrevLink" href="#" />').click(B)[0],d=w('<a id="lbNextLink" href="#" />').click(e)[0]])[0])[0];c=w('<div id="lbBottom" />').appendTo(G).append([w('<a id="lbCloseLink" href="#" />').add(H).click(C)[0],A=w('<div id="lbCaption" />')[0],K=w('<div id="lbNumber" />')[0],w('<div style="clear: both;" />')[0]])[0]});w.slimbox=function(O,N,M){u=w.extend({loop:false,overlayOpacity:0.8,overlayFadeDuration:400,resizeDuration:400,resizeEasing:"swing",initialWidth:250,initialHeight:250,imageFadeDuration:400,captionAnimationDuration:400,counterText:"Image {x} of {y}",closeKeys:[27,88,67],previousKeys:[37,80],nextKeys:[39,78]},M);if(typeof O=="string"){O=[[O,N]];N=0}y=E.scrollTop()+(E.height()/2);L=u.initialWidth;r=u.initialHeight;w(a).css({top:Math.max(0,y-(r/2)),width:L,height:r,marginLeft:-L/2}).show();v=m||(H.currentStyle&&(H.currentStyle.position!="fixed"));if(v){H.style.position="absolute"}w(H).css("opacity",u.overlayOpacity).fadeIn(u.overlayFadeDuration);z();j(1);f=O;u.loop=u.loop&&(f.length>1);return b(N)};w.fn.slimbox=function(M,P,O){P=P||function(Q){return[Q.href,Q.title]};O=O||function(){return true};var N=this;return N.unbind("click").click(function(){var S=this,U=0,T,Q=0,R;T=w.grep(N,function(W,V){return O.call(S,W,V)});for(R=T.length;Q<R;++Q){if(T[Q]==S){U=Q}T[Q]=P(T[Q],Q)}return w.slimbox(T,U,M)})};function z(){var N=E.scrollLeft(),M=E.width();w([a,G]).css("left",N+(M/2));if(v){w(H).css({left:N,top:E.scrollTop(),width:M,height:E.height()})}}function j(M){if(M){w("object").add(m?"select":"embed").each(function(O,P){s[O]=[P,P.style.visibility];P.style.visibility="hidden"})}else{w.each(s,function(O,P){P[0].style.visibility=P[1]});s=[]}var N=M?"bind":"unbind";E[N]("scroll resize",z);w(document)[N]("keydown",o)}function o(O){var N=O.keyCode,M=w.inArray;return(M(N,u.closeKeys)>=0)?C():(M(N,u.nextKeys)>=0)?e():(M(N,u.previousKeys)>=0)?B():false}function B(){return b(x)}function e(){return b(D)}function b(M){if(M>=0){F=M;n=f[F][0];x=(F||(u.loop?f.length:0))-1;D=((F+1)%f.length)||(u.loop?0:-1);q();a.className="lbLoading";k=new Image();k.onload=i;k.src=n}return false}function i(){a.className="";w(g).css({backgroundImage:"url("+n+")",visibility:"hidden",display:""});w(p).width(k.width);w([p,I,d]).height(k.height);w(A).html(f[F][1]||"");w(K).html((((f.length>1)&&u.counterText)||"").replace(/{x}/,F+1).replace(/{y}/,f.length));if(x>=0){t.src=f[x][0]}if(D>=0){J.src=f[D][0]}L=g.offsetWidth;r=g.offsetHeight;var M=Math.max(0,y-(r/2));if(a.offsetHeight!=r){w(a).animate({height:r,top:M},u.resizeDuration,u.resizeEasing)}if(a.offsetWidth!=L){w(a).animate({width:L,marginLeft:-L/2},u.resizeDuration,u.resizeEasing)}w(a).queue(function(){w(G).css({width:L,top:M+r,marginLeft:-L/2,visibility:"hidden",display:""});w(g).css({display:"none",visibility:"",opacity:""}).fadeIn(u.imageFadeDuration,h)})}function h(){if(x>=0){w(I).show()}if(D>=0){w(d).show()}w(c).css("marginTop",-c.offsetHeight).animate({marginTop:0},u.captionAnimationDuration);G.style.visibility=""}function q(){k.onload=null;k.src=t.src=J.src=n;w([a,g,c]).stop(true);w([I,d,g,G]).hide()}function C(){if(F>=0){q();F=x=D=-1;w(a).hide();w(H).stop().fadeOut(u.overlayFadeDuration,j)}return false}})(jQuery);if(!/android|iphone|ipod|series60|symbian|windows ce|blackberry/i.test(navigator.userAgent)){jQuery(function($){$("a[rel^='lightbox']").slimbox({},null,function(el){return(this==el)||((this.rel.length>8)&&(this.rel==el.rel));});});}
