(function(o){var e=new Array;var c=new Array;var l=new Array;var n=new Array;var d=new Array;var g=new Array;var b=new Array;var f=new Array;var m=new Array;var a=new Array;var h=new Array;o.fn.coinslider=o.fn.CoinSlider=function(q){init=function(r){c[r.id]=new Array();l[r.id]=new Array();n[r.id]=new Array();d[r.id]=new Array();g[r.id]=new Array();f[r.id]=0;a[r.id]=0;h[r.id]=1;e[r.id]=o.extend({},o.fn.coinslider.defaults,q);o.each(o("#"+r.id+" li .theImg"),function(s,t){l[r.id][s]=o(t).attr("src");n[r.id][s]=o(t).parent().is("a")?o(t).parent().attr("href"):"";d[r.id][s]=o(t).parent().is("a")?o(t).parent().attr("target"):"";g[r.id][s]=o(t).next().is("span")?o(t).next().html():"";o(t).hide();o(t).next().hide()});o(r).css({"background-image":"url("+l[r.id][0]+")",width:"955px",height:e[r.id].height,position:"relative","background-position":"top left",overflow:"hidden",margin:"auto"}).wrap("<div class='coin-slider' id='coin-slider-"+r.id+"' />");o("#"+r.id).append("<div class='cs-title' id='cs-title-"+r.id+"' style='position: absolute; bottom:0; z-index: 1000;'></div>");o.setFields(r);if(e[r.id].navigation){o.setNavigation(r)}o.transition(r,0);o.transitionCall(r)};o.setFields=function(r){tWidth=sWidth=parseInt(2000/e[r.id].spw);tHeight=sHeight=parseInt(e[r.id].height/e[r.id].sph);counter=sLeft=sTop=0;tgapx=gapx=e[r.id].width-e[r.id].spw*sWidth;tgapy=gapy=e[r.id].height-e[r.id].sph*sHeight;for(i=1;i<=e[r.id].sph;i++){o(".wp-post-image").css({"margin-top":"-21px"});gapx=tgapx;if(gapy>0){gapy--;sHeight=tHeight+1}else{sHeight=tHeight}for(j=1;j<=e[r.id].spw;j++){if(gapx>0){gapx--;sWidth=tWidth+1}else{sWidth=tWidth}c[r.id][counter]=i+""+j;counter++;if(e[r.id].links){o("#"+r.id).append("<a href='"+n[r.id][0]+"' class='cs-"+r.id+"' id='cs-"+r.id+i+j+"' style='width:"+sWidth+"px; height:"+sHeight+"px; float: left; position: absolute;'></a>")}else{o("#"+r.id).append("<div class='cs-"+r.id+"' id='cs-"+r.id+i+j+"' style='width:"+sWidth+"px; height:"+sHeight+"px; float: left; position: absolute;'></div>")}o("#cs-"+r.id+i+j).css({"background-position":-sLeft+"px "+(-sTop+"px"),left:sLeft,top:sTop});sLeft+=sWidth}sTop+=sHeight;sLeft=0}o("<div id='cs-buttons-"+r.id+"' class='cs-buttons'></div>").appendTo(o("#coin-slider-"+r.id+""));o("<div id='cs-wrap-"+r.id+"' class='cs-buttonWrapper'></div>").appendTo(o("#cs-buttons-"+r.id+""));for(k=1;k<l[r.id].length+1;k++){o("#cs-wrap-"+r.id).append("<a href='#' class='cs-button-"+r.id+"' id='cs-button-"+r.id+"-"+k+"'></a>")}o("#cs-buttons-"+r.id).append('<div class="cs-start-stop"><span href="#" class="stop" id="start-stop"></span></div>');o("#cs-buttons-"+r.id+" a:last").after("</div>");o(".cs-"+r.id).mouseover(function(){o("#cs-navigation-"+r.id).show()});o(".cs-"+r.id).mouseout(function(){o("#cs-navigation-"+r.id).hide()});o("#cs-title-"+r.id).mouseover(function(){o("#cs-navigation-"+r.id).show()});o("#cs-title-"+r.id).mouseout(function(){o("#cs-navigation-"+r.id).hide()});o("#start-stop").click(function(){if(o("#start-stop").hasClass("stop")){e[r.id].pause=true;o("#start-stop").removeClass("stop").addClass("start");z=0}else{e[r.id].pause=false;o("#start-stop").removeClass("start").addClass("stop");z=1}})};o.transitionCall=function(r){clearInterval(b[r.id]);delay=e[r.id].delay+e[r.id].spw*e[r.id].sph*e[r.id].sDelay;b[r.id]=setInterval(function(){o.transition(r)},delay)};o.transition=function(r,s){if(e[r.id].pause==true){return}o.effect(r);a[r.id]=0;m[r.id]=setInterval(function(){o.appereance(r,c[r.id][a[r.id]])},e[r.id].sDelay);o(r).css({"background-image":"url("+l[r.id][f[r.id]]+")"});if(typeof(s)=="undefined"){f[r.id]++}else{if(s=="prev"){f[r.id]--}else{f[r.id]=s}}if(f[r.id]==l[r.id].length){f[r.id]=0}if(f[r.id]==-1){f[r.id]=l[r.id].length-1}o(".cs-button-"+r.id).removeClass("cs-active");o("#cs-button-"+r.id+"-"+(f[r.id]+1)).addClass("cs-active");if(g[r.id][f[r.id]]){o("#cs-title-"+r.id).css({opacity:0}).animate({opacity:e[r.id].opacity},e[r.id].titleSpeed);o("#cs-title-"+r.id).html(g[r.id][f[r.id]])}else{o("#cs-title-"+r.id).css("opacity",0)}};o.appereance=function(s,r){o(".cs-"+s.id).attr("href",n[s.id][f[s.id]]).attr("target",d[s.id][f[s.id]]);if(a[s.id]==e[s.id].spw*e[s.id].sph){clearInterval(m[s.id]);return}o("#cs-"+s.id+r).css({opacity:0,"background-image":"url("+l[s.id][f[s.id]]+")"});o("#cs-"+s.id+r).animate({opacity:1},300);a[s.id]++};o.setNavigation=function(r){o(r).append("<div id='cs-navigation-"+r.id+"'></div>");o("#cs-navigation-"+r.id).hide();o("#cs-prev-"+r.id).css({position:"absolute",top:e[r.id].height/2-15,left:0,"z-index":1001,"line-height":"30px",opacity:e[r.id].opacity}).click(function(s){s.preventDefault();o.transition(r,"prev");o.transitionCall(r)}).mouseover(function(){o("#cs-navigation-"+r.id).show()});o("#cs-next-"+r.id).css({position:"absolute",top:e[r.id].height/2-15,right:0,"z-index":1001,"line-height":"30px",opacity:e[r.id].opacity}).click(function(s){s.preventDefault();o.transition(r);o.transitionCall(r)}).mouseover(function(){o("#cs-navigation-"+r.id).show()});o.each(o(".cs-button-"+r.id),function(s,t){o(t).click(function(u){e[r.id].pause=false;o("cs-button-"+r.id).removeClass("cs-active");o(this).addClass("cs-active");u.preventDefault();o.transition(r,s);o.transitionCall(r);o("#start-stop").removeClass("stop").addClass("start");e[r.id].pause=true})});o("#cs-navigation-"+r.id+" a").mouseout(function(){o("#cs-navigation-"+r.id).hide();e[r.id].pause=false});if(o("#wpadminbar").length==0){o("#cs-buttons-"+r.id).css({left:"50%","margin-left":-l[r.id].length*15/2-5,position:"absolute",bottom:"20px"})}else{o("#cs-buttons-"+r.id).css({left:"50%","margin-left":-l[r.id].length*15/2-5,position:"absolute"})}};o.effect=function(r){effA=["random","swirl","rain","straight"];if(e[r.id].effect==""){eff=effA[Math.floor(Math.random()*(effA.length))]}else{eff=e[r.id].effect}c[r.id]=new Array();if(eff=="random"){counter=0;for(i=1;i<=e[r.id].sph;i++){for(j=1;j<=e[r.id].spw;j++){c[r.id][counter]=i+""+j;counter++}}o.random(c[r.id])}if(eff=="rain"){o.rain(r)}if(eff=="swirl"){o.swirl(r)}if(eff=="straight"){o.straight(r)}h[r.id]*=-1;if(h[r.id]>0){c[r.id].reverse()}};o.random=function(r){var t=r.length;if(t==0){return false}while(--t){var s=Math.floor(Math.random()*(t+1));var v=r[t];var u=r[s];r[t]=u;r[s]=v}};o.swirl=function(r){var t=e[r.id].sph;var u=e[r.id].spw;var C=1;var B=1;var s=0;var v=0;var A=0;var w=true;while(w){v=(s==0||s==2)?u:t;for(i=1;i<=v;i++){c[r.id][A]=C+""+B;A++;if(i!=v){switch(s){case 0:B++;break;case 1:C++;break;case 2:B--;break;case 3:C--;break}}}s=(s+1)%4;switch(s){case 0:u--;B++;break;case 1:t--;C++;break;case 2:u--;B--;break;case 3:t--;C--;break}check=o.max(t,u)-o.min(t,u);if(u<=check&&t<=check){w=false}}};o.rain=function(t){var w=e[t.id].sph;var r=e[t.id].spw;var v=0;var u=to2=from=1;var s=true;while(s){for(i=from;i<=u;i++){c[t.id][v]=i+""+parseInt(to2-i+1);v++}to2++;if(u<w&&to2<r&&w<r){u++}if(u<w&&w>=r){u++}if(to2>r){from++}if(from>u){s=false}}};o.straight=function(r){counter=0;for(i=1;i<=e[r.id].sph;i++){for(j=1;j<=e[r.id].spw;j++){c[r.id][counter]=i+""+j;counter++}}};o.min=function(s,r){if(s>r){return r}else{return s}};o.max=function(s,r){if(s<r){return r}else{return s}};this.each(function(){init(this)})};o.fn.coinslider.defaults={width:620,height:290,spw:7,sph:5,delay:3000,sDelay:30,opacity:0.7,titleSpeed:500,effect:"",navigation:true,links:true,hoverPause:true}})(jQuery);(function(b){if(!document.defaultView||!document.defaultView.getComputedStyle){var d=b.curCSS;b.curCSS=function(g,e,h){if(e==="background-position"){e="backgroundPosition"}if(e!=="backgroundPosition"||!g.currentStyle||g.currentStyle[e]){return d.apply(this,arguments)}var f=g.style;if(!h&&f&&f[e]){return f[e]}return d(g,"backgroundPositionX",h)+" "+d(g,"backgroundPositionY",h)}}var c=b.fn.animate;b.fn.animate=function(e){if("background-position" in e){e.backgroundPosition=e["background-position"];delete e["background-position"]}if("backgroundPosition" in e){e.backgroundPosition="("+e.backgroundPosition}return c.apply(this,arguments)};function a(f){f=f.replace(/left|top/g,"0px");f=f.replace(/right|bottom/g,"100%");f=f.replace(/([0-9\.]+)(\s|\)|jQuery)/g,"jQuery1pxjQuery2");var e=f.match(/(-?[0-9\.]+)(px|\%|em|pt)\s(-?[0-9\.]+)(px|\%|em|pt)/);return[parseFloat(e[1],10),e[2],parseFloat(e[3],10),e[4]]}b.fx.step.backgroundPosition=function(f){if(!f.bgPosReady){var h=b.curCSS(f.elem,"backgroundPosition");if(!h){h="0px 0px"}h=a(h);f.start=[h[0],h[2]];var e=a(f.end);f.end=[e[0],e[2]];f.unit=[e[1],e[3]];f.bgPosReady=true}var g=[];g[0]=((f.end[0]-f.start[0])*f.pos)+f.start[0]+f.unit[0];g[1]=((f.end[1]-f.start[1])*f.pos)+f.start[1]+f.unit[1];f.elem.style.backgroundPosition=g[0]+" "+g[1]}})(jQuery);(function(b){var c={aliceblue:{r:240,g:248,b:255},antiquewhite:{r:250,g:235,b:215},aqua:{r:0,g:255,b:255},aquamarine:{r:127,g:255,b:212},azure:{r:240,g:255,b:255},beige:{r:245,g:245,b:220},bisque:{r:255,g:228,b:196},black:{r:0,g:0,b:0},blanchedalmond:{r:255,g:235,b:205},blue:{r:0,g:0,b:255},blueviolet:{r:138,g:43,b:226},brown:{r:165,g:42,b:42},burlywood:{r:222,g:184,b:135},cadetblue:{r:95,g:158,b:160},chartreuse:{r:127,g:255,b:0},chocolate:{r:210,g:105,b:30},coral:{r:255,g:127,b:80},cornflowerblue:{r:100,g:149,b:237},cornsilk:{r:255,g:248,b:220},crimson:{r:220,g:20,b:60},cyan:{r:0,g:255,b:255},darkblue:{r:0,g:0,b:139},darkcyan:{r:0,g:139,b:139},darkgoldenrod:{r:184,g:134,b:11},darkgray:{r:169,g:169,b:169},darkgreen:{r:0,g:100,b:0},darkgrey:{r:169,g:169,b:169},darkkhaki:{r:189,g:183,b:107},darkmagenta:{r:139,g:0,b:139},darkolivegreen:{r:85,g:107,b:47},darkorange:{r:255,g:140,b:0},darkorchid:{r:153,g:50,b:204},darkred:{r:139,g:0,b:0},darksalmon:{r:233,g:150,b:122},darkseagreen:{r:143,g:188,b:143},darkslateblue:{r:72,g:61,b:139},darkslategray:{r:47,g:79,b:79},darkslategrey:{r:47,g:79,b:79},darkturquoise:{r:0,g:206,b:209},darkviolet:{r:148,g:0,b:211},deeppink:{r:255,g:20,b:147},deepskyblue:{r:0,g:191,b:255},dimgray:{r:105,g:105,b:105},dimgrey:{r:105,g:105,b:105},dodgerblue:{r:30,g:144,b:255},firebrick:{r:178,g:34,b:34},floralwhite:{r:255,g:250,b:240},forestgreen:{r:34,g:139,b:34},fuchsia:{r:255,g:0,b:255},gainsboro:{r:220,g:220,b:220},ghostwhite:{r:248,g:248,b:255},gold:{r:255,g:215,b:0},goldenrod:{r:218,g:165,b:32},gray:{r:128,g:128,b:128},green:{r:0,g:128,b:0},greenyellow:{r:173,g:255,b:47},grey:{r:128,g:128,b:128},honeydew:{r:240,g:255,b:240},hotpink:{r:255,g:105,b:180},indianred:{r:205,g:92,b:92},indigo:{r:75,g:0,b:130},ivory:{r:255,g:255,b:240},khaki:{r:240,g:230,b:140},lavender:{r:230,g:230,b:250},lavenderblush:{r:255,g:240,b:245},lawngreen:{r:124,g:252,b:0},lemonchiffon:{r:255,g:250,b:205},lightblue:{r:173,g:216,b:230},lightcoral:{r:240,g:128,b:128},lightcyan:{r:224,g:255,b:255},lightgoldenrodyellow:{r:250,g:250,b:210},lightgray:{r:211,g:211,b:211},lightgreen:{r:144,g:238,b:144},lightgrey:{r:211,g:211,b:211},lightpink:{r:255,g:182,b:193},lightsalmon:{r:255,g:160,b:122},lightseagreen:{r:32,g:178,b:170},lightskyblue:{r:135,g:206,b:250},lightslategray:{r:119,g:136,b:153},lightslategrey:{r:119,g:136,b:153},lightsteelblue:{r:176,g:196,b:222},lightyellow:{r:255,g:255,b:224},lime:{r:0,g:255,b:0},limegreen:{r:50,g:205,b:50},linen:{r:250,g:240,b:230},magenta:{r:255,g:0,b:255},maroon:{r:128,g:0,b:0},mediumaquamarine:{r:102,g:205,b:170},mediumblue:{r:0,g:0,b:205},mediumorchid:{r:186,g:85,b:211},mediumpurple:{r:147,g:112,b:219},mediumseagreen:{r:60,g:179,b:113},mediumslateblue:{r:123,g:104,b:238},mediumspringgreen:{r:0,g:250,b:154},mediumturquoise:{r:72,g:209,b:204},mediumvioletred:{r:199,g:21,b:133},midnightblue:{r:25,g:25,b:112},mintcream:{r:245,g:255,b:250},mistyrose:{r:255,g:228,b:225},moccasin:{r:255,g:228,b:181},navajowhite:{r:255,g:222,b:173},navy:{r:0,g:0,b:128},oldlace:{r:253,g:245,b:230},olive:{r:128,g:128,b:0},olivedrab:{r:107,g:142,b:35},orange:{r:255,g:165,b:0},orangered:{r:255,g:69,b:0},orchid:{r:218,g:112,b:214},palegoldenrod:{r:238,g:232,b:170},palegreen:{r:152,g:251,b:152},paleturquoise:{r:175,g:238,b:238},palevioletred:{r:219,g:112,b:147},papayawhip:{r:255,g:239,b:213},peachpuff:{r:255,g:218,b:185},peru:{r:205,g:133,b:63},pink:{r:255,g:192,b:203},plum:{r:221,g:160,b:221},powderblue:{r:176,g:224,b:230},purple:{r:128,g:0,b:128},red:{r:255,g:0,b:0},rosybrown:{r:188,g:143,b:143},royalblue:{r:65,g:105,b:225},saddlebrown:{r:139,g:69,b:19},salmon:{r:250,g:128,b:114},sandybrown:{r:244,g:164,b:96},seagreen:{r:46,g:139,b:87},seashell:{r:255,g:245,b:238},sienna:{r:160,g:82,b:45},silver:{r:192,g:192,b:192},skyblue:{r:135,g:206,b:235},slateblue:{r:106,g:90,b:205},slategray:{r:112,g:128,b:144},slategrey:{r:112,g:128,b:144},snow:{r:255,g:250,b:250},springgreen:{r:0,g:255,b:127},steelblue:{r:70,g:130,b:180},tan:{r:210,g:180,b:140},teal:{r:0,g:128,b:128},thistle:{r:216,g:191,b:216},tomato:{r:255,g:99,b:71},turquoise:{r:64,g:224,b:208},violet:{r:238,g:130,b:238},wheat:{r:245,g:222,b:179},white:{r:255,g:255,b:255},whitesmoke:{r:245,g:245,b:245},yellow:{r:255,g:255,b:0},yellowgreen:{r:154,g:205,b:50},transparent:{r:-1,g:-1,b:-1}},a="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor borderColor boxShadowColor color outlineColor textShadowColor".split(" ");b.color={normalize:function(r){var h,g,t,d,m,f,o=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/,n=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/,s=/rgb(?:a)?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(0*\.?\d+)\s*)?\)/,q=/rgb(?:a)?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(0*\.?\d+)\s*)?\)/,e=/hsl(?:a)?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(0*\.?\d+)\s*)?\)/;if(t=o.exec(r)){h={r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16),source:t[0]}}else{if(t=n.exec(r)){h={r:parseInt(t[1]+t[1],16),g:parseInt(t[2]+t[2],16),b:parseInt(t[3]+t[3],16),source:t[0]}}else{if(t=s.exec(r)){h={r:parseInt(t[1],10),g:parseInt(t[2],10),b:parseInt(t[3],10),alpha:parseFloat(t[4],10),source:t[0]}}else{if(t=q.exec(r)){h={r:parseInt(t[1]*2.55,10),g:parseInt(t[2]*2.55,10),b:parseInt(t[3]*2.55,10),alpha:parseFloat(t[4],10),source:t[0]}}else{if(t=e.exec(r)){h=b.color.hsl_to_rgb(parseFloat(t[1],10)/100,parseFloat(t[2],10)/100,parseFloat(t[3],10)/100);h.alpha=parseFloat(t[4],10);h.source=t[0]}else{t=r.split(" ");for(m=0,f=t.length;m<f;m++){d=t[m];if(c[d]){break}}if(!c[d]){d="transparent"}h=c[d];h.source=d}}}}}if(!h.alpha&&h.alpha!==0){delete h.alpha}return h},hsl_to_rgb:function(f,u,e,o){var d,m,n,t,q;if(u===0){d=m=n=e}else{if(e<=0.5){q=e*(u+1)}else{q=(e+u)-(e*u)}t=(e*2)-q;d=parseInt(255*b.color.hue_to_rgb(t,q,f+(1/3)),10);m=parseInt(255*b.color.hue_to_rgb(t,q,f),10);n=parseInt(255*b.color.hue_to_rgb(t,q,f-(1/3)),10)}return{r:d,g:m,b:n,alpha:o}},hue_to_rgb:function(e,d,f){if(f<0){f++}if(f>1){f--}if((f*6)<1){return e+((d-e)*f*6)}else{if((f*2)<1){return d}else{if((f*3)<2){return e+((d-e)*((2/3)-f)*6)}else{return e}}}}};if(b.cssHooks){b.each(a,function(d,e){b.cssHooks[e]={set:function(f,g){g=b.color.normalize(g);if(!g.alpha){g.alpha=1}}};b.fx.step[e]=function(f){var g;if(!f.start||typeof f.start==="string"){if(!f.start){f.start=b.css(f.elem,e)}f.start=b.color.normalize(f.start);f.end=b.color.normalize(f.end);if(!f.start.alpha){f.start.alpha=1}if(!f.end.alpha){f.end.alpha=1}}b.style(f.elem,e,"rgba("+parseInt(f.start.r+(f.pos*(f.end.r-f.start.r)),10)+","+parseInt(f.start.g+(f.pos*(f.end.g-f.start.g)),10)+","+parseInt(f.start.b+(f.pos*(f.end.b-f.start.b)),10)+","+parseFloat(f.start.alpha+(f.pos*(f.end.alpha-f.start.alpha)))+")")}})}})(jQuery);(function(g){var a="textShadow",d="Color",f=(d+" X Y Blur").split(" "),e=g.support,c=/\s/,h=document.createElement("div"),b=h.style;e.textShadow=(b.textShadow==="");h=b=null;if(g.cssHooks&&e.textShadow){g.each(f,function(l,n){var m=a+n;g.cssHooks[m]={get:function(r,q,o){return(function(u,x,w){var v=g.css(u,a),s=g.color.normalize(v),t;if(w===d){t="rgb"+(s.alpha?"a":"")+"("+s.r+", "+s.g+", "+s.b+(s.alpha?", "+s.alpha:"")+")"}else{t=g.trim(v.replace(s.source,"")).split(c)[x-1]}return t})(r,l,n)},set:function(o,q){o.style.textShadow=(function(u,v,t){var r=g.style(o,a+d),w=u.replace(r,"").split(c),s;if(t===0){r=v}else{w[t]=v}return r+w.join(" ")})(g.css(o,a),q,l)}};if(n!==d){g.fx.step[m]=function(o){g.cssHooks[m].set(o.elem,o.now+o.unit)}}})}})(jQuery);(function(a){a.anythingSlider=function(c,b){var d=this,e;d.el=c;d.jQueryel=a(c).addClass("anythingBase").wrap('<div class="anythingSlider"><div class="anythingWindow" /></div>');d.jQueryel.data("AnythingSlider",d);d.init=function(){d.options=e=a.extend({},a.anythingSlider.defaults,b);d.initialized=false;if(a.isFunction(e.onBeforeInitialize)){d.jQueryel.bind("before_initialize",e.onBeforeInitialize)}d.jQueryel.trigger("before_initialize",d);d.jQuerywrapper=d.jQueryel.parent().closest("div.anythingSlider").addClass("anythingSlider-"+e.theme);d.jQuerywindow=d.jQueryel.closest("div.anythingWindow");d.win=window;d.jQuerywin=a(d.win);d.jQuerycontrols=a('<div class="anythingControls"></div>').appendTo((e.appendControlsTo!==null&&a(e.appendControlsTo).length)?a(e.appendControlsTo):d.jQuerywrapper);d.jQuerystartStop=a('<a href="#" class="start-stop"></a>');d.jQueryAlert=a(".slideTextWrap iframe");if(e.buildStartStop){d.jQuerystartStop.appendTo((e.appendStartStopTo!==null&&a(e.appendStartStopTo).length)?a(e.appendStartStopTo):d.jQuerycontrols)}d.jQuerynav=a('<ul class="thumbNav" />').appendTo((e.appendNavigationTo!==null&&a(e.appendNavigationTo).length)?a(e.appendNavigationTo):d.jQuerycontrols);d.flag=false;d.playing=e.autoPlay;d.slideshow=false;d.hovered=true;d.panelSize=[];d.currentPage=e.startPanel=parseInt(e.startPanel,10)||1;e.changeBy=parseInt(e.changeBy,10)||1;d.adj=(e.infiniteSlides)?0:1;d.width=d.jQueryel.width();d.height=d.jQueryel.height();d.outerPad=[d.jQuerywrapper.innerWidth()-d.jQuerywrapper.width(),d.jQuerywrapper.innerHeight()-d.jQuerywrapper.height()];if(e.playRtl){d.jQuerywrapper.addClass("rtl")}if(e.expand){d.jQueryouter=d.jQuerywrapper.parent();d.jQuerywindow.css({width:"100%",height:"100%"});d.checkResize()}if(d.jQueryAlert){}if(e.buildStartStop){d.buildAutoPlay()}if(e.buildArrows){d.buildNextBackButtons()}if(!e.autoPlay){e.autoPlayLocked=false}d.updateSlider();d.jQuerylastPage=d.jQuerycurrentPage;d.runTimes=a("div.anythingSlider").index(d.jQuerywrapper)+1;d.regex=new RegExp("panel"+d.runTimes+"-(\\d+)","i");if(d.runTimes===1){d.makeActive()}if(!a.isFunction(a.easing[e.easing])){e.easing="swing"}if(e.pauseOnHover){d.jQuerywrapper.hover(function(){if(d.playing){d.jQueryel.trigger("slideshow_paused",d);d.clearTimer(true)}},function(){if(d.playing){d.jQueryel.trigger("slideshow_unpaused",d);d.startStop(d.playing,true)}})}d.setCurrentPage(d.gotoHash()||e.startPage,false);d.jQueryAlert.live("mouseover",function(){d.startStop(d.paused)});d.jQueryAlert.live("mouseleave",function(){d.startStop(d.playing,true)});d.slideControls(false);d.jQuerywrapper.bind("mouseenter mouseleave",function(g){d.hovered=(g.type==="mouseenter")?true:false;d.slideControls(d.hovered,false)});a(document).keyup(function(g){if(e.enableKeyboard&&d.jQuerywrapper.is(".activeSlider")&&!g.target.tagName.match("TEXTAREA|INPUT|SELECT")){if(!e.vertical&&(g.which===38||g.which===40)){return}switch(g.which){case 39:case 40:d.goForward();break;case 37:case 38:d.goBack();break}}});d.jQueryitems.delegate("a","focus.AnythingSlider",function(l){var g=a(this).closest(".panel"),h=d.jQueryitems.index(g)+d.adj;d.jQueryitems.find(".focusedLink").removeClass("focusedLink");a(this).addClass("focusedLink");d.jQuerywindow.scrollLeft(0);if(!g.is(".activePage")&&d.currentPage+e.showMultiple-1>h){d.gotoPage(h);l.preventDefault()}});var f="slideshow_paused slideshow_unpaused slide_init slide_begin slideshow_stop slideshow_start initialized swf_completed".split(" ");a.each("onShowPause onShowUnpause onSlideInit onSlideBegin onShowStop onShowStart onInitialized onSWFComplete".split(" "),function(g,h){if(a.isFunction(e[h])){d.jQueryel.bind(f[g],e[h])}});if(a.isFunction(e.onSlideComplete)){d.jQueryel.bind("slide_complete",function(){setTimeout(function(){e.onSlideComplete(d)},0)})}d.initialized=true;d.jQueryel.trigger("initialized",d);d.startStop(d.playing)};d.updateSlider=function(){d.jQueryel.children(".cloned").remove();d.jQuerynav.empty();d.currentPage=d.currentPage||1;d.jQueryitems=d.jQueryel.children();d.pages=d.jQueryitems.length;d.dir=(e.vertical)?"top":"left";e.showMultiple=(e.vertical)?1:parseInt(e.showMultiple,10)||1;if(e.showMultiple>1){if(e.showMultiple>d.pages){e.showMultiple=d.pages}d.adjustMultiple=(e.infiniteSlides&&d.pages>1)?0:e.showMultiple-1;d.pages=d.jQueryitems.length-d.adjustMultiple}d.jQuerycontrols.add(d.jQuerynav).add(d.jQuerystartStop).add(d.jQueryforward).add(d.jQueryback)[(d.pages<=1)?"hide":"show"]();if(d.pages>1){d.buildNavigation()}if(e.infiniteSlides&&d.pages>1){d.jQueryel.prepend(d.jQueryitems.filter(":last").clone().removeAttr("id").addClass("cloned"));if(e.showMultiple>1){d.jQueryel.append(d.jQueryitems.filter(":lt("+e.showMultiple+")").clone().removeAttr("id").addClass("cloned").addClass("multiple"))}else{d.jQueryel.append(d.jQueryitems.filter(":first").clone().removeAttr("id").addClass("cloned"))}d.jQueryel.find(".cloned").each(function(){a(this).find("a,input,textarea,select,button,area").attr("disabled","disabled");a(this).find("[id]").removeAttr("id")})}d.jQueryitems=d.jQueryel.children().addClass("panel"+(e.vertical?" vertical":""));d.setDimensions();if(e.resizeContents){d.jQueryitems.css("width",d.width);d.jQuerywrapper.css("width",d.getDim(d.currentPage)[0]);d.jQuerywrapper.add(d.jQueryitems).css("height",d.height)}else{d.jQuerywin.load(function(){d.setDimensions()})}if(d.currentPage>d.pages){d.currentPage=d.pages}d.setCurrentPage(d.currentPage,false);d.jQuerynav.find("a").eq(d.currentPage-1).addClass("cur")};d.buildNavigation=function(){if(e.buildNavigation&&(d.pages>1)){var f,g;d.jQueryitems.filter(":not(.cloned)").each(function(l){var h=l+1;f=((h===1)?"first":"")+((h===d.pages)?"last":"");g=a('<a href="#"></a>').addClass("panel"+h).wrap('<li class="'+f+'" />');d.jQuerynav.append(g.parent());if(a.isFunction(e.navigationFormatter)){f=e.navigationFormatter(h,a(this));g.html("<span>"+f+"</span>");if(parseInt(g.find("span").css("text-indent"),10)<0){g.addClass(e.tooltipClass).attr("title",f)}}else{g.html("<span>"+h+"</span>")}g.bind(e.clickControls,function(m){if(!d.flag&&e.enableNavigation){d.flag=true;setTimeout(function(){d.flag=false},100);d.gotoPage(h);if(e.hashTags){d.setHash(h)}}m.preventDefault()})});if(e.navigationSize!==false&&parseInt(e.navigationSize,10)<d.pages){if(!d.jQuerycontrols.find(".anythingNavWindow").length){d.jQuerynav.before('<ul><li class="prev"><a href="#"><span>'+e.backText+"</span></a></li></ul>").after('<ul><li class="next"><a href="#"><span>'+e.forwardText+"</span></a></li></ul>").wrap('<div class="anythingNavWindow"></div>')}d.navWidths=d.jQuerynav.find("li").map(function(){return a(this).innerWidth()}).get();d.navLeft=1;d.jQuerynav.width(d.navWidth(1,d.pages+1)+5);d.jQuerycontrols.find(".anythingNavWindow").width(d.navWidth(1,e.navigationSize+1)).end().find(".prev,.next").bind(e.clickControls,function(h){if(!d.flag){d.flag=true;setTimeout(function(){d.flag=false},200);d.navWindow(d.navLeft+e.navigationSize*(a(this).is(".prev")?-1:1))}h.preventDefault()})}}};d.navWidth=function(f,m){var h=Math.min(f,m),l=Math.max(f,m),g=0;for(;h<l;h++){g+=d.navWidths[h-1]||0}return g};d.navWindow=function(g){var f=d.pages-e.navigationSize+1;g=(g<=1)?1:(g>1&&g<f)?g:f;if(g!==d.navLeft){d.jQuerycontrols.find(".anythingNavWindow").animate({scrollLeft:d.navWidth(1,g),width:d.navWidth(g,g+e.navigationSize)},{queue:false,duration:e.animationTime});d.navLeft=g}};d.buildNextBackButtons=function(){d.jQueryforward=a('<span class="arrow forward"><a href="#"><span>'+e.forwardText+"</span></a></span>");d.jQueryback=a('<span class="arrow back"><a href="#"><span>'+e.backText+"</span></a></span>");d.jQueryback.bind(e.clickBackArrow,function(f){if(e.enableArrows&&!d.flag){d.flag=true;setTimeout(function(){d.flag=false},100);d.goBack()}f.preventDefault()});d.jQueryforward.bind(e.clickForwardArrow,function(f){if(e.enableArrows&&!d.flag){d.flag=true;setTimeout(function(){d.flag=false},100);d.goForward()}f.preventDefault()});d.jQueryback.add(d.jQueryforward).find("a").bind("focusin focusout",function(){a(this).toggleClass("hover")});d.jQueryback.appendTo((e.appendBackTo!==null&&a(e.appendBackTo).length)?a(e.appendBackTo):d.jQuerywrapper);d.jQueryforward.appendTo((e.appendForwardTo!==null&&a(e.appendForwardTo).length)?a(e.appendForwardTo):d.jQuerywrapper);d.jQueryarrowWidth=d.jQueryforward.width()};d.buildAutoPlay=function(){d.jQuerystartStop.html("<span>"+(d.playing?e.stopText:e.startText)+"</span>").bind(e.clickSlideshow,function(f){if(e.enableStartStop){d.startStop(!d.playing);d.makeActive();if(d.playing&&!e.autoPlayDelayed){d.goForward(true)}}f.preventDefault()}).bind("focusin focusout",function(){a(this).toggleClass("hover")})};d.checkResize=function(f){clearTimeout(d.resizeTimer);d.resizeTimer=setTimeout(function(){var g=d.jQueryouter.width()-d.outerPad[0],l=(d.jQueryouter[0].tagName==="BODY"?d.jQuerywin.height():d.jQueryouter.height())-d.outerPad[1];if(d.width*e.showMultiple!==g||d.height!==l){d.setDimensions();d.gotoPage(d.currentPage,d.playing,null,-1)}if(typeof(f)==="undefined"){d.checkResize()}},500)};d.setDimensions=function(){var f,m,o,n=0,l=(e.showMultiple>1)?d.width||d.jQuerywindow.width()/e.showMultiple:d.jQuerywindow.width(),g=d.jQuerywin.width();if(e.expand){f=d.jQueryouter.width()-d.outerPad[0];d.height=m=d.jQueryouter.height()-d.outerPad[1];d.jQuerywrapper.add(d.jQuerywindow).add(d.jQueryitems).css({width:f,height:m});d.width=l=(e.showMultiple>1)?f/e.showMultiple:f}d.jQueryitems.each(function(h){o=a(this).children();if(e.resizeContents){f=d.width;m=d.height;a(this).css({width:f,height:m});if(o.length&&o[0].tagName==="EMBED"){o.attr({width:"100%",height:"100%"})}if(o.length===1){o.css({width:"100%",height:"100%"})}}else{f=a(this).width();if(o.length===1&&f>=g){f=(o.width()>=g)?l:o.width();o.css("max-width",f)}a(this).css("width",f);m=(o.length===1)?o.outerHeight(true):a(this).height();a(this).css("height",m)}d.panelSize[h]=[f,m,n];n+=(e.vertical)?m:f});d.jQueryel.css((e.vertical?"height":"width"),n)};d.getDim=function(m){if(d.pages<1||isNaN(m)){return[d.width,d.height]}m=(e.infiniteSlides&&d.pages>1)?m:m-1;var g,f=d.panelSize[m][0],l=d.panelSize[m][1];if(e.showMultiple>1){for(g=1;g<e.showMultiple;g++){f+=d.panelSize[(m+g)%e.showMultiple][0];l=Math.max(l,d.panelSize[m+g][1])}}return[f,l]};d.goForward=function(f){d.gotoPage(d.currentPage+e.changeBy*(e.playRtl?-1:1),f)};d.goBack=function(f){d.gotoPage(d.currentPage+e.changeBy*(e.playRtl?1:-1),f)};d.gotoPage=function(g,f,l,h){if(f!==true){f=false;d.startStop(false);d.makeActive()}if(/^[#|.]/.test(g)&&a(g).length){g=a(g).closest(".panel").index()+d.adj}if(e.changeBy!==1){if(g<0){g+=d.pages}if(g>d.pages){g-=d.pages}}if(d.pages<=1){return}d.jQuerylastPage=d.jQuerycurrentPage;if(typeof(g)!=="number"){g=e.startPanel;d.setCurrentPage(g)}if(f&&e.isVideoPlaying(d)){return}if(g>d.pages+1-d.adj){g=(!e.infiniteSlides&&!e.stopAtEnd)?1:d.pages}if(g<d.adj){g=(!e.infiniteSlides&&!e.stopAtEnd)?d.pages:1}d.currentPage=(g>d.pages)?d.pages:(g<1)?1:d.currentPage;d.jQuerycurrentPage=d.jQueryitems.eq(d.currentPage-d.adj);d.exactPage=g;d.jQuerytargetPage=d.jQueryitems.eq((g===0)?d.pages-d.adj:(g>d.pages)?1-d.adj:g-d.adj);h=h||e.animationTime;if(h>=0){d.jQueryel.trigger("slide_init",d)}d.slideControls(true,false);if(f!==true){f=false}if(!f||(e.stopAtEnd&&g===d.pages)){d.startStop(false)}if(h>=0){d.jQueryel.trigger("slide_begin",d)}setTimeout(function(m){if(!e.resizeContents){m=d.getDim(g);d.jQuerywrapper.filter(":not(:animated)").animate({width:m[0]||d.width},{queue:false,duration:(h<0?0:h),easing:e.easing})}m={};m[d.dir]=-d.panelSize[(e.infiniteSlides&&d.pages>1)?g:g-1][2];d.jQueryel.filter(":not(:animated)").animate(m,{queue:false,duration:h,easing:e.easing,complete:function(){d.endAnimation(g,l,h)}})},parseInt(e.delayBeforeAnimate,10)||0)};d.endAnimation=function(f,h,g){if(f===0){d.jQueryel.css(d.dir,-d.panelSize[d.pages][2]);f=d.pages}else{if(f>d.pages){d.jQueryel.css(d.dir,-d.panelSize[1][2]);f=1}}d.exactPage=f;d.setCurrentPage(f,false);d.jQueryitems.removeClass("activePage").eq(f-d.adj).addClass("activePage");if(!d.hovered){d.slideControls(false)}if(g>=0){d.jQueryel.trigger("slide_complete",d)}if(typeof h==="function"){h(d)}if(e.autoPlayLocked&&!d.playing){setTimeout(function(){d.startStop(true)},e.resumeDelay-(e.autoPlayDelayed?e.delay:0))}};d.setCurrentPage=function(g,f){g=parseInt(g,10);if(d.pages<1||g===0||isNaN(g)){return}if(g>d.pages+1-d.adj){g=d.pages-d.adj}if(g<d.adj){g=1}if(e.buildNavigation){d.jQuerynav.find(".cur").removeClass("cur").end().find("a").eq(g-1).addClass("cur")}if(!e.infiniteSlides&&e.stopAtEnd){d.jQuerywrapper.find("span.forward")[g===d.pages?"addClass":"removeClass"]("disabled").end().find("span.back")[g===1?"addClass":"removeClass"]("disabled");if(g===d.pages&&d.playing){d.startStop()}}if(!f){var h=d.getDim(g);d.jQuerywrapper.css({width:h[0],height:"100%"}).add(d.jQuerywindow).scrollLeft(0);d.jQueryel.css(d.dir,-d.panelSize[(e.infiniteSlides&&d.pages>1)?g:g-1][2])}d.currentPage=g;d.jQuerycurrentPage=d.jQueryitems.removeClass("activePage").eq(g-d.adj).addClass("activePage")};d.makeActive=function(){if(!d.jQuerywrapper.is(".activeSlider")){a(".activeSlider").removeClass("activeSlider");d.jQuerywrapper.addClass("activeSlider")}};d.gotoHash=function(){var g=d.win.location.hash,f=g.indexOf("&"),l=g.match(d.regex);if(l===null&&!/^#&/.test(g)){g=g.substring(0,(f>=0?f:g.length));l=(a(g).closest(".anythingBase")[0]===d.el)?a(g).closest(".panel").index():null}else{if(l!==null){l=(e.hashTags)?parseInt(l[1],10):null}}return l};d.setHash=function(l){var g="panel"+d.runTimes+"-",f=d.win.location.hash;if(typeof f!=="undefined"){d.win.location.hash=(f.indexOf(g)>0)?f.replace(d.regex,g+l):f+"&"+g+l}};d.slideControls=function(f){var h=(f)?"slideDown":"slideUp",m=(f)?0:e.animationTime,l=(f)?e.animationTime:0,n=(f)?1:0,g=(f)?0:1;if(e.toggleControls){d.jQuerycontrols.stop(true,true).delay(m)[h](e.animationTime/2).delay(l)}if(e.buildArrows&&e.toggleArrows){if(!d.hovered&&d.playing){g=1;n=0}d.jQueryforward.stop(true,true).delay(m).animate({right:g*d.jQueryarrowWidth,opacity:n},e.animationTime/2);d.jQueryback.stop(true,true).delay(m).animate({left:g*d.jQueryarrowWidth,opacity:n},e.animationTime/2)}};d.clearTimer=function(f){if(d.timer){d.win.clearInterval(d.timer);if(!f&&d.slideshow){d.jQueryel.trigger("slideshow_stop",d);d.slideshow=false}}};d.startStop=function(g,f){if(g!==true){g=false}d.playing=g;if(g&&!f){d.jQueryel.trigger("slideshow_start",d);d.slideshow=true}if(e.buildStartStop){d.jQuerystartStop.toggleClass("playing",g).find("span").html(g?e.stopText:e.startText);if(parseInt(d.jQuerystartStop.find("span").css("text-indent"),10)<0){}}if(g){d.clearTimer(true);d.timer=d.win.setInterval(function(){if(!e.isVideoPlaying(d)){d.goForward(true)}else{if(!e.resumeOnVideoEnd){d.startStop()}}},e.delay)}else{d.clearTimer()}};d.init()};a.anythingSlider.defaults={theme:"default",expand:false,resizeContents:true,vertical:false,showMultiple:false,easing:"swing",buildArrows:false,buildNavigation:true,buildStartStop:true,appendForwardTo:null,appendBackTo:null,appendControlsTo:null,appendNavigationTo:null,appendStartStopTo:null,toggleArrows:false,toggleControls:false,startText:"Start",stopText:"Stop",forwardText:"&raquo;",backText:"&laquo;",tooltipClass:"tooltip",enableArrows:true,enableNavigation:true,enableStartStop:true,enableKeyboard:true,startPanel:1,changeBy:1,hashTags:true,infiniteSlides:true,navigationFormatter:null,navigationSize:false,autoPlay:true,autoPlayLocked:false,autoPlayDelayed:false,pauseOnHover:false,stopAtEnd:false,playRtl:false,delay:3000,resumeDelay:15000,animationTime:600,delayBeforeAnimate:0,clickForwardArrow:"click",clickBackArrow:"click",clickControls:"click focusin",clickSlideshow:"click",resumeOnVideoEnd:true,addWmodeToObject:"opaque",isVideoPlaying:function(b){return false}};a.fn.anythingSlider=function(b,c){return this.each(function(){var e,d=a(this).data("AnythingSlider");if((typeof(b)).match("object|undefined")){if(!d){(new a.anythingSlider(this,b))}else{d.updateSlider()}}else{if(/\d/.test(b)&&!isNaN(b)&&d){e=(typeof(b)==="number")?b:parseInt(a.trim(b),10);if(e>=1&&e<=d.pages){d.gotoPage(e,false,c)}}else{if(/^[#|.]/.test(b)&&a(b).length){d.gotoPage(b,false,c)}}}})}})(jQuery);(function(a){a.fn.anythingSliderFx=function(e,b){var c=a(this).closest(".anythingSlider"),d=c.width(),g=c.height(),f=function(m){var h=m,l;if(m&&typeof m==="string"&&m.indexOf(",")>0){m=m.split(",");h=a.trim(m[0]);l=a.trim(m[1])}return{top:[{inFx:{top:0},outFx:{top:"-"+(h||g)}}],bottom:[{inFx:{top:0},outFx:{top:(h||g)}}],left:[{inFx:{left:0},outFx:{left:"-"+(h||d)}}],right:[{inFx:{left:0},outFx:{left:(h||d)}}],fade:[{inFx:{opacity:h||1},outFx:{opacity:0}}],expand:[{inFx:{width:l||"100%",height:l||"100%",top:"0%",left:"0%"},outFx:{width:(h||"10%"),height:(h||"10%"),top:"50%",left:"50%"}}],grow:[{inFx:{top:0,fontSize:h||"16px",opacity:1},outFx:{top:"-200px",fontSize:l||"80px",opacity:0}}],listLR:[{inFx:{left:0,opacity:1},outFx:[{left:(h||d),opacity:0},{left:"-"+(h||d),opacity:0}],selector:[":odd",":even"]}],listRL:[{inFx:{left:0,opacity:1},outFx:[{left:(h||d),opacity:0},{left:"-"+(h||d),opacity:0}],selector:[":even",":odd"]}],"caption-Top":[{inFx:{top:0,opacity:0.8},outFx:{top:("-"+h||-50),opacity:0}}],"caption-Right":[{inFx:{right:0,opacity:0.8},outFx:{right:("-"+h||-150),opacity:0}}],"caption-Bottom":[{inFx:{bottom:0,opacity:0.8},outFx:{bottom:("-"+h||-50),opacity:0}}],"caption-Left":[{inFx:{left:0,opacity:0.8},outFx:{left:("-"+h||-150),opacity:0}}]}};return this.each(function(){a(this).data("AnythingSlider").fx=e;var n=a.extend({easing:"swing",timeIn:400,timeOut:350,stopRepeat:false,outFxBind:"slide_init",inFxBind:"slide_complete"},b),o=f(),m=function(v,r,y,w){if(v.length===0||typeof r==="undefined"){return}var x=r[0]||r,u=x[1]||"",q=w||parseInt(((u==="")?x.duration:x[0].duration),10);if(y){if(v.css("position")!=="absolute"){v.css({position:"relative"})}v.stop();if(u!==""){v.filter(r[1][0]).animate(x[0],{queue:false,duration:q,easing:x[0].easing});v.filter(r[1][1]).animate(u,{queue:true,duration:q,easing:x[0].easing});return}}v.animate(x,{queue:true,duration:q,easing:x.easing})},h=function(u,w){var s,r,q=(w)?"outFx":"inFx",x={},v=(w)?n.timeOut:n.timeIn,t=a.trim(u[0].replace(/\s+/g," ")).split(" ");if(w&&t.length===1&&o.hasOwnProperty(t)&&typeof(o[t][0].selector)!=="undefined"){r=o[t][0].outFx;r[0].duration=u[2]||n.timeOut;r[0].easing=u[3]||n.easing;return[r,o[t][0].selector||[]]}a.each(t,function(B,C){if(o.hasOwnProperty(C)){var A=typeof u[1]==="undefined"||u[1]==="",y=(A)?o:f(u[1]);a.extend(true,x,y[C][0][q]);A=u[2]||x.duration||v;x.duration=(w)?A/2:A;x.easing=isNaN(u[3])?u[3]||n.easing:u[4]||n.easing}});return[x]},l=a(this).bind(n.outFxBind,function(w,s){if(n.stopRepeat&&s.jQuerylastPage[0]===s.jQuerytargetPage[0]){return}var q,r,v,u=s.jQuerylastPage.add(s.jQueryitems.eq(s.exactPage)).add(s.jQuerytargetPage),t=s.fx;if(s.exactPage===0){u=u.add(s.jQueryitems.eq(s.pages))}if(s.options.animationTime<n.timeOut){v=s.options.animationTime||n.timeOut}u=u.find("*").andSelf();for(q in t){if(q==="outFx"){for(r in t.outFx){if(u.filter(r).length){m(u.filter(r),t.outFx[r],true)}}}else{if(q!=="inFx"){if(a.isArray(t[q])&&u.filter(q).length){m(u.filter(q),h(t[q],true),true,v)}}}}}).bind(n.inFxBind,function(v,s){if(n.stopRepeat&&s.jQuerylastPage[0]===s.jQuerytargetPage[0]){return}var r,q,u=s.jQuerycurrentPage.add(s.jQueryitems.eq(s.exactPage)),t=s.fx;u=u.find("*").andSelf();for(r in t){if(r==="inFx"){for(q in t.inFx){if(u.filter(q).length){m(u.filter(q),t.inFx[q],false)}}}else{if(r!=="outFx"&&a.isArray(t[r])&&u.filter(r).length){m(u.filter(r),h(t[r],false),false)}}}}).data("AnythingSlider");a(window).load(function(){l.gotoPage(l.currentPage,l.playing)})})}})(jQuery);(function(a){a.fn.UItoTop=function(d){var g={text:"To Top",min:200,inDelay:600,outDelay:400,containerID:"toTop",containerHoverID:"toTopHover",scrollSpeed:1200,easingType:"linear"};var e=a.extend(g,d);var c="#"+e.containerID;var b="#"+e.containerID;var f=a(document);a(c).css({opacity:1});a(".turnTop").live("click",function(){a("html, body").animate({scrollTop:0});return false});a(window).scroll(function(){if(f.scrollTop()>100){a(c).css({opacity:1});a(c).addClass("turnTop")}else{a(c).css({opacity:1});a(c).removeClass("turnTop")}})}})(jQuery);jQuery.easing.jswing=jQuery.easing.swing;jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(e,f,a,h,g){return jQuery.easing[jQuery.easing.def](e,f,a,h,g)},easeInQuad:function(e,f,a,h,g){return h*(f/=g)*f+a},easeOutQuad:function(e,f,a,h,g){return -h*(f/=g)*(f-2)+a},easeInOutQuad:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f+a}return -h/2*((--f)*(f-2)-1)+a},easeInCubic:function(e,f,a,h,g){return h*(f/=g)*f*f+a},easeOutCubic:function(e,f,a,h,g){return h*((f=f/g-1)*f*f+1)+a},easeInOutCubic:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f+a}return h/2*((f-=2)*f*f+2)+a},easeInQuart:function(e,f,a,h,g){return h*(f/=g)*f*f*f+a},easeOutQuart:function(e,f,a,h,g){return -h*((f=f/g-1)*f*f*f-1)+a},easeInOutQuart:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f*f+a}return -h/2*((f-=2)*f*f*f-2)+a},easeInQuint:function(e,f,a,h,g){return h*(f/=g)*f*f*f*f+a},easeOutQuint:function(e,f,a,h,g){return h*((f=f/g-1)*f*f*f*f+1)+a},easeInOutQuint:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f*f*f+a}return h/2*((f-=2)*f*f*f*f+2)+a},easeInSine:function(e,f,a,h,g){return -h*Math.cos(f/g*(Math.PI/2))+h+a},easeOutSine:function(e,f,a,h,g){return h*Math.sin(f/g*(Math.PI/2))+a},easeInOutSine:function(e,f,a,h,g){return -h/2*(Math.cos(Math.PI*f/g)-1)+a},easeInExpo:function(e,f,a,h,g){return(f==0)?a:h*Math.pow(2,10*(f/g-1))+a},easeOutExpo:function(e,f,a,h,g){return(f==g)?a+h:h*(-Math.pow(2,-10*f/g)+1)+a},easeInOutExpo:function(e,f,a,h,g){if(f==0){return a}if(f==g){return a+h}if((f/=g/2)<1){return h/2*Math.pow(2,10*(f-1))+a}return h/2*(-Math.pow(2,-10*--f)+2)+a},easeInCirc:function(e,f,a,h,g){return -h*(Math.sqrt(1-(f/=g)*f)-1)+a},easeOutCirc:function(e,f,a,h,g){return h*Math.sqrt(1-(f=f/g-1)*f)+a},easeInOutCirc:function(e,f,a,h,g){if((f/=g/2)<1){return -h/2*(Math.sqrt(1-f*f)-1)+a}return h/2*(Math.sqrt(1-(f-=2)*f)+1)+a},easeInElastic:function(f,h,e,o,n){var l=1.70158;var m=0;var g=o;if(h==0){return e}if((h/=n)==1){return e+o}if(!m){m=n*0.3}if(g<Math.abs(o)){g=o;var l=m/4}else{var l=m/(2*Math.PI)*Math.asin(o/g)}return -(g*Math.pow(2,10*(h-=1))*Math.sin((h*n-l)*(2*Math.PI)/m))+e},easeOutElastic:function(f,h,e,o,n){var l=1.70158;var m=0;var g=o;if(h==0){return e}if((h/=n)==1){return e+o}if(!m){m=n*0.3}if(g<Math.abs(o)){g=o;var l=m/4}else{var l=m/(2*Math.PI)*Math.asin(o/g)}return g*Math.pow(2,-10*h)*Math.sin((h*n-l)*(2*Math.PI)/m)+o+e},easeInOutElastic:function(f,h,e,o,n){var l=1.70158;var m=0;var g=o;if(h==0){return e}if((h/=n/2)==2){return e+o}if(!m){m=n*(0.3*1.5)}if(g<Math.abs(o)){g=o;var l=m/4}else{var l=m/(2*Math.PI)*Math.asin(o/g)}if(h<1){return -0.5*(g*Math.pow(2,10*(h-=1))*Math.sin((h*n-l)*(2*Math.PI)/m))+e}return g*Math.pow(2,-10*(h-=1))*Math.sin((h*n-l)*(2*Math.PI)/m)*0.5+o+e},easeInBack:function(e,f,a,l,h,g){if(g==undefined){g=1.70158}return l*(f/=h)*f*((g+1)*f-g)+a},easeOutBack:function(e,f,a,l,h,g){if(g==undefined){g=1.70158}return l*((f=f/h-1)*f*((g+1)*f+g)+1)+a},easeInOutBack:function(e,f,a,l,h,g){if(g==undefined){g=1.70158}if((f/=h/2)<1){return l/2*(f*f*(((g*=(1.525))+1)*f-g))+a}return l/2*((f-=2)*f*(((g*=(1.525))+1)*f+g)+2)+a},easeInBounce:function(e,f,a,h,g){return h-jQuery.easing.easeOutBounce(e,g-f,0,h,g)+a},easeOutBounce:function(e,f,a,h,g){if((f/=g)<(1/2.75)){return h*(7.5625*f*f)+a}else{if(f<(2/2.75)){return h*(7.5625*(f-=(1.5/2.75))*f+0.75)+a}else{if(f<(2.5/2.75)){return h*(7.5625*(f-=(2.25/2.75))*f+0.9375)+a}else{return h*(7.5625*(f-=(2.625/2.75))*f+0.984375)+a}}}},easeInOutBounce:function(e,f,a,h,g){if(f<g/2){return jQuery.easing.easeInBounce(e,f*2,0,h,g)*0.5+a}return jQuery.easing.easeOutBounce(e,f*2-g,0,h,g)*0.5+h*0.5+a}});
/*!
 * jQuery Cycle Plugin (with Transition Definitions)
 * Examples and documentation at: http://jquery.malsup.com/cycle/
 * Copyright (c) 2007-2010 M. Alsup
 * Version: 2.9995 (09-AUG-2011)
 * Dual licensed under the MIT and GPL licenses.
 * http://jquery.malsup.com/license.html
 * Requires: jQuery v1.3.2 or later
 */
(function(u){var n="2.9995";if(u.support==undefined){u.support={opacity:!(u.browser.msie)}}function a(v){u.fn.cycle.debug&&f(v)}function f(){window.console&&console.log&&console.log("[cycle] "+Array.prototype.join.call(arguments," "))}u.expr[":"].paused=function(v){return v.cyclePause};u.fn.cycle=function(w,v){var x={s:this.selector,c:this.context};if(this.length===0&&w!="stop"){if(!u.isReady&&x.s){f("DOM not ready, queuing slideshow");u(function(){u(x.s,x.c).cycle(w,v)});return this}f("terminating; zero elements found by selector"+(u.isReady?"":" (DOM not ready)"));return this}return this.each(function(){var D=q(this,w,v);if(D===false){return}D.updateActivePagerLink=D.updateActivePagerLink||u.fn.cycle.updateActivePagerLink;if(this.cycleTimeout){clearTimeout(this.cycleTimeout)}this.cycleTimeout=this.cyclePause=0;var E=u(this);var A=D.slideExpr?u(D.slideExpr,this):E.children();var B=A.get();var y=m(E,A,B,D,x);if(y===false){return}if(B.length<2){f("terminating; too few slides: "+B.length);return}var C=y.continuous?10:h(B[y.currSlide],B[y.nextSlide],y,!y.backwards);if(C){C+=(y.delay||0);if(C<10){C=10}a("first timeout: "+C);this.cycleTimeout=setTimeout(function(){e(B,y,0,!D.backwards)},C)}})};function o(v,y,x){var A=u(v).data("cycle.opts");var w=!!v.cyclePause;if(w&&A.paused){A.paused(v,A,y,x)}else{if(!w&&A.resumed){A.resumed(v,A,y,x)}}}function q(v,y,w){if(v.cycleStop==undefined){v.cycleStop=0}if(y===undefined||y===null){y={}}if(y.constructor==String){switch(y){case"destroy":case"stop":var B=u(v).data("cycle.opts");if(!B){return false}v.cycleStop++;if(v.cycleTimeout){clearTimeout(v.cycleTimeout)}v.cycleTimeout=0;B.elements&&u(B.elements).stop();u(v).removeData("cycle.opts");if(y=="destroy"){t(B)}return false;case"toggle":v.cyclePause=(v.cyclePause===1)?0:1;A(v.cyclePause,w,v);o(v);return false;case"pause":v.cyclePause=1;o(v);return false;case"resume":v.cyclePause=0;A(false,w,v);o(v);return false;case"prev":case"next":var B=u(v).data("cycle.opts");if(!B){f('options not found, "prev/next" ignored');return false}u.fn.cycle[y](B);return false;default:y={fx:y}}return y}else{if(y.constructor==Number){var x=y;y=u(v).data("cycle.opts");if(!y){f("options not found, can not advance slide");return false}if(x<0||x>=y.elements.length){f("invalid slide index: "+x);return false}y.nextSlide=x;if(v.cycleTimeout){clearTimeout(v.cycleTimeout);v.cycleTimeout=0}if(typeof w=="string"){y.oneTimeFx=w}e(y.elements,y,1,x>=y.currSlide);return false}}return y;function A(D,E,C){if(!D&&E===true){var F=u(C).data("cycle.opts");if(!F){f("options not found, can not resume");return false}if(C.cycleTimeout){clearTimeout(C.cycleTimeout);C.cycleTimeout=0}e(F.elements,F,1,!F.backwards)}}}function b(v,w){if(!u.support.opacity&&w.cleartype&&v.style.filter){try{v.style.removeAttribute("filter")}catch(x){}}}function t(v){if(v.next){u(v.next).unbind(v.prevNextEvent)}if(v.prev){u(v.prev).unbind(v.prevNextEvent)}if(v.pager||v.pagerAnchorBuilder){u.each(v.pagerAnchors||[],function(){this.unbind().remove()})}v.pagerAnchors=null;if(v.destroy){v.destroy(v)}}function m(H,D,B,A,M){var K=u.extend({},u.fn.cycle.defaults,A||{},u.metadata?H.metadata():u.meta?H.data():{});var I=u.isFunction(H.data)?H.data(K.metaAttr):null;if(I){K=u.extend(K,I)}if(K.autostop){K.countdown=K.autostopCount||B.length}var v=H[0];H.data("cycle.opts",K);K.jQuerycont=H;K.stopCount=v.cycleStop;K.elements=B;K.before=K.before?[K.before]:[];K.after=K.after?[K.after]:[];if(!u.support.opacity&&K.cleartype){K.after.push(function(){b(this,K)})}if(K.continuous){K.after.push(function(){e(B,K,0,!K.backwards)})}r(K);if(!u.support.opacity&&K.cleartype&&!K.cleartypeNoBg){g(D)}if(H.css("position")=="static"){H.css("position","relative")}if(K.width){H.width(K.width)}if(K.height&&K.height!="auto"){H.height(K.height)}if(K.startingSlide){K.startingSlide=parseInt(K.startingSlide,10)}else{if(K.backwards){K.startingSlide=B.length-1}}if(K.random){K.randomMap=[];for(var Q=0;Q<B.length;Q++){K.randomMap.push(Q)}K.randomMap.sort(function(U,w){return Math.random()-0.5});K.randomIndex=1;K.startingSlide=K.randomMap[1]}else{if(K.startingSlide>=B.length){K.startingSlide=0}}K.currSlide=K.startingSlide||0;var E=K.startingSlide;D.css({position:"absolute",top:0,left:0}).hide().each(function(w){var U;if(K.backwards){U=E?w<=E?B.length+(w-E):E-w:B.length-w}else{U=E?w>=E?B.length-(w-E):E-w:B.length-w}u(this).css("z-index",U)});u(B[E]).css("opacity",1).show();b(B[E],K);if(K.fit){if(!K.aspect){if(K.width){D.width(K.width)}if(K.height&&K.height!="auto"){D.height(K.height)}}else{D.each(function(){var U=u(this);var w=(K.aspect===true)?U.width()/U.height():K.aspect;if(K.width&&U.width()!=K.width){U.width(K.width);U.height(K.width/w)}if(K.height&&U.height()<K.height){U.height(K.height);U.width(K.height*w)}})}}if(K.center&&((!K.fit)||K.aspect)){D.each(function(){var w=u(this);w.css({"margin-left":K.width?((K.width-w.width())/2)+"px":0,"margin-top":K.height?((K.height-w.height())/2)+"px":0})})}if(K.center&&!K.fit&&!K.slideResize){D.each(function(){var w=u(this);w.css({"margin-left":K.width?((K.width-w.width())/2)+"px":0,"margin-top":K.height?((K.height-w.height())/2)+"px":0})})}var L=K.containerResize&&!H.innerHeight();if(L){var C=0,J=0;for(var O=0;O<B.length;O++){var S=u(B[O]),T=S[0],G=S.outerWidth(),R=S.outerHeight();if(!G){G=T.offsetWidth||T.width||S.attr("width")}if(!R){R=T.offsetHeight||T.height||S.attr("height")}C=G>C?G:C;J=R>J?R:J}if(C>0&&J>0){H.css({width:C+"px",height:J+"px"})}}var y=false;if(K.pause){H.hover(function(){y=true;this.cyclePause++;o(v,true)},function(){y&&this.cyclePause--;o(v,true)})}if(c(K)===false){return false}var x=false;A.requeueAttempts=A.requeueAttempts||0;D.each(function(){var V=u(this);this.cycleH=(K.fit&&K.height)?K.height:(V.height()||this.offsetHeight||this.height||V.attr("height")||0);this.cycleW=(K.fit&&K.width)?K.width:(V.width()||this.offsetWidth||this.width||V.attr("width")||0);if(V.is("img")){var U=(u.browser.msie&&this.cycleW==28&&this.cycleH==30&&!this.complete);var X=(u.browser.mozilla&&this.cycleW==34&&this.cycleH==19&&!this.complete);var W=(u.browser.opera&&((this.cycleW==42&&this.cycleH==19)||(this.cycleW==37&&this.cycleH==17))&&!this.complete);var w=(this.cycleH==0&&this.cycleW==0&&!this.complete);if(U||X||W||w){if(M.s&&K.requeueOnImageNotLoaded&&++A.requeueAttempts<100){f(A.requeueAttempts," - img slide not loaded, requeuing slideshow: ",this.src,this.cycleW,this.cycleH);setTimeout(function(){u(M.s,M.c).cycle(A)},K.requeueTimeout);x=true;return false}else{f("could not determine size of image: "+this.src,this.cycleW,this.cycleH)}}}return true});if(x){return false}K.cssBefore=K.cssBefore||{};K.cssAfter=K.cssAfter||{};K.cssFirst=K.cssFirst||{};K.animIn=K.animIn||{};K.animOut=K.animOut||{};D.not(":eq("+E+")").css(K.cssBefore);u(D[E]).css(K.cssFirst);if(K.timeout){K.timeout=parseInt(K.timeout,10);if(K.speed.constructor==String){K.speed=u.fx.speeds[K.speed]||parseInt(K.speed,10)}if(!K.sync){K.speed=K.speed/2}var N=K.fx=="none"?0:K.fx=="shuffle"?500:250;while((K.timeout-K.speed)<N){K.timeout+=K.speed}}if(K.easing){K.easeIn=K.easeOut=K.easing}if(!K.speedIn){K.speedIn=K.speed}if(!K.speedOut){K.speedOut=K.speed}K.slideCount=B.length;K.currSlide=K.lastSlide=E;if(K.random){if(++K.randomIndex==B.length){K.randomIndex=0}K.nextSlide=K.randomMap[K.randomIndex]}else{if(K.backwards){K.nextSlide=K.startingSlide==0?(B.length-1):K.startingSlide-1}else{K.nextSlide=K.startingSlide>=(B.length-1)?0:K.startingSlide+1}}if(!K.multiFx){var P=u.fn.cycle.transitions[K.fx];if(u.isFunction(P)){P(H,D,K)}else{if(K.fx!="custom"&&!K.multiFx){f("unknown transition: "+K.fx,"; slideshow terminating");return false}}}var F=D[E];if(!K.skipInitializationCallbacks){if(K.before.length){K.before[0].apply(F,[F,F,K,true])}if(K.after.length){K.after[0].apply(F,[F,F,K,true])}}if(K.next){u(K.next).bind(K.prevNextEvent,function(){return s(K,1)})}if(K.prev){u(K.prev).bind(K.prevNextEvent,function(){return s(K,0)})}if(K.pager||K.pagerAnchorBuilder){d(B,K)}l(K,B);return K}function r(v){v.original={before:[],after:[]};v.original.cssBefore=u.extend({},v.cssBefore);v.original.cssAfter=u.extend({},v.cssAfter);v.original.animIn=u.extend({},v.animIn);v.original.animOut=u.extend({},v.animOut);u.each(v.before,function(){v.original.before.push(this)});u.each(v.after,function(){v.original.after.push(this)})}function c(C){var A,x,w=u.fn.cycle.transitions;if(C.fx.indexOf(",")>0){C.multiFx=true;C.fxs=C.fx.replace(/\s*/g,"").split(",");for(A=0;A<C.fxs.length;A++){var B=C.fxs[A];x=w[B];if(!x||!w.hasOwnProperty(B)||!u.isFunction(x)){f("discarding unknown transition: ",B);C.fxs.splice(A,1);A--}}if(!C.fxs.length){f("No valid transitions named; slideshow terminating.");return false}}else{if(C.fx=="all"){C.multiFx=true;C.fxs=[];for(p in w){x=w[p];if(w.hasOwnProperty(p)&&u.isFunction(x)){C.fxs.push(p)}}}}if(C.multiFx&&C.randomizeEffects){var y=Math.floor(Math.random()*20)+30;for(A=0;A<y;A++){var v=Math.floor(Math.random()*C.fxs.length);C.fxs.push(C.fxs.splice(v,1)[0])}a("randomized fx sequence: ",C.fxs)}return true}function l(w,v){w.addSlide=function(x,A){var y=u(x),B=y[0];if(!w.autostopCount){w.countdown++}v[A?"unshift":"push"](B);if(w.els){w.els[A?"unshift":"push"](B)}w.slideCount=v.length;y.css("position","absolute");y[A?"prependTo":"appendTo"](w.jQuerycont);if(A){w.currSlide++;w.nextSlide++}if(!u.support.opacity&&w.cleartype&&!w.cleartypeNoBg){g(y)}if(w.fit&&w.width){y.width(w.width)}if(w.fit&&w.height&&w.height!="auto"){y.height(w.height)}B.cycleH=(w.fit&&w.height)?w.height:y.height();B.cycleW=(w.fit&&w.width)?w.width:y.width();y.css(w.cssBefore);if(w.pager||w.pagerAnchorBuilder){u.fn.cycle.createPagerAnchor(v.length-1,B,u(w.pager),v,w)}if(u.isFunction(w.onAddSlide)){w.onAddSlide(y)}else{y.hide()}}}u.fn.cycle.resetState=function(w,v){v=v||w.fx;w.before=[];w.after=[];w.cssBefore=u.extend({},w.original.cssBefore);w.cssAfter=u.extend({},w.original.cssAfter);w.animIn=u.extend({},w.original.animIn);w.animOut=u.extend({},w.original.animOut);w.fxFn=null;u.each(w.original.before,function(){w.before.push(this)});u.each(w.original.after,function(){w.after.push(this)});var x=u.fn.cycle.transitions[v];if(u.isFunction(x)){x(w.jQuerycont,u(w.elements),w)}};function e(D,v,C,F){if(C&&v.busy&&v.manualTrump){a("manualTrump in go(), stopping active transition");u(D).stop(true,true);v.busy=0}if(v.busy){a("transition active, ignoring new tx request");return}var A=v.jQuerycont[0],H=D[v.currSlide],G=D[v.nextSlide];if(A.cycleStop!=v.stopCount||A.cycleTimeout===0&&!C){return}if(!C&&!A.cyclePause&&!v.bounce&&((v.autostop&&(--v.countdown<=0))||(v.nowrap&&!v.random&&v.nextSlide<v.currSlide))){if(v.end){v.end(v)}return}var E=false;if((C||!A.cyclePause)&&(v.nextSlide!=v.currSlide)){E=true;var B=v.fx;H.cycleH=H.cycleH||u(H).height();H.cycleW=H.cycleW||u(H).width();G.cycleH=G.cycleH||u(G).height();G.cycleW=G.cycleW||u(G).width();if(v.multiFx){if(F&&(v.lastFx==undefined||++v.lastFx>=v.fxs.length)){v.lastFx=0}else{if(!F&&(v.lastFx==undefined||--v.lastFx<0)){v.lastFx=v.fxs.length-1}}B=v.fxs[v.lastFx]}if(v.oneTimeFx){B=v.oneTimeFx;v.oneTimeFx=null}u.fn.cycle.resetState(v,B);if(v.before.length){u.each(v.before,function(I,J){if(A.cycleStop!=v.stopCount){return}J.apply(G,[H,G,v,F])})}var x=function(){v.busy=0;u.each(v.after,function(I,J){if(A.cycleStop!=v.stopCount){return}J.apply(G,[H,G,v,F])})};a("tx firing("+B+"); currSlide: "+v.currSlide+"; nextSlide: "+v.nextSlide);v.busy=1;if(v.fxFn){v.fxFn(H,G,v,x,F,C&&v.fastOnEvent)}else{if(u.isFunction(u.fn.cycle[v.fx])){u.fn.cycle[v.fx](H,G,v,x,F,C&&v.fastOnEvent)}else{u.fn.cycle.custom(H,G,v,x,F,C&&v.fastOnEvent)}}}if(E||v.nextSlide==v.currSlide){v.lastSlide=v.currSlide;if(v.random){v.currSlide=v.nextSlide;if(++v.randomIndex==D.length){v.randomIndex=0}v.nextSlide=v.randomMap[v.randomIndex];if(v.nextSlide==v.currSlide){v.nextSlide=(v.currSlide==v.slideCount-1)?0:v.currSlide+1}}else{if(v.backwards){var y=(v.nextSlide-1)<0;if(y&&v.bounce){v.backwards=!v.backwards;v.nextSlide=1;v.currSlide=0}else{v.nextSlide=y?(D.length-1):v.nextSlide-1;v.currSlide=y?0:v.nextSlide+1}}else{var y=(v.nextSlide+1)==D.length;if(y&&v.bounce){v.backwards=!v.backwards;v.nextSlide=D.length-2;v.currSlide=D.length-1}else{v.nextSlide=y?0:v.nextSlide+1;v.currSlide=y?D.length-1:v.nextSlide-1}}}}if(E&&v.pager){v.updateActivePagerLink(v.pager,v.currSlide,v.activePagerClass)}var w=0;if(v.timeout&&!v.continuous){w=h(D[v.currSlide],D[v.nextSlide],v,F)}else{if(v.continuous&&A.cyclePause){w=10}}if(w>0){A.cycleTimeout=setTimeout(function(){e(D,v,0,!v.backwards)},w)}}u.fn.cycle.updateActivePagerLink=function(v,x,w){u(v).each(function(){u(this).children().removeClass(w).eq(x).addClass(w)})};function h(A,x,y,w){if(y.timeoutFn){var v=y.timeoutFn.call(A,A,x,y,w);while(y.fx!="none"&&(v-y.speed)<250){v+=y.speed}a("calculated timeout: "+v+"; speed: "+y.speed);if(v!==false){return v}}return y.timeout}u.fn.cycle.next=function(v){s(v,1)};u.fn.cycle.prev=function(v){s(v,0)};function s(y,x){var C=x?1:-1;var w=y.elements;var B=y.jQuerycont[0],A=B.cycleTimeout;if(A){clearTimeout(A);B.cycleTimeout=0}if(y.random&&C<0){y.randomIndex--;if(--y.randomIndex==-2){y.randomIndex=w.length-2}else{if(y.randomIndex==-1){y.randomIndex=w.length-1}}y.nextSlide=y.randomMap[y.randomIndex]}else{if(y.random){y.nextSlide=y.randomMap[y.randomIndex]}else{y.nextSlide=y.currSlide+C;if(y.nextSlide<0){if(y.nowrap){return false}y.nextSlide=w.length-1}else{if(y.nextSlide>=w.length){if(y.nowrap){return false}y.nextSlide=0}}}}var v=y.onPrevNextEvent||y.prevNextClick;if(u.isFunction(v)){v(C>0,y.nextSlide,w[y.nextSlide])}e(w,y,1,x);return false}function d(v,x){var w=u(x.pager);u.each(v,function(y,A){u.fn.cycle.createPagerAnchor(y,A,w,v,x)});x.updateActivePagerLink(x.pager,x.startingSlide,x.activePagerClass)}u.fn.cycle.createPagerAnchor=function(B,y,D,A,w){var E;if(u.isFunction(w.pagerAnchorBuilder)){E=w.pagerAnchorBuilder(B,y);a("pagerAnchorBuilder("+B+", el) returned: "+E)}else{E='<a href="#">'+(B+1)+"</a>"}if(!E){return}var x=u(E);if(x.parents("body").length===0){var C=[];if(D.length>1){D.each(function(){var H=x.clone(true);u(this).append(H);C.push(H[0])});x=u(C)}else{x.appendTo(D)}}w.pagerAnchors=w.pagerAnchors||[];w.pagerAnchors.push(x);var F=function(K){K.preventDefault();w.nextSlide=B;var J=w.jQuerycont[0],I=J.cycleTimeout;if(I){clearTimeout(I);J.cycleTimeout=0}var H=w.onPagerEvent||w.pagerClick;if(u.isFunction(H)){H(w.nextSlide,A[w.nextSlide])}e(A,w,1,w.currSlide<B)};if(/mouseenter|mouseover/i.test(w.pagerEvent)){x.hover(F,function(){})}else{x.bind(w.pagerEvent,F)}if(!/^click/.test(w.pagerEvent)&&!w.allowPagerClickBubble){x.bind("click.cycle",function(){return false})}var G=w.jQuerycont[0];var v=false;if(w.pauseOnPagerHover){x.hover(function(){v=true;G.cyclePause++;o(G,true,true)},function(){v&&G.cyclePause--;o(G,true,true)})}};u.fn.cycle.hopsFromLast=function(y,x){var w,v=y.lastSlide,A=y.currSlide;if(x){w=A>v?A-v:y.slideCount-v}else{w=A<v?v-A:v+y.slideCount-A}return w};function g(w){a("applying clearType background-color hack");function x(y){y=parseInt(y,10).toString(16);return y.length<2?"0"+y:y}function v(B){for(;B&&B.nodeName.toLowerCase()!="html";B=B.parentNode){var y=u.css(B,"background-color");if(y&&y.indexOf("rgb")>=0){var A=y.match(/\d+/g);return"#"+x(A[0])+x(A[1])+x(A[2])}if(y&&y!="transparent"){return y}}return"#ffffff"}w.each(function(){u(this).css("background-color",v(this))})}u.fn.cycle.commonReset=function(C,A,B,x,y,v){u(B.elements).not(C).hide();if(typeof B.cssBefore.opacity=="undefined"){B.cssBefore.opacity=1}B.cssBefore.display="block";if(B.slideResize&&x!==false&&A.cycleW>0){B.cssBefore.width=A.cycleW}if(B.slideResize&&y!==false&&A.cycleH>0){B.cssBefore.height=A.cycleH}B.cssAfter=B.cssAfter||{};B.cssAfter.display="none";u(C).css("zIndex",B.slideCount+(v===true?1:0));u(A).css("zIndex",B.slideCount+(v===true?0:1))};u.fn.cycle.custom=function(I,C,v,y,B,w){var E=u(I),D=u(C);var x=v.speedIn,H=v.speedOut,A=v.easeIn,G=v.easeOut;D.css(v.cssBefore);if(w){if(typeof w=="number"){x=H=w}else{x=H=1}A=G=null}var F=function(){D.animate(v.animIn,x,A,function(){y()})};E.animate(v.animOut,H,G,function(){E.css(v.cssAfter);if(!v.sync){F()}});if(v.sync){F()}};u.fn.cycle.transitions={fade:function(x,v,w){v.not(":eq("+w.currSlide+")").css("opacity",0);w.before.push(function(B,y,A){u.fn.cycle.commonReset(B,y,A);A.cssBefore.opacity=0});w.animIn={opacity:1};w.animOut={opacity:0};w.cssBefore={top:0,left:0}}};u.fn.cycle.ver=function(){return n};u.fn.cycle.defaults={activePagerClass:"activeSlide",after:null,allowPagerClickBubble:false,animIn:null,animOut:null,aspect:false,autostop:0,autostopCount:0,backwards:false,before:null,center:null,cleartype:!u.support.opacity,cleartypeNoBg:false,containerResize:1,continuous:0,cssAfter:null,cssBefore:null,delay:0,easeIn:null,easeOut:null,easing:null,end:null,fastOnEvent:0,fit:0,fx:"fade",fxFn:null,height:"auto",manualTrump:true,metaAttr:"cycle",next:null,nowrap:0,onPagerEvent:null,onPrevNextEvent:null,pager:null,pagerAnchorBuilder:null,pagerEvent:"click.cycle",pause:0,pauseOnPagerHover:0,prev:null,prevNextEvent:"click.cycle",random:0,randomizeEffects:1,requeueOnImageNotLoaded:true,requeueTimeout:250,rev:0,shuffle:null,skipInitializationCallbacks:false,slideExpr:null,slideResize:1,speed:1000,speedIn:null,speedOut:null,startingSlide:0,sync:1,timeout:4000,timeoutFn:null,updateActivePagerLink:null,width:null}})(jQuery);
/*!
 * jQuery Cycle Plugin Transition Definitions
 * This script is a plugin for the jQuery Cycle Plugin
 * Examples and documentation at: http://malsup.com/jquery/cycle/
 * Copyright (c) 2007-2010 M. Alsup
 * Version:	 2.73
 * Dual licensed under the MIT and GPL licenses:
 * http://www.opensource.org/licenses/mit-license.php
 * http://www.gnu.org/licenses/gpl.html
 */
(function(a){a.fn.cycle.transitions.none=function(d,b,c){c.fxFn=function(g,e,f,h){a(e).show();a(g).hide();h()}};a.fn.cycle.transitions.fadeout=function(d,b,c){b.not(":eq("+c.currSlide+")").css({display:"block",opacity:1});c.before.push(function(n,l,m,f,g,e){a(n).css("zIndex",m.slideCount+(!e===true?1:0));a(l).css("zIndex",m.slideCount+(!e===true?0:1))});c.animIn.opacity=1;c.animOut.opacity=0;c.cssBefore.opacity=1;c.cssBefore.display="block";c.cssAfter.zIndex=0};a.fn.cycle.transitions.scrollUp=function(e,b,d){e.css("overflow","hidden");d.before.push(a.fn.cycle.commonReset);var c=e.height();d.cssBefore.top=c;d.cssBefore.left=0;d.cssFirst.top=0;d.animIn.top=0;d.animOut.top=-c};a.fn.cycle.transitions.scrollDown=function(e,b,d){e.css("overflow","hidden");d.before.push(a.fn.cycle.commonReset);var c=e.height();d.cssFirst.top=0;d.cssBefore.top=-c;d.cssBefore.left=0;d.animIn.top=0;d.animOut.top=c};a.fn.cycle.transitions.scrollLeft=function(e,c,d){e.css("overflow","hidden");d.before.push(a.fn.cycle.commonReset);var b=e.width();d.cssFirst.left=0;d.cssBefore.left=b;d.cssBefore.top=0;d.animIn.left=0;d.animOut.left=0-b};a.fn.cycle.transitions.scrollRight=function(e,c,d){e.css("overflow","hidden");d.before.push(a.fn.cycle.commonReset);var b=e.width();d.cssFirst.left=0;d.cssBefore.left=-b;d.cssBefore.top=0;d.animIn.left=0;d.animOut.left=b};a.fn.cycle.transitions.scrollHorz=function(d,b,c){d.css("overflow","hidden").width();c.before.push(function(h,f,g,e){if(g.rev){e=!e}a.fn.cycle.commonReset(h,f,g);g.cssBefore.left=e?(f.cycleW-1):(1-f.cycleW);g.animOut.left=e?-h.cycleW:h.cycleW});c.cssFirst.left=0;c.cssBefore.top=0;c.animIn.left=0;c.animOut.top=0};a.fn.cycle.transitions.scrollVert=function(d,b,c){d.css("overflow","hidden");c.before.push(function(h,f,g,e){if(g.rev){e=!e}a.fn.cycle.commonReset(h,f,g);g.cssBefore.top=e?(1-f.cycleH):(f.cycleH-1);g.animOut.top=e?h.cycleH:-h.cycleH});c.cssFirst.top=0;c.cssBefore.left=0;c.animIn.top=0;c.animOut.left=0};a.fn.cycle.transitions.slideX=function(d,b,c){c.before.push(function(g,e,f){a(f.elements).not(g).hide();a.fn.cycle.commonReset(g,e,f,false,true);f.animIn.width=e.cycleW});c.cssBefore.left=0;c.cssBefore.top=0;c.cssBefore.width=0;c.animIn.width="show";c.animOut.width=0};a.fn.cycle.transitions.slideY=function(d,b,c){c.before.push(function(g,e,f){a(f.elements).not(g).hide();a.fn.cycle.commonReset(g,e,f,true,false);f.animIn.height=e.cycleH});c.cssBefore.left=0;c.cssBefore.top=0;c.cssBefore.height=0;c.animIn.height="show";c.animOut.height=0};a.fn.cycle.transitions.shuffle=function(f,c,e){var d,b=f.css("overflow","visible").width();c.css({left:0,top:0});e.before.push(function(l,g,h){a.fn.cycle.commonReset(l,g,h,true,true,true)});if(!e.speedAdjusted){e.speed=e.speed/2;e.speedAdjusted=true}e.random=0;e.shuffle=e.shuffle||{left:-b,top:15};e.els=[];for(d=0;d<c.length;d++){e.els.push(c[d])}for(d=0;d<e.currSlide;d++){e.els.push(e.els.shift())}e.fxFn=function(q,m,o,g,l){if(o.rev){l=!l}var h=l?a(q):a(m);a(m).css(o.cssBefore);var n=o.slideCount;h.animate(o.shuffle,o.speedIn,o.easeIn,function(){var s=a.fn.cycle.hopsFromLast(o,l);for(var t=0;t<s;t++){l?o.els.push(o.els.shift()):o.els.unshift(o.els.pop())}if(l){for(var u=0,r=o.els.length;u<r;u++){a(o.els[u]).css("z-index",r-u+n)}}else{var v=a(q).css("z-index");h.css("z-index",parseInt(v,10)+1+n)}h.animate({left:0,top:0},o.speedOut,o.easeOut,function(){a(l?this:q).hide();if(g){g()}})})};a.extend(e.cssBefore,{display:"block",opacity:1,top:0,left:0})};a.fn.cycle.transitions.turnUp=function(d,b,c){c.before.push(function(g,e,f){a.fn.cycle.commonReset(g,e,f,true,false);f.cssBefore.top=e.cycleH;f.animIn.height=e.cycleH;f.animOut.width=e.cycleW});c.cssFirst.top=0;c.cssBefore.left=0;c.cssBefore.height=0;c.animIn.top=0;c.animOut.height=0};a.fn.cycle.transitions.turnDown=function(d,b,c){c.before.push(function(g,e,f){a.fn.cycle.commonReset(g,e,f,true,false);f.animIn.height=e.cycleH;f.animOut.top=g.cycleH});c.cssFirst.top=0;c.cssBefore.left=0;c.cssBefore.top=0;c.cssBefore.height=0;c.animOut.height=0};a.fn.cycle.transitions.turnLeft=function(d,b,c){c.before.push(function(g,e,f){a.fn.cycle.commonReset(g,e,f,false,true);f.cssBefore.left=e.cycleW;f.animIn.width=e.cycleW});c.cssBefore.top=0;c.cssBefore.width=0;c.animIn.left=0;c.animOut.width=0};a.fn.cycle.transitions.turnRight=function(d,b,c){c.before.push(function(g,e,f){a.fn.cycle.commonReset(g,e,f,false,true);f.animIn.width=e.cycleW;f.animOut.left=g.cycleW});a.extend(c.cssBefore,{top:0,left:0,width:0});c.animIn.left=0;c.animOut.width=0};a.fn.cycle.transitions.zoom=function(d,b,c){c.before.push(function(g,e,f){a.fn.cycle.commonReset(g,e,f,false,false,true);f.cssBefore.top=e.cycleH/2;f.cssBefore.left=e.cycleW/2;a.extend(f.animIn,{top:0,left:0,width:e.cycleW,height:e.cycleH});a.extend(f.animOut,{width:0,height:0,top:g.cycleH/2,left:g.cycleW/2})});c.cssFirst.top=0;c.cssFirst.left=0;c.cssBefore.width=0;c.cssBefore.height=0};a.fn.cycle.transitions.fadeZoom=function(d,b,c){c.before.push(function(g,e,f){a.fn.cycle.commonReset(g,e,f,false,false);f.cssBefore.left=e.cycleW/2;f.cssBefore.top=e.cycleH/2;a.extend(f.animIn,{top:0,left:0,width:e.cycleW,height:e.cycleH})});c.cssBefore.width=0;c.cssBefore.height=0;c.animOut.opacity=0};a.fn.cycle.transitions.blindX=function(e,c,d){var b=e.css("overflow","hidden").width();d.before.push(function(h,f,g){a.fn.cycle.commonReset(h,f,g);g.animIn.width=f.cycleW;g.animOut.left=h.cycleW});d.cssBefore.left=b;d.cssBefore.top=0;d.animIn.left=0;d.animOut.left=b};a.fn.cycle.transitions.blindY=function(e,b,d){var c=e.css("overflow","hidden").height();d.before.push(function(h,f,g){a.fn.cycle.commonReset(h,f,g);g.animIn.height=f.cycleH;g.animOut.top=h.cycleH});d.cssBefore.top=c;d.cssBefore.left=0;d.animIn.top=0;d.animOut.top=c};a.fn.cycle.transitions.blindZ=function(f,c,e){var d=f.css("overflow","hidden").height();var b=f.width();e.before.push(function(l,g,h){a.fn.cycle.commonReset(l,g,h);h.animIn.height=g.cycleH;h.animOut.top=l.cycleH});e.cssBefore.top=d;e.cssBefore.left=b;e.animIn.top=0;e.animIn.left=0;e.animOut.top=d;e.animOut.left=b};a.fn.cycle.transitions.growX=function(d,b,c){c.before.push(function(g,e,f){a.fn.cycle.commonReset(g,e,f,false,true);f.cssBefore.left=this.cycleW/2;f.animIn.left=0;f.animIn.width=this.cycleW;f.animOut.left=0});c.cssBefore.top=0;c.cssBefore.width=0};a.fn.cycle.transitions.growY=function(d,b,c){c.before.push(function(g,e,f){a.fn.cycle.commonReset(g,e,f,true,false);f.cssBefore.top=this.cycleH/2;f.animIn.top=0;f.animIn.height=this.cycleH;f.animOut.top=0});c.cssBefore.height=0;c.cssBefore.left=0};a.fn.cycle.transitions.curtainX=function(d,b,c){c.before.push(function(g,e,f){a.fn.cycle.commonReset(g,e,f,false,true,true);f.cssBefore.left=e.cycleW/2;f.animIn.left=0;f.animIn.width=this.cycleW;f.animOut.left=g.cycleW/2;f.animOut.width=0});c.cssBefore.top=0;c.cssBefore.width=0};a.fn.cycle.transitions.curtainY=function(d,b,c){c.before.push(function(g,e,f){a.fn.cycle.commonReset(g,e,f,true,false,true);f.cssBefore.top=e.cycleH/2;f.animIn.top=0;f.animIn.height=e.cycleH;f.animOut.top=g.cycleH/2;f.animOut.height=0});c.cssBefore.height=0;c.cssBefore.left=0};a.fn.cycle.transitions.cover=function(g,c,f){var l=f.direction||"left";var b=g.css("overflow","hidden").width();var e=g.height();f.before.push(function(m,d,h){a.fn.cycle.commonReset(m,d,h);if(l=="right"){h.cssBefore.left=-b}else{if(l=="up"){h.cssBefore.top=e}else{if(l=="down"){h.cssBefore.top=-e}else{h.cssBefore.left=b}}}});f.animIn.left=0;f.animIn.top=0;f.cssBefore.top=0;f.cssBefore.left=0};a.fn.cycle.transitions.uncover=function(g,c,f){var l=f.direction||"left";var b=g.css("overflow","hidden").width();var e=g.height();f.before.push(function(m,d,h){a.fn.cycle.commonReset(m,d,h,true,true,true);if(l=="right"){h.animOut.left=b}else{if(l=="up"){h.animOut.top=-e}else{if(l=="down"){h.animOut.top=e}else{h.animOut.left=-b}}}});f.animIn.left=0;f.animIn.top=0;f.cssBefore.top=0;f.cssBefore.left=0};a.fn.cycle.transitions.toss=function(f,c,e){var b=f.css("overflow","visible").width();var d=f.height();e.before.push(function(l,g,h){a.fn.cycle.commonReset(l,g,h,true,true,true);if(!h.animOut.left&&!h.animOut.top){a.extend(h.animOut,{left:b*2,top:-d/2,opacity:0})}else{h.animOut.opacity=0}});e.cssBefore.left=0;e.cssBefore.top=0;e.animIn.left=0};a.fn.cycle.transitions.wipe=function(x,o,e){var v=x.css("overflow","hidden").width();var n=x.height();e.cssBefore=e.cssBefore||{};var g;if(e.clip){if(/l2r/.test(e.clip)){g="rect(0px 0px "+n+"px 0px)"}else{if(/r2l/.test(e.clip)){g="rect(0px "+v+"px "+n+"px "+v+"px)"}else{if(/t2b/.test(e.clip)){g="rect(0px "+v+"px 0px 0px)"}else{if(/b2t/.test(e.clip)){g="rect("+n+"px "+v+"px "+n+"px 0px)"}else{if(/zoom/.test(e.clip)){var u=parseInt(n/2,10);var f=parseInt(v/2,10);g="rect("+u+"px "+f+"px "+u+"px "+f+"px)"}}}}}}e.cssBefore.clip=e.cssBefore.clip||g||"rect(0px 0px 0px 0px)";var q=e.cssBefore.clip.match(/(\d+)/g);var y=parseInt(q[0],10),c=parseInt(q[1],10),s=parseInt(q[2],10),m=parseInt(q[3],10);e.before.push(function(A,h,t){if(A==h){return}var d=a(A),b=a(h);a.fn.cycle.commonReset(A,h,t,true,true,false);t.cssAfter.display="block";var r=1,l=parseInt((t.speedIn/13),10)-1;(function w(){var C=y?y-parseInt(r*(y/l),10):0;var D=m?m-parseInt(r*(m/l),10):0;var E=s<n?s+parseInt(r*((n-s)/l||1),10):n;var B=c<v?c+parseInt(r*((v-c)/l||1),10):v;b.css({clip:"rect("+C+"px "+B+"px "+E+"px "+D+"px)"});(r++<=l)?setTimeout(w,13):d.css("display","none")})()});a.extend(e.cssBefore,{display:"block",opacity:1,top:0,left:0});e.animIn={left:0};e.animOut={left:0}}})(jQuery);(function(J,n,W){var K={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,fastIframe:true,photo:false,href:false,title:"",rel:false,opacity:0.9,preloading:true,current:"image {current} of {total}",previous:"previous",next:"next",close:"close",open:false,returnFocus:true,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},A="colorbox",T="cbox",V=T+"_open",e=T+"_load",U=T+"_complete",w=T+"_cleanup",ab=T+"_closed",l=T+"_purge",x=J.browser.msie&&!J.support.opacity,ae=x&&J.browser.version<7,aa=T+"_IE6",R,af,ag,d,H,s,b,Q,c,Z,N,m,h,r,v,X,u,S,C,D,ac={},ah,o,g,a,y,I,q,F,Y,M=false,L,t=T+"Element";function P(ak,ai){var aj=n.createElement("div");if(ak){aj.id=T+ak}aj.style.cssText=ai||false;return J(aj)}function O(ai,aj){aj=aj==="x"?Z.width():Z.height();return(typeof ai==="string")?Math.round((/%/.test(ai)?(aj/100)*parseInt(ai,10):parseInt(ai,10))):ai}function E(ai){return ac.photo||/\.(gif|png|jpg|jpeg|bmp)(?:\?([^#]*))?(?:#(\.*))?$/i.test(ai)}function ad(aj){for(var ai in aj){if(J.isFunction(aj[ai])&&ai.substring(0,2)!=="on"){aj[ai]=aj[ai].call(y)}}aj.rel=aj.rel||y.rel||"nofollow";aj.href=J.trim(aj.href||J(y).attr("href"));aj.title=J(y).attr("title")}function G(ai,aj){if(aj){aj.call(y)}J.event.trigger(ai)}function B(){var aj,al=T+"Slideshow_",am="click."+T,an,ak,ai;if(ac.slideshow&&c[1]){an=function(){X.text(ac.slideshowStop).unbind(am).bind(U,function(){if(I<c.length-1||ac.loop){aj=setTimeout(L.next,ac.slideshowSpeed)}}).bind(e,function(){clearTimeout(aj)}).one(am+" "+w,ak);af.removeClass(al+"off").addClass(al+"on");aj=setTimeout(L.next,ac.slideshowSpeed)};ak=function(){clearTimeout(aj);X.text(ac.slideshowStart).unbind([U,e,w,am].join(" ")).one(am,an);af.removeClass(al+"on").addClass(al+"off")};if(ac.slideshowAuto){an()}else{ak()}}}function f(ai){if(!M){y=ai;ad(J.extend(ac,J.data(y,A)));c=J(y);I=0;myClass=J(this).attr("class");if(ac.myClass!=="nofollow"){c=J("."+t).filter(function(){var ak=J.data(this,A).myClass||this.myClass;return(ak===ac.myClass)});I=c.index(y);if(I===-1){c=c.add(y);I=c.length-1}}if(!F){F=Y=true;af.show();if(ac.returnFocus){try{y.blur();J(y).one(ab,function(){try{this.focus()}catch(ak){}})}catch(aj){}}R.css({opacity:+ac.opacity,cursor:ac.overlayClose?"pointer":"auto"}).show();ac.w=O(ac.initialWidth,"x");ac.h=O(ac.initialHeight,"y");L.position(0);if(ae){Z.bind("resize."+aa+" scroll."+aa,function(){R.css({width:Z.width(),height:Z.height(),top:Z.scrollTop(),left:Z.scrollLeft()})}).trigger("resize."+aa)}G(V,ac.onOpen);D.add(r).hide();C.html(ac.close).show()}L.load(true)}}L=J.fn[A]=J[A]=function(ai,al){var aj=this,ak;if(!aj[0]&&aj.selector){return aj}ai=ai||{};if(al){ai.onComplete=al}if(!aj[0]||aj.selector===undefined){aj=J("<a/>");ai.open=true}aj.each(function(){J.data(this,A,J.extend({},J.data(this,A)||K,ai));J(this).addClass(t)});ak=ai.open;if(J.isFunction(ak)){ak=ak.call(aj)}if(ak){f(aj[0])}return aj};L.init=function(){Z=J(W);af=P().attr({id:A,"class":x?T+(ae?"IE6":"IE"):""});R=P("Overlay",ae?"position:absolute":"").hide();ag=P("Wrapper");d=P("Content").append(N=P("LoadedContent","width:0; height:0; overflow:hidden"),h=P("LoadingOverlay").add(P("LoadingGraphic")),r=P("Title"),v=P("Current"),u=P("Next"),S=P("Previous"),X=P("Slideshow").bind(V,B),C=P("Close"));ag.append(P().append(P("TopLeft"),H=P("TopCenter"),P("TopRight")),P(false,"clear:left").append(s=P("MiddleLeft"),d,b=P("MiddleRight")),P(false,"clear:left").append(P("BottomLeft"),Q=P("BottomCenter"),P("BottomRight"))).children().children().css({"float":"left"});m=P(false,"position:absolute; width:9999px; visibility:hidden; display:none");J("body").prepend(R,af.append(ag,m));d.children().hover(function(){J(this).addClass("hover")},function(){J(this).removeClass("hover")}).addClass("hover");ah=H.height()+Q.height()+d.outerHeight(true)-d.height();o=s.width()+b.width()+d.outerWidth(true)-d.width();g=N.outerHeight(true);a=N.outerWidth(true);af.css({"padding-bottom":ah,"padding-right":o}).hide();u.click(function(){L.next()});S.click(function(){L.prev()});C.click(function(){L.close()});D=u.add(S).add(v).add(X);d.children().removeClass("hover");J("."+t).live("click",function(ai){if(!((ai.button!==0&&typeof ai.button!=="undefined")||ai.ctrlKey||ai.shiftKey||ai.altKey)){ai.preventDefault();f(this)}});R.click(function(){if(ac.overlayClose){L.close()}});J(n).bind("keydown."+T,function(aj){var ai=aj.keyCode;if(F&&ac.escKey&&ai===27){aj.preventDefault();L.close()}if(F&&ac.arrowKey&&c[1]){if(ai===37){aj.preventDefault();S.click()}else{if(ai===39){aj.preventDefault();u.click()}}}})};L.remove=function(){af.add(R).remove();J("."+t).die("click").removeData(A).removeClass(t)};L.position=function(am,aj){var al,ak=Math.max(n.documentElement.clientHeight-ac.h-g-ah,0)/2+Z.scrollTop(),ai=Math.max(Z.width()-ac.w-a-o,0)/2+Z.scrollLeft();al=(af.width()===ac.w+a&&af.height()===ac.h+g)?0:am;ag[0].style.width=ag[0].style.height="9999px";function an(ao){H[0].style.width=Q[0].style.width=d[0].style.width=ao.style.width;h[0].style.height=h[1].style.height=d[0].style.height=s[0].style.height=b[0].style.height=ao.style.height}af.dequeue().animate({width:ac.w+a,height:ac.h+g,top:ak,left:ai},{duration:al,complete:function(){an(this);Y=false;ag[0].style.width=(ac.w+a+o)+"px";ag[0].style.height=(ac.h+g+ah)+"px";if(aj){aj()}},step:function(){an(this)}})};L.resize=function(ai){if(F){ai=ai||{};if(ai.width){ac.w=O(ai.width,"x")-a-o}if(ai.innerWidth){ac.w=O(ai.innerWidth,"x")}N.css({width:ac.w});if(ai.height){ac.h=O(ai.height,"y")-g-ah}if(ai.innerHeight){ac.h=O(ai.innerHeight,"y")}if(!ai.innerHeight&&!ai.height){var aj=N.wrapInner("<div style='overflow:auto'></div>").children();ac.h=aj.height();aj.replaceWith(aj.children())}N.css({height:ac.h});L.position(ac.transition==="none"?0:ac.speed)}};L.prep=function(ak){if(!F){return}var al=ac.transition==="none"?0:ac.speed;Z.unbind("resize."+T);N.remove();N=P("LoadedContent").html(ak);function ai(){ac.w=ac.w||N.width();ac.w=ac.mw&&ac.mw<ac.w?ac.mw:ac.w;return ac.w}function am(){ac.h=ac.h||N.height();ac.h=ac.mh&&ac.mh<ac.h?ac.mh:ac.h;return ac.h}N.hide().appendTo(m.show()).css({width:ai(),overflow:ac.scrolling?"auto":"hidden"}).css({height:am()}).prependTo(d);m.hide();J(q).css({"float":"none"});if(ae){J("select").not(af.find("select")).filter(function(){return this.style.visibility!=="hidden"}).css({visibility:"hidden"}).one(w,function(){this.style.visibility="inherit"})}function aj(an){L.position(an,function(){var au,av,ar,aq,at=c.length,ap,ao;if(!F){return}ao=function(){h.hide();G(U,ac.onComplete)};if(x){if(q){N.fadeIn(100)}}r.html(ac.title).add(N).show();if(at>1){if(typeof ac.current==="string"){v.html(ac.current.replace(/\{current\}/,I+1).replace(/\{total\}/,at)).show()}u[(ac.loop||I<at-1)?"show":"hide"]().html(ac.next);S[(ac.loop||I)?"show":"hide"]().html(ac.previous);au=I?c[I-1]:c[at-1];ar=I<at-1?c[I+1]:c[0];if(ac.slideshow){X.show()}if(ac.preloading){aq=J.data(ar,A).href||ar.href;av=J.data(au,A).href||au.href;aq=J.isFunction(aq)?aq.call(ar):aq;av=J.isFunction(av)?av.call(au):av;if(E(aq)){J("<img/>")[0].src=aq}if(E(av)){J("<img/>")[0].src=av}}}else{D.hide()}if(ac.iframe){ap=J("<iframe/>").addClass(T+"Iframe")[0];if(ac.fastIframe){ao()}else{J(ap).load(ao)}ap.name=T+(+new Date());ap.src=ac.href;if(!ac.scrolling){ap.scrolling="no"}if(x){ap.frameBorder=0;ap.allowTransparency="true"}J(ap).appendTo(N).one(l,function(){ap.src="//about:blank"})}else{ao()}if(ac.transition==="fade"){af.fadeTo(al,1,function(){af[0].style.filter=""})}else{af[0].style.filter=""}Z.bind("resize."+T,function(){L.position(0)})})}if(ac.transition==="fade"){af.fadeTo(al,0,function(){aj(0)})}else{aj(al)}};L.load=function(ak){var aj,al,ai=L.prep;Y=true;q=false;y=c[I];if(!ak){ad(J.extend(ac,J.data(y,A)))}G(l);G(e,ac.onLoad);ac.h=ac.height?O(ac.height,"y")-g-ah:ac.innerHeight&&O(ac.innerHeight,"y");ac.w=ac.width?O(ac.width,"x")-a-o:ac.innerWidth&&O(ac.innerWidth,"x");ac.mw=ac.w;ac.mh=ac.h;if(ac.maxWidth){ac.mw=O(ac.maxWidth,"x")-a-o;ac.mw=ac.w&&ac.w<ac.mw?ac.w:ac.mw}if(ac.maxHeight){ac.mh=O(ac.maxHeight,"y")-g-ah;ac.mh=ac.h&&ac.h<ac.mh?ac.h:ac.mh}aj=ac.href;h.show();if(ac.inline){P().hide().insertBefore(J(aj)[0]).one(l,function(){J(this).replaceWith(N.children())});ai(J(aj))}else{if(ac.iframe){ai(" ")}else{if(ac.html){ai(ac.html)}else{if(E(aj)){J(q=new Image()).addClass(T+"Photo").error(function(){ac.title=false;ai(P("Error").text("This image could not be loaded"))}).load(function(){var am;q.onload=null;if(ac.scalePhotos){al=function(){q.height-=q.height*am;q.width-=q.width*am};if(ac.mw&&q.width>ac.mw){am=(q.width-ac.mw)/q.width;al()}if(ac.mh&&q.height>ac.mh){am=(q.height-ac.mh)/q.height;al()}}if(ac.h){q.style.marginTop=Math.max(ac.h-q.height,0)/2+"px"}if(c[1]&&(I<c.length-1||ac.loop)){q.style.cursor="pointer";q.onclick=function(){L.next()}}if(x){q.style.msInterpolationMode="bicubic"}setTimeout(function(){ai(q)},1)});setTimeout(function(){q.src=aj},1)}else{if(aj){m.load(aj,function(an,am,ao){ai(am==="error"?P("Error").text("Request unsuccessful: "+ao.statusText):J(this).contents())})}}}}}};L.next=function(){if(!Y&&c[1]&&(I<c.length-1||ac.loop)){I=I<c.length-1?I+1:0;L.load()}};L.prev=function(){if(!Y&&c[1]&&(I||ac.loop)){I=I?I-1:c.length-1;L.load()}};L.close=function(){if(F&&!M){M=true;F=false;G(w,ac.onCleanup);Z.unbind("."+T+" ."+aa);R.fadeTo(200,0);af.stop().fadeTo(300,0,function(){af.add(R).css({opacity:1,cursor:"auto"}).hide();G(l);N.remove();setTimeout(function(){M=false;G(ab,ac.onClosed)},1)})}};L.element=function(){return J(y)};L.settings=K;J(L.init)}(jQuery,document,this));jQuery(document).ready(function(){jQuery("a[class='lightbox_image']").colorbox();jQuery("a[class='lightbox_video']").each(setZoomIcon);jQuery("a[class='lightbox_image']").each(setZoomIcon)});function setZoomIcon(f){if(this.getElementsByTagName("img").length==0){return true}var c="image_icon_play.png";if(this.rel=="lightbox_image"){c="image_icon_zoom.png"}var e;var d=jQuery(this);var a=d.find("img:first");d.append(e=jQuery("<img src='"+themeDir+"/images/"+c+"' class='lb_zoom' />"));var b=a.height();if(a.height()>a.width()){b=a.width()}var h=jQuery(this).offset();e.css({position:"absolute",height:b,width:b});e.offset({left:h.left+Math.round((a.width()-e.width())/2)});if(jQuery.browser.mozilla){e.offset({left:a.offset().left+Math.round((a.width()-e.width())/2)})}if(jQuery.browser.msie){e.offset({top:a.offset().top+Math.round((a.height()-e.height())/2),left:a.offset().left+Math.round((a.width()-e.width())/2)})}if(jQuery.browser.msie){var g=e.offset().left;if(g<0){g=-g}e.offset({left:g+Math.round((a.width()-e.width())/2),top:a.offset().top});e.hide()}else{e.css({opacity:0})}d.hover(function(){var n=jQuery(this).find("img.lb_zoom");if(jQuery.browser.webkit){var l=jQuery(this).find("img:first");var m=l.height();if(l.height()>l.width()){m=l.width()}n.css({width:m+"px",height:m+"px"});n.offset({top:l.offset().top+Math.round((l.height()-n.height())/2),left:l.offset().left+Math.round((l.width()-n.width())/2)})}if(jQuery.browser.opera){var l=jQuery(this).find("img:first");if(parseInt(n.css("top"))<0){n.hide()}}if(jQuery.browser.msie){n.show()}else{n.animate({opacity:1},300)}},function(){if(jQuery.browser.msie){e.hide()}else{e.animate({opacity:0},300)}})}function setForVideo(c){var a=jQuery("#"+c);var b=a.find("div.galleria-thumbnails").find("div.galleria-image");b.unbind("click");b.find("img").bind("click",function(o){var g=a.find(".galleria-stage").width();var r=a.find(".galleria-stage").height();var d=this.src.split("?video=")[1];if(d.indexOf("youtube.com")>0||d.indexOf("vimeo.com")>0){var n=a.find("div.galleria-images").find("div.galleria-image");var m=a.find("galleria-thumbnails-list").find("img");n.each(function(u){var w=m[u].attr("src").split("?video=")[1];if(w.indexOf("youtube.com")>0||w.indexOf("vimeo.com")>0){n[u].html('<iframe frameborder="0" src="'+w+'" width="'+g+'" height="'+r+'"></iframe>')}else{var v={};var s={};var e={};s.id="#vh_"+c;e.moviefile=encodeURIComponent(w);e.autoplay=1;e.wmode="transparent";v.moviefile=encodeURIComponent(w);v.autoplay=1;v.wmode="transparent";var t=themeDir+"/tdplayer.swf";swfobject.embedSWF(t,"vh_"+c,a.find(".galleria-stage").width(),a.find(".galleria-stage").height(),"9",false,e,v,s)}})}else{var l={};var q={};var h={};q.id="#vh_"+c;h.moviefile=encodeURIComponent(d);h.autoplay=1;h.wmode="transparent";l.moviefile=encodeURIComponent(d);l.autoplay=1;l.wmode="transparent";var f=themeDir+"/tdplayer.swf";swfobject.embedSWF(f,"vh_"+c,a.find(".galleria-stage").width(),a.find(".galleria-stage").height(),"9",false,h,l,q)}})}function showGalleryFrame(b){var a=jQuery("#"+b);a.find("div.galleria-images").find("img").each(function(c){var d=this.src.split("?video=")[1];this.parentNode.innerHTML='<iframe scrolling="no" style="z-index: 2 !important; overflow-x: hidden; overflow-y: hidden;" id="gl_video" src="'+themeDir+"/lib/videogallery.php?src="+d+"&theme="+themeDir+'" width="100%" height="100%"></iframe>'});a.find("div.galleria-thumbnails").find("div.galleria-image").unbind("click");a.find("div.galleria-image-nav-right").hide();a.find("div.galleria-image-nav-left").hide();a.find("div.galleria-counter").hide();a.find("div.galleria-thumbnails").find("div.galleria-image").find("img").bind("click",function(){var c=this.src.split("?video=")[1];document.getElementById("gl_video").src=themeDir+"/lib/videogallery.php?src="+c+"&theme="+themeDir})}(function(f){var c,l=this,r=document,e=f(r);var q=false,m=navigator.userAgent.toLowerCase(),d=l.location.hash.replace(/#\//,""),n=function(){return Galleria.TOUCH?"touchstart":"click"},h=(function(){var t=3,u=r.createElement("div");while(u.innerHTML="<!--[if gt IE "+(++t)+"]><i></i><![endif]-->",u.getElementsByTagName("i")[0]){}return t>4?t:c}()),s=function(){return{html:r.documentElement,body:r.body,head:r.getElementsByTagName("head")[0],title:r.title}},b={trunk:{},add:function(x,w,v,u){u=u||false;this.clear(x);if(u){var t=w;w=function(){t();b.add(x,w,v)}}this.trunk[x]=l.setTimeout(w,v)},clear:function(v){var t=function(w){l.clearTimeout(this.trunk[w]);delete this.trunk[w]};if(!!v&&v in this.trunk){t.call(b,v)}else{if(typeof v=="undefined"){for(var u in this.trunk){t.call(b,u)}}}}},a=[],o={fade:function(u,t){f(u.next).css("opacity",0).show().animate({opacity:1},u.speed,t);if(u.prev){f(u.prev).css("opacity",1).show().animate({opacity:0},u.speed)}},flash:function(u,t){f(u.next).css("opacity",0);if(u.prev){f(u.prev).animate({opacity:0},(u.speed/2),function(){f(u.next).animate({opacity:1},u.speed,t)})}else{f(u.next).animate({opacity:1},u.speed,t)}},pulse:function(u,t){if(u.prev){f(u.prev).hide()}f(u.next).css("opacity",0).animate({opacity:1},u.speed,t)},slide:function(x,u){var w=f(x.next).parent(),t=this.$("images"),v=this._stageWidth,y=this.getOptions("easing");w.css({left:v*(x.rewind?-1:1)});t.animate({left:v*(x.rewind?1:-1)},{duration:x.speed,queue:false,easing:y,complete:function(){t.css("left",0);w.css("left",0);u()}})},fadeslide:function(v,u){var t=0,y=this.getOptions("easing"),w=this.getStageWidth();if(v.prev){t=g.parseValue(f(v.prev).css("left"));f(v.prev).css({opacity:1,left:t}).animate({opacity:0,left:t+(w*(v.rewind?1:-1))},{duration:v.speed,queue:false,easing:y})}t=g.parseValue(f(v.next).css("left"));f(v.next).css({left:t+(w*(v.rewind?-1:1)),opacity:0}).animate({opacity:1,left:t},{duration:v.speed,complete:u,queue:false,easing:y})}},g=(function(){return{array:function(t){return Array.prototype.slice.call(t)},create:function(t,v){v=v||"div";var u=r.createElement(v);u.className=t;return u},forceStyles:function(u,t){u=f(u);if(u.attr("style")){u.data("styles",u.attr("style")).removeAttr("style")}u.css(t)},revertStyles:function(){f.each(g.array(arguments),function(t,u){u=f(u).removeAttr("style");if(u.data("styles")){u.attr("style",u.data("styles")).data("styles",null)}})},moveOut:function(t){g.forceStyles(t,{position:"absolute",left:-10000})},moveIn:function(){g.revertStyles.apply(g,g.array(arguments))},hide:function(u,v,w){u=f(u);if(!u.data("opacity")){u.data("opacity",u.css("opacity"))}var t={opacity:0};if(v){u.stop().animate(t,v,w)}else{u.css(t)}},show:function(v,w,x){v=f(v);var u=parseFloat(v.data("opacity"))||1,t={opacity:u};if(u==1){v.data("opacity",null)}if(w){v.stop().animate(t,w,x)}else{v.css(t)}},addTimer:function(){b.add.apply(b,g.array(arguments));return this},clearTimer:function(){b.clear.apply(b,g.array(arguments));return this},wait:function(v){v=f.extend({until:function(){return false},success:function(){},error:function(){Galleria.raise("Could not complete wait function.")},timeout:3000},v);var w=g.timestamp(),t,u;l.setTimeout(function(){u=g.timestamp();t=u-w;if(v.until(t)){v.success();return false}if(u>=w+v.timeout){v.error();return false}l.setTimeout(arguments.callee,2)},2)},toggleQuality:function(t,u){if(!(h==7||h==8)||!!t===false){return}if(typeof u==="undefined"){u=t.style.msInterpolationMode=="nearest-neighbor"}t.style.msInterpolationMode=u?"bicubic":"nearest-neighbor"},insertStyleTag:function(v){var u=r.createElement("style");s().head.appendChild(u);if(u.styleSheet){u.styleSheet.cssText=v}else{var t=r.createTextNode(v);u.appendChild(t)}},loadScript:function(v,x){var t=false,u=f("<script>").attr({src:v,async:true}).get(0);u.onload=u.onreadystatechange=function(){if(!t&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){t=true;if(typeof x=="function"){x.call(this,this)}u.onload=u.onreadystatechange=null}};var w=r.getElementsByTagName("script")[0];w.parentNode.insertBefore(u,w)},parseValue:function(u){if(typeof u=="number"){return u}else{if(typeof u=="string"){var t=u.match(/\-?\d/g);return t&&t.constructor==Array?t.join("")*1:0}else{return 0}}},timestamp:function(){return new Date().getTime()},loadCSS:function(t,y,x){var w,u=false,v;f("link[rel=stylesheet]").each(function(){if(new RegExp(t).test(this.href)){w=this;return false}});if(typeof y=="function"){x=y;y=c}x=x||function(){};if(w){x.call(w,w);return w}v=r.styleSheets.length;if(q){t+="?"+g.timestamp()}if(f("#"+y).length){f("#"+y).attr("href",t);v--;u=true}else{w=f("<link>").attr({rel:"stylesheet",href:t,id:y}).get(0);l.setTimeout(function(){var A=f('link[rel="stylesheet"], style');if(A.length){A.get(0).parentNode.insertBefore(w,A[0])}else{s().head.appendChild(w)}if(h){w.attachEvent("onreadystatechange",function(B){if(w.readyState=="complete"){u=true}})}else{u=true}},10)}if(typeof x=="function"){g.wait({until:function(){return u&&r.styleSheets.length>v},success:function(){g.addTimer("css",function(){x.call(w,w)},100)},error:function(){Galleria.raise("Theme CSS could not load")},timeout:1000})}return w}}})();Galleria=function(){var C=this;this._theme=c;this._options={};this._playing=false;this._playtime=5000;this._active=null;this._queue={length:0};this._data=[];this._dom={};this._thumbnails=[];this._initialized=false;this._stageWidth=0;this._stageHeight=0;this._target=c;this._id=g.timestamp();var x="container stage images image-nav image-nav-left image-nav-right info info-text info-title info-description info-author thumbnails thumbnails-list thumbnails-container thumb-nav-left thumb-nav-right loader counter tooltip",w="current total";f.each(x.split(" "),function(E,F){C._dom[F]=g.create("galleria-"+F)});f.each(w.split(" "),function(E,F){C._dom[F]=g.create("galleria-"+F,"span")});var v=this._keyboard={keys:{UP:38,DOWN:40,LEFT:37,RIGHT:39,RETURN:13,ESCAPE:27,BACKSPACE:8,SPACE:32},map:{},bound:false,press:function(F){var E=F.keyCode||F.which;if(E in v.map&&typeof v.map[E]=="function"){v.map[E].call(C,F)}},attach:function(G){for(var F in G){var E=F.toUpperCase();if(E in v.keys){v.map[v.keys[E]]=G[F]}}if(!v.bound){v.bound=true;e.bind("keydown",v.press)}},detach:function(){v.bound=false;e.unbind("keydown",v.press)}};var A=this._controls={0:c,1:c,active:0,swap:function(){A.active=A.active?0:1},getActive:function(){return A[A.active]},getNext:function(){return A[1-A.active]}};var B=this._carousel={next:C.$("thumb-nav-right"),prev:C.$("thumb-nav-left"),width:0,current:0,max:0,hooks:[],update:function(){var F=0,G=0,E=[0];f.each(C._thumbnails,function(I,H){if(H.ready){F+=H.outerWidth||f(H.container).outerWidth(true);E[I+1]=F;G=Math.max(G,H.outerHeight||f(H.container).outerHeight(true))}});C.$("thumbnails").css({width:F,height:G});B.max=F;B.hooks=E;B.width=C.$("thumbnails-list").width();B.setClasses();C.$("thumbnails-container").toggleClass("galleria-carousel",F>B.width)},bindControls:function(){B.next.bind(n(),function(F){F.preventDefault();if(C._options.carousel_steps=="auto"){for(var E=B.current;E<B.hooks.length;E++){if(B.hooks[E]-B.hooks[B.current]>B.width){B.set(E-2);break}}}else{B.set(B.current+C._options.carousel_steps)}});B.prev.bind(n(),function(F){F.preventDefault();if(C._options.carousel_steps=="auto"){for(var E=B.current;E>=0;E--){if(B.hooks[B.current]-B.hooks[E]>B.width){B.set(E+2);break}else{if(E==0){B.set(0);break}}}}else{B.set(B.current-C._options.carousel_steps)}})},set:function(E){E=Math.max(E,0);while(B.hooks[E-1]+B.width>B.max&&E>=0){E--}B.current=E;B.animate()},getLast:function(E){return(E||B.current)-1},follow:function(E){if(E==0||E==B.hooks.length-2){B.set(E);return}var F=B.current;while(B.hooks[F]-B.hooks[B.current]<B.width&&F<=B.hooks.length){F++}if(E-1<B.current){B.set(E-1)}else{if(E+2>F){B.set(E-F+B.current+2)}}},setClasses:function(){B.prev.toggleClass("disabled",!B.current);B.next.toggleClass("disabled",B.hooks[B.current]+B.width>B.max)},animate:function(F){B.setClasses();var E=B.hooks[B.current]*-1;if(isNaN(E)){return}C.$("thumbnails").animate({left:E},{duration:C._options.carousel_speed,easing:C._options.easing,queue:false})}};var D=this._tooltip={initialized:false,open:false,init:function(){D.initialized=true;var E=".galleria-tooltip{padding:3px 8px;max-width:50%;background:#ffe;color:#000;z-index:3;position:absolute;font-size:11px;line-height:1.3opacity:0;box-shadow:0 0 2px rgba(0,0,0,.4);-moz-box-shadow:0 0 2px rgba(0,0,0,.4);-webkit-box-shadow:0 0 2px rgba(0,0,0,.4);}";g.insertStyleTag(E);C.$("tooltip").css("opacity",0.8);g.hide(C.get("tooltip"))},move:function(L){var K=C.getMousePosition(L).x,J=C.getMousePosition(L).y,H=C.$("tooltip"),N=K,M=J,O=H.outerHeight(true)+1,G=H.outerWidth(true),I=O+15;var F=C.$("container").width()-G-2,E=C.$("container").height()-O-2;if(!isNaN(N)&&!isNaN(M)){N+=10;M-=30;N=Math.max(0,Math.min(F,N));M=Math.max(0,Math.min(E,M));if(J<I){M=I}H.css({left:N,top:M})}},bind:function(F,G){if(!D.initialized){D.init()}var E=function(H,I){D.define(H,I);f(H).hover(function(){g.clearTimer("switch_tooltip");C.$("container").unbind("mousemove",D.move).bind("mousemove",D.move).trigger("mousemove");D.show(H);Galleria.utils.addTimer("tooltip",function(){C.$("tooltip").stop();g.show(C.get("tooltip"),400);D.open=true},D.open?0:1000)},function(){C.$("container").unbind("mousemove",D.move);g.clearTimer("tooltip");C.$("tooltip").stop();g.hide(C.get("tooltip"),200,function(){g.addTimer("switch_tooltip",function(){D.open=false},1000)})})};if(typeof G=="string"){E((F in C._dom?C.get(F):F),G)}else{f.each(F,function(H,I){E(C.get(H),I)})}},show:function(E){E=f(E in C._dom?C.get(E):E);var F=E.data("tt");if(!F){return}F=typeof F=="function"?F():F;C.$("tooltip").html(F.replace(/\s/,"&nbsp;"));E.bind("mouseup",function(G){l.setTimeout((function(H){return function(){D.move(H)}})(G),10);E.unbind("mouseup",arguments.callee)})},define:function(F,G){if(typeof G!=="function"){var E=G;G=function(){return E}}F=f(F in C._dom?C.get(F):F).data("tt",G);D.show(F)}};var y=this._fullscreen={scrolled:0,enter:function(F){g.hide(C.getActiveImage());C.$("container").addClass("fullscreen");y.scrolled=f(l).scrollTop();g.forceStyles(C.get("container"),{position:"fixed",top:0,left:0,width:"100%",height:"100%",zIndex:10000});var E={height:"100%",overflow:"hidden",margin:0,padding:0};g.forceStyles(s().html,E);g.forceStyles(s().body,E);C.attachKeyboard({escape:C.exitFullscreen,right:C.next,left:C.prev});C.rescale(function(){g.addTimer("fullscreen_enter",function(){g.show(C.getActiveImage());if(typeof F=="function"){F.call(C)}},100);C.trigger(Galleria.FULLSCREEN_ENTER)});f(l).resize(function(){y.scale()})},scale:function(){C.rescale()},exit:function(E){g.hide(C.getActiveImage());C.$("container").removeClass("fullscreen");g.revertStyles(C.get("container"),s().html,s().body);l.scrollTo(0,y.scrolled);C.detachKeyboard();C.rescale(function(){g.addTimer("fullscreen_exit",function(){g.show(C.getActiveImage());if(typeof E=="function"){E.call(C)}},50);C.trigger(Galleria.FULLSCREEN_EXIT)});f(l).unbind("resize",y.scale)}};var u=this._idle={trunk:[],bound:false,add:function(F,H){if(!F){return}if(!u.bound){u.addEvent()}F=f(F);var G={};for(var E in H){G[E]=F.css(E)}F.data("idle",{from:G,to:H,complete:true,busy:false});u.addTimer();u.trunk.push(F)},remove:function(E){E=jQuery(E);f.each(u.trunk,function(F,G){if(G.length&&!G.not(E).length){C._idle.show(E);C._idle.trunk.splice(F,1)}});if(!u.trunk.length){u.removeEvent();g.clearTimer("idle")}},addEvent:function(){u.bound=true;C.$("container").bind("mousemove click",u.showAll)},removeEvent:function(){u.bound=false;C.$("container").unbind("mousemove click",u.showAll)},addTimer:function(){g.addTimer("idle",function(){C._idle.hide()},C._options.idle_time)},hide:function(){C.trigger(Galleria.IDLE_ENTER);f.each(u.trunk,function(E,F){var G=F.data("idle");if(!G){return}F.data("idle").complete=false;F.stop().animate(G.to,{duration:600,queue:false,easing:"swing"})})},showAll:function(){g.clearTimer("idle");f.each(C._idle.trunk,function(E,F){C._idle.show(F)})},show:function(E){var F=E.data("idle");if(!F.busy&&!F.complete){F.busy=true;C.trigger(Galleria.IDLE_EXIT);g.clearTimer("idle");E.stop().animate(F.from,{duration:300,queue:false,easing:"swing",complete:function(){f(this).data("idle").busy=false;f(this).data("idle").complete=true}})}u.addTimer()}};var t=this._lightbox={width:0,height:0,initialized:false,active:null,image:null,elems:{},init:function(){C.trigger(Galleria.LIGHTBOX_OPEN);if(t.initialized){return}t.initialized=true;var E="overlay box content shadow title info close prevholder prev nextholder next counter image",H={},J=C._options,F="",I={overlay:"position:fixed;display:none;opacity:"+J.overlay_opacity+";top:0;left:0;width:100%;height:100%;background:"+J.overlay_background+";z-index:99990",box:"position:fixed;display:none;width:400px;height:400px;top:50%;left:50%;margin-top:-200px;margin-left:-200px;z-index:99991",shadow:"position:absolute;background:#000;width:100%;height:100%;",content:"position:absolute;background-color:#fff;top:10px;left:10px;right:10px;bottom:10px;overflow:hidden",info:"position:absolute;bottom:10px;left:10px;right:10px;color:#444;font:11px/13px arial,sans-serif;height:13px",close:"position:absolute;top:10px;right:10px;height:20px;width:20px;background:#fff;text-align:center;cursor:pointer;color:#444;font:16px/22px arial,sans-serif;z-index:99999",image:"position:absolute;top:10px;left:10px;right:10px;bottom:30px;overflow:hidden",prevholder:"position:absolute;width:50%;height:100%;cursor:pointer",nextholder:"position:absolute;width:50%;height:100%;right:0;cursor:pointer",prev:"position:absolute;top:50%;margin-top:-20px;height:40px;width:30px;background:#fff;left:20px;display:none;line-height:40px;text-align:center;color:#000",next:"position:absolute;top:50%;margin-top:-20px;height:40px;width:30px;background:#fff;right:20px;left:auto;display:none;line-height:40px;text-align:center;color:#000",title:"float:left",counter:"float:right;margin-left:8px"},G=function(K){return K.hover(function(){f(this).css("color","#bbb")},function(){f(this).css("color","#444")})};f.each(I,function(K,L){F+=".galleria-lightbox-"+K+"{"+L+"}"});g.insertStyleTag(F);f.each(E.split(" "),function(K,L){C.addElement("lightbox-"+L);H[L]=t.elems[L]=C.get("lightbox-"+L)});t.image=new Galleria.Picture();C.append({"lightbox-box":["lightbox-shadow","lightbox-content","lightbox-close","lightbox-prevholder","lightbox-nextholder"],"lightbox-info":["lightbox-title","lightbox-counter"],"lightbox-content":["lightbox-info","lightbox-image"],"lightbox-prevholder":"lightbox-prev","lightbox-nextholder":"lightbox-next"});f(H.image).append(t.image.container);f(s().body).append(H.overlay,H.box);G(f(H.close).bind(n(),t.hide).html("&#215;"));f.each(["Prev","Next"],function(M,K){var L=f(H[K.toLowerCase()]).html(/v/.test(K)?"‹&nbsp;":"&nbsp;›");f(H[K.toLowerCase()+"holder"]).hover(function(){L.show()},function(){L.fadeOut(200)}).bind(n(),function(){t["show"+K]()})});f(H.overlay).bind(n(),t.hide)},rescale:function(I){var H=Math.min(f(l).width()-40,t.width),E=Math.min(f(l).height()-60,t.height),G=Math.min(H/t.width,E/t.height),F=(t.width*G)+40,K=(t.height*G)+60,J={width:F,height:K,marginTop:Math.ceil(K/2)*-1,marginLeft:Math.ceil(F/2)*-1};if(I){f(t.elems.box).css(J)}else{f(t.elems.box).animate(J,C._options.lightbox_transition_speed,C._options.easing,function(){var M=t.image,L=C._options.lightbox_fade_speed;C.trigger({type:Galleria.LIGHTBOX_IMAGE,imageTarget:M.image});M.show();g.show(M.image,L);g.show(t.elems.info,L)})}},hide:function(){t.image.image=null;f(l).unbind("resize",t.rescale);f(t.elems.box).hide();g.hide(t.elems.info);g.hide(t.elems.overlay,200,function(){f(this).hide().css("opacity",C._options.overlay_opacity);C.trigger(Galleria.LIGHTBOX_CLOSE)})},showNext:function(){t.show(C.getNext(t.active))},showPrev:function(){t.show(C.getPrev(t.active))},show:function(E){t.active=E=typeof E=="number"?E:C.getIndex();if(!t.initialized){t.init()}f(l).unbind("resize",t.rescale);var G=C.getData(E),F=C.getDataLength();g.hide(t.elems.info);t.image.load(G.image,function(H){t.width=H.original.width;t.height=H.original.height;f(H.image).css({width:"100.5%",height:"100.5%",top:0,zIndex:99998,opacity:0});t.elems.title.innerHTML=G.title;t.elems.counter.innerHTML=(E+1)+" / "+F;f(l).resize(t.rescale);t.rescale()});f(t.elems.overlay).show();f(t.elems.box).show()}};return this};Galleria.prototype={constructor:Galleria,init:function(v,u){var t=this;a.push(this);this._original={target:v,options:u,data:null};this._target=this._dom.target=v.nodeName?v:f(v).get(0);if(!this._target){Galleria.raise("Target not found.");return}this._options={autoplay:false,carousel:true,carousel_follow:true,carousel_speed:400,carousel_steps:"auto",clicknext:false,data_config:function(w){return{}},data_selector:"img",data_source:this._target,debug:c,easing:"galleria",extend:function(w){},height:"auto",idle_time:3000,image_crop:false,image_margin:0,image_pan:false,image_pan_smoothness:12,image_position:"50%",keep_source:false,lightbox_fade_speed:200,lightbox_transition_speed:500,link_source_images:true,max_scale_ratio:c,min_scale_ratio:c,on_image:function(x,w){},overlay_opacity:0.85,overlay_background:"#0b0b0b",pause_on_interaction:true,popup_links:false,preload:2,queue:true,show:0,show_info:true,show_counter:true,show_imagenav:true,thumb_crop:true,thumb_event_type:n(),thumb_fit:true,thumb_margin:0,thumb_quality:"auto",thumbnails:true,transition:"fade",transition_initial:c,transition_speed:400,width:"auto"};if(u&&u.debug===true){q=true}f(this._target).children().hide();if(Galleria.theme){this._init()}else{g.addTimer("themeload",function(){Galleria.raise("No theme found.",true)},2000);e.one(Galleria.THEMELOAD,function(){g.clearTimer("themeload");t._init.call(t)})}},_init:function(){var t=this;if(this._initialized){Galleria.raise("Init failed: Gallery instance already initialized.");return this}this._initialized=true;if(!Galleria.theme){Galleria.raise("Init failed: No theme found.");return this}f.extend(true,this._options,Galleria.theme.defaults,this._original.options);this.bind(Galleria.DATA,function(){this._original.data=this._data;this.get("total").innerHTML=this.getDataLength();var x=this.$("container");var w={width:0,height:0};var v=g.create("galleria-image");g.wait({until:function(){f.each(["width","height"],function(B,A){if(t._options[A]&&typeof t._options[A]=="number"){w[A]=t._options[A]}else{w[A]=g.parseValue(x.css(A))||g.parseValue(t.$("target").css(A))||x[A]()||t.$("target")[A]()}});var y=function(){return true};if(t._options.thumbnails){t.$("thumbnails").append(v);y=function(){return !!f(v).height()}}return y()&&w.width&&w.height>50},success:function(){f(v).remove();x.width(w.width);x.height(w.height);if(Galleria.WEBKIT){l.setTimeout(function(){t._run()},1)}else{t._run()}},error:function(){Galleria.raise("Width & Height not found.",true)},timeout:2000})});var u=false;this.bind(Galleria.READY,function(){g.show(this.get("counter"));if(this._options.clicknext){f.each(this._data,function(v,w){delete w.link});this.$("stage").css({cursor:"pointer"}).bind(n(),function(v){t.next()})}if(this._options.carousel){this._carousel.bindControls()}if(this._options.autoplay){this.pause();if(typeof this._options.autoplay=="number"){this._playtime=this._options.autoplay}this.trigger(Galleria.PLAY);this._playing=true}if(u){if(typeof this._options.show=="number"){this.show(this._options.show)}return}u=true;if(Galleria.History){Galleria.History.change(function(v){var w=parseInt(v.value.replace(/\//,""));if(isNaN(w)){l.history.go(-1)}else{t.show(w,c,true)}})}Galleria.theme.init.call(this,this._options);this._options.extend.call(this,this._options);if(/^[0-9]{1,4}$/.test(d)&&Galleria.History){this.show(d,c,true)}else{this.show(this._options.show)}});this.append({"info-text":["info-title","info-description","info-author"],info:["info-text"],"image-nav":["image-nav-right","image-nav-left"],stage:["images","loader","counter","image-nav"],"thumbnails-list":["thumbnails"],"thumbnails-container":["thumb-nav-left","thumbnails-list","thumb-nav-right"],container:["stage","thumbnails-container","info","tooltip"]});g.hide(this.$("counter").append(this.get("current")," / ",this.get("total")));this.setCounter("&#8211;");f.each(new Array(2),function(v){var w=new Galleria.Picture();f(w.container).css({position:"absolute",top:0,left:0});t.$("images").append(w.container);t._controls[v]=w});this.$("images").css({position:"relative",top:0,left:0,width:"100%",height:"100%"});this.$("thumbnails, thumbnails-list").css({overflow:"hidden",position:"relative"});this.$("image-nav-right, image-nav-left").bind(n(),function(w){if(t._options.clicknext){w.stopPropagation()}if(t._options.pause_on_interaction){t.pause()}var v=/right/.test(this.className)?"next":"prev";t[v]()});f.each(["info","counter","image-nav"],function(v,w){if(t._options["show_"+w.replace(/-/,"")]===false){g.moveOut(t.get(w))}});this.load();if(!this._options.keep_source&&!h){this._target.innerHTML=""}this.$("target").append(this.get("container"));if(this._options.carousel){this.bind(Galleria.THUMBNAIL,function(){this.updateCarousel()})}this.bind(Galleria.IMAGE,function(v){this._options.on_image.call(this,v.imageTarget,v.thumbTarget)});return this},_run:function(){var E=this,w=this._options,v=0,C=0,x=typeof w.thumbnails=="string"?w.thumbnails.toLowerCase():null;for(var A=0;this._data[A];A++){var u,y=this._data[A],D;if(w.thumbnails===true){u=new Galleria.Picture(A);var t=y.thumb||y.image;this.$("thumbnails").append(u.container);D=f(u.container);var B=function(F){return r.defaultView&&r.defaultView.getComputedStyle?r.defaultView.getComputedStyle(u.container,null)[F]:D.css(F)};u.data={width:g.parseValue(B("width")),height:g.parseValue(B("height")),order:A};D.css((w.thumb_fit&&w.thumb_crop!==true)?{width:0,height:0}:{width:u.data.width,height:u.data.height});u.load(t,function(F){F.scale({width:F.data.width,height:F.data.height,crop:w.thumb_crop,margin:w.thumb_margin,complete:function(H){var I=["left","top"];var G=["Width","Height"];f.each(G,function(L,M){var J=M.toLowerCase();if((w.thumb_crop!==true||w.thumb_crop==J)&&w.thumb_fit){var K={};K[J]=H[J];f(H.container).css(K);K={};K[I[L]]=0;f(H.image).css(K)}H["outer"+M]=f(H.container)["outer"+M](true)});g.toggleQuality(H.image,w.thumb_quality===true||(w.thumb_quality=="auto"&&H.original.width<H.width*3));E.trigger({type:Galleria.THUMBNAIL,thumbTarget:H.image,index:H.data.order})}})});if(w.preload=="all"){u.add(y.image)}}else{if(x=="empty"||x=="numbers"){u={container:g.create("galleria-image"),image:g.create("img","span"),ready:true};if(x=="numbers"){f(u.image).text(A+1)}this.$("thumbnails").append(u.container);l.setTimeout((function(H,G,F){return function(){f(F).append(H);E.trigger({type:Galleria.THUMBNAIL,thumbTarget:H,index:G})}})(u.image,A,u.container),50+(A*20))}else{u={container:null,image:null}}}f(u.container).add(w.keep_source&&w.link_source_images?y.original:null).data("index",A).bind(w.thumb_event_type,function(G){if(w.pause_on_interaction){E.pause()}var F=f(G.currentTarget).data("index");if(E.getIndex()!==F){E.show(F)}G.preventDefault()});this._thumbnails.push(u)}g.wait({until:function(){E._stageWidth=E.$("stage").width();E._stageHeight=E.$("stage").height();return(E._stageWidth&&E._stageHeight>50)},success:function(){E.trigger(Galleria.READY)},error:function(){Galleria.raise("stage meassures not found")}})},load:function(w,t,v){var u=this;this._data=[];this._thumbnails=[];this.$("thumbnails").empty();if(typeof t=="function"){v=t;t=null}w=w||this._options.data_source;t=t||this._options.data_selector;v=v||this._options.data_config;if(w.constructor==Array){if(this.validate(w)){this._data=w;this.trigger(Galleria.DATA)}else{Galleria.raise("Load failed: JSON Array not valid.")}return this}f(w).find(t).each(function(A,y){var C={},y=f(y),B=y.parent(),x=B.attr("href");if(/\.(png|gif|jpg|jpeg)$/i.test(x)){C.image=x}else{if(x){C.link=x}}u._data.push(f.extend({title:y.attr("title"),thumb:y.attr("src"),image:y.attr("src"),description:y.attr("alt"),link:y.attr("longdesc"),original:y.get(0)},C,v(y)))});if(this.getDataLength()){this.trigger(Galleria.DATA)}else{Galleria.raise("Load failed: no data found.")}return this},_getActive:function(){return this._controls.getActive()},validate:function(t){return true},bind:function(u,t){this.$("container").bind(u,this.proxy(t));return this},unbind:function(t){this.$("container").unbind(t);return this},trigger:function(t){t=typeof t=="object"?f.extend(t,{scope:this}):{type:t,scope:this};this.$("container").trigger(t);return this},addIdleState:function(u,t){this._idle.add.apply(this._idle,g.array(arguments));return this},removeIdleState:function(t){this._idle.remove.apply(this._idle,g.array(arguments));return this},enterIdleMode:function(){this._idle.hide();return this},exitIdleMode:function(){this.idle._show();return this},enterFullscreen:function(t){this._fullscreen.enter.apply(this,g.array(arguments));return this},exitFullscreen:function(t){this._fullscreen.exit.apply(this,g.array(arguments));return this},bindTooltip:function(t,u){this._tooltip.bind.apply(this._tooltip,g.array(arguments));return this},defineTooltip:function(t,u){this._tooltip.define.apply(this._tooltip,g.array(arguments));return this},refreshTooltip:function(){this._tooltip.show.apply(this._tooltip,g.array(arguments));return this},openLightbox:function(){this._lightbox.show.apply(this._lightbox,g.array(arguments));return this},closeLightbox:function(){this._lightbox.hide.apply(this._lightbox,g.array(arguments));return this},getActiveImage:function(){return this._getActive().image||c},getActiveThumb:function(){return this._thumbnails[this._active].image||c},getMousePosition:function(t){return{x:t.pageX-this.$("container").offset().left,y:t.pageY-this.$("container").offset().top}},addPan:function(C){if(this._options.image_crop===false){return}C=f(C||this.getActiveImage());var K=this,J=C.width()/2,H=C.height()/2,v=destX=parseInt(C.css("left"))||0,u=destY=parseInt(C.css("top"))||0,I=0,G=0,A=false,F=g.timestamp(),t=0,w=0,E=function(L,y,M){if(L>0){w=Math.round(Math.max(L*-1,Math.min(0,y)));if(t!=w){t=w;if(h==8){C.parent()["scroll"+M](w*-1)}else{var x={};x[M.toLowerCase()]=w;C.css(x)}}}},B=function(x){if(g.timestamp()-F<50){return}A=true;J=K.getMousePosition(x).x;H=K.getMousePosition(x).y},D=function(x){if(!A){return}I=C.width()-K._stageWidth;G=C.height()-K._stageHeight;destX=J/K._stageWidth*I*-1;destY=H/K._stageHeight*G*-1;v+=(destX-v)/K._options.image_pan_smoothness;u+=(destY-u)/K._options.image_pan_smoothness;E(G,u,"Top");E(I,v,"Left")};if(h==8){C.parent().scrollTop(u*-1).scrollLeft(v*-1);C.css({top:0,left:0})}this.$("stage").unbind("mousemove",B).bind("mousemove",B);g.addTimer("pan",D,50,true);return this},proxy:function(u,t){if(typeof u!=="function"){return function(){}}t=t||this;return function(){return u.apply(t,g.array(arguments))}},removePan:function(){if(h==8){}this.$("stage").unbind("mousemove");g.clearTimer("pan");return this},addElement:function(u){var t=this._dom;f.each(g.array(arguments),function(w,v){t[v]=g.create("galleria-"+v)});return this},attachKeyboard:function(t){this._keyboard.attach.apply(this._keyboard,g.array(arguments));return this},detachKeyboard:function(){this._keyboard.detach.apply(this._keyboard,g.array(arguments));return this},appendChild:function(u,t){this.$(u).append(this.get(t)||t);return this},prependChild:function(u,t){this.$(u).prepend(this.get(t)||t);return this},remove:function(t){this.$(g.array(arguments).join(",")).remove();return this},append:function(v){for(var u in v){if(v[u].constructor==Array){for(var t=0;v[u][t];t++){this.appendChild(u,v[u][t])}}else{this.appendChild(u,v[u])}}return this},_scaleImage:function(u,t){t=f.extend({width:this._stageWidth,height:this._stageHeight,crop:this._options.image_crop,max:this._options.max_scale_ratio,min:this._options.min_scale_ratio,margin:this._options.image_margin,position:this._options.image_position},t);(u||this._controls.getActive()).scale(t);return this},updateCarousel:function(){this._carousel.update();return this},rescale:function(w,t,u){var v=this;if(typeof w=="function"){u=w;w=c}var x=function(){var y=v._options;v._stageWidth=w||v.$("stage").width();v._stageHeight=t||v.$("stage").height();v._scaleImage();if(v._options.carousel){v.updateCarousel()}v.trigger(Galleria.RESCALE);if(typeof u=="function"){u.call(v)}};if(Galleria.WEBKIT&&!w&&!t){g.addTimer("scale",x,5)}else{x.call(v)}return this},refreshImage:function(){this._scaleImage();if(this._options.image_pan){this.addPan()}return this},show:function(u,t,v){if(u===false||!this._options.queue&&this._queue.stalled){return}u=Math.max(0,Math.min(parseInt(u),this.getDataLength()-1));t=typeof t!="undefined"?!!t:u<this.getIndex();v=v||false;if(!v&&Galleria.History){Galleria.History.value(u.toString());return}this._active=u;Array.prototype.push.call(this._queue,{index:u,rewind:t});if(!this._queue.stalled){this._show()}return this},_show:function(){var G=this,E=this._queue[0],C=this.getData(E.index);if(!C){return}var t=C.image,A=this._controls.getActive(),D=this._controls.getNext(),y=D.isCached(t),u=this._thumbnails[E.index];var w=function(){G._queue.stalled=false;g.toggleQuality(D.image,G._options.image_quality);f(A.container).css({zIndex:0,opacity:0});f(D.container).css({zIndex:1,opacity:1});G._controls.swap();if(G._options.image_pan){G.addPan(D.image)}if(C.link){f(D.image).css({cursor:"pointer"}).bind(n(),function(){if(G._options.popup_links){var H=l.open(C.link,"_blank")}else{l.location.href=C.link}})}Array.prototype.shift.call(G._queue);if(G._queue.length){G._show()}G._playCheck();G.trigger({type:Galleria.IMAGE,index:E.index,imageTarget:D.image,thumbTarget:u.image})};if(this._options.carousel&&this._options.carousel_follow){this._carousel.follow(E.index)}if(this._options.preload){var v,x=this.getNext();try{for(var B=this._options.preload;B>0;B--){v=new Galleria.Picture();v.add(G.getData(x).image);x=G.getNext(x)}}catch(F){}}g.show(D.container);f(G._thumbnails[E.index].container).addClass("active").siblings(".active").removeClass("active");G.trigger({type:Galleria.LOADSTART,cached:y,index:E.index,imageTarget:D.image,thumbTarget:u.image});D.load(t,function(H){G._scaleImage(H,{complete:function(I){g.show(I.container);if("image" in A){g.toggleQuality(A.image,false)}g.toggleQuality(I.image,false);G._queue.stalled=true;G.removePan();G.setInfo(E.index);G.setCounter(E.index);G.trigger({type:Galleria.LOADFINISH,cached:y,index:E.index,imageTarget:I.image,thumbTarget:G._thumbnails[E.index].image});var K=A.image===null&&G._options.transition_initial?G._options.transition_initial:G._options.transition;if(K in o===false){w()}else{var J={prev:A.image,next:I.image,rewind:E.rewind,speed:G._options.transition_speed||400};o[K].call(G,J,w)}}})})},getNext:function(t){t=typeof t=="number"?t:this.getIndex();return t==this.getDataLength()-1?0:t+1},getPrev:function(t){t=typeof t=="number"?t:this.getIndex();return t===0?this.getDataLength()-1:t-1},next:function(){if(this.getDataLength()>1){this.show(this.getNext(),false)}return this},prev:function(){if(this.getDataLength()>1){this.show(this.getPrev(),true)}return this},get:function(t){return t in this._dom?this._dom[t]:null},getData:function(t){return t in this._data?this._data[t]:this._data[this._active]},getDataLength:function(){return this._data.length},getIndex:function(){return typeof this._active==="number"?this._active:false},getStageHeight:function(){return this._stageHeight},getStageWidth:function(){return this._stageWidth},getOptions:function(t){return typeof t=="undefined"?this._options:this._options[t]},setOptions:function(t,u){if(typeof t=="object"){f.extend(this._options,t)}else{this._options[t]=u}return this},play:function(t){this._playing=true;this._playtime=t||this._playtime;this._playCheck();this.trigger(Galleria.PLAY);return this},pause:function(){this._playing=false;this.trigger(Galleria.PAUSE);return this},playToggle:function(t){return(this._playing)?this.pause():this.play(t)},isPlaying:function(){return this._playing},_playCheck:function(){var u=this,x=0,t=20,v=g.timestamp();if(this._playing){g.clearTimer("play");var w=function(){x=g.timestamp()-v;if(x>=u._playtime&&u._playing){g.clearTimer("play");u.next();return}if(u._playing){u.trigger({type:Galleria.PROGRESS,percent:Math.ceil(x/u._playtime*100),seconds:Math.floor(x/1000),milliseconds:x});g.addTimer("play",w,t)}};g.addTimer("play",w,t)}},setIndex:function(t){this._active=t;return this},setCounter:function(u){if(typeof u=="number"){u++}else{if(typeof u=="undefined"){u=this.getIndex()+1}}this.get("current").innerHTML=u;if(h==8){var t=this.$("counter").css("opacity");this.$("counter").css("opacity",t)}return this},setInfo:function(u){var t=this,v=this.getData(u);f.each(["title","description","author"],function(w,x){var y=t.$("info-"+x);if(!!v[x]){y[v[x].length?"show":"hide"]().html(v[x])}else{y.empty().hide()}});return this},hasInfo:function(u){var w=this.getData(u);var t="title description".split(" ");for(var v=0;t[v];v++){if(!!this.getData(u)[t[v]]){return true}}return false},jQuery:function(w){var t=this,u=[];f.each(w.split(","),function(x,y){y=f.trim(y);if(t.get(y)){u.push(y)}});var v=f(t.get(u.shift()));f.each(u,function(x,y){v=v.add(t.get(y))});return v},$:function(){return this.jQuery.apply(this,g.array(arguments))}};f.extend(Galleria,{DATA:"g_data",READY:"g_ready",THUMBNAIL:"g_thumbnail",LOADSTART:"g_loadstart",LOADFINISH:"g_loadfinish",IMAGE:"g_image",THEMELOAD:"g_themeload",PLAY:"g_play",PAUSE:"g_pause",PROGRESS:"g_progress",FULLSCREEN_ENTER:"g_fullscreen_enter",FULLSCREEN_EXIT:"g_fullscreen_exit",IDLE_ENTER:"g_idle_enter",IDLE_EXIT:"g_idle_exit",RESCALE:"g_rescale",LIGHTBOX_OPEN:"g_lightbox_open",LIGHTBOX_CLOSE:"g_lightbox_close",LIGHTBOX_IMAGE:"g_lightbox_image",IE9:h==9,IE8:h==8,IE7:h==7,IE6:h==6,IE:!!h,WEBKIT:/webkit/.test(m),SAFARI:/safari/.test(m),CHROME:/chrome/.test(m),QUIRK:(h&&r.compatMode&&r.compatMode=="BackCompat"),MAC:/mac/.test(navigator.platform.toLowerCase()),OPERA:!!l.opera,IPHONE:/iphone/.test(m),IPAD:/ipad/.test(m),ANDROID:/android/.test(m),TOUCH:!!(/iphone/.test(m)||/ipad/.test(m)||/android/.test(m))});Galleria.addTheme=function(u){if(!!u.name===false){Galleria.raise("No theme name specified")}if(typeof u.defaults!="object"){u.defaults={}}if(typeof u.css=="string"){var t;f("script").each(function(w,v){var x=new RegExp("galleria\\."+u.name.toLowerCase()+"\\.");if(x.test(v.src)){t=v.src.replace(/[^\/]*$/,"")+u.css;g.addTimer("css",function(){g.loadCSS(t,"galleria-theme",function(){Galleria.theme=u;e.trigger(Galleria.THEMELOAD)})},1)}});if(!t){Galleria.raise("No theme CSS loaded")}}else{Galleria.theme=u;e.trigger(Galleria.THEMELOAD)}return u};Galleria.loadTheme=function(w,u){var t=false,v=a.length;Galleria.theme=c;g.loadScript(w,function(){t=true});g.wait({until:function(){return t},error:function(){Galleria.raise("Theme at "+w+" could not load, check theme path.",true)},success:function(){if(v){var x=[];f.each(Galleria.get(),function(A,y){var C=f.extend(y._original.options,{data_source:y._data},u);y.$("container").remove();var B=new Galleria();B._id=y._id;B.init(y._original.target,C);x.push(B)});a=x}},timeout:2000})};Galleria.get=function(t){if(!!a[t]){return a[t]}else{if(typeof t!=="number"){return a}else{Galleria.raise("Gallery index "+t+" not found")}}};Galleria.addTransition=function(t,u){o[t]=u};Galleria.utils=g;Galleria.log=function(){try{l.console.log.apply(l.console,g.array(arguments))}catch(t){try{opera.postError.apply(opera,arguments)}catch(u){alert(g.array(arguments).split(", "))}}};Galleria.raise=function(v,u){if(q||u){var t=u?"Fatal error":"Error";throw new Error(t+": "+v)}};Galleria.Picture=function(t){this.id=t||null;this.image=null;this.container=g.create("galleria-image");f(this.container).css({overflow:"hidden",position:"relative"});this.original={width:0,height:0};this.ready=false;this.loaded=false};Galleria.Picture.prototype={cache:{},add:function(v){var t=this;var u=new Image();f(u).css("display","block");if(t.cache[v]){u.src=v;t.loaded=true;t.original={height:u.height,width:u.width};return u}u.onload=function(){t.original={height:this.height,width:this.width};t.cache[v]=v;t.loaded=true};u.src=v;return u},show:function(){g.show(this.image)},hide:function(){g.moveOut(this.image)},clear:function(){this.image=null},isCached:function(t){return !!this.cache[t]},load:function(u,v){var t=this;f(this.container).empty(true);this.image=this.add(u);g.hide(this.image);f(this.container).append(this.image);g.wait({until:function(){return t.loaded&&t.image.complete&&t.image.width},success:function(){l.setTimeout(function(){v.call(t,t)},50)},error:function(){l.setTimeout(function(){v.call(t,t)},50);Galleria.raise("image not loaded in 10 seconds: "+u)},timeout:10000});return this.container},scale:function(v){v=f.extend({width:0,height:0,min:c,max:c,margin:0,complete:function(){},position:"center",crop:false},v);if(!this.image){return this.container}var w,t,u=this,x=f(u.container);g.wait({until:function(){w=v.width||x.width()||g.parseValue(x.css("width"));t=v.height||x.height()||g.parseValue(x.css("height"));return w&&t},success:function(){var D=(w-v.margin*2)/u.original.width,y=(t-v.margin*2)/u.original.height,F={"true":Math.max(D,y),width:D,height:y,"false":Math.min(D,y)},B=F[v.crop.toString()];if(v.max){B=Math.min(v.max,B)}if(v.min){B=Math.max(v.min,B)}f(u.container).width(w).height(t);f.each(["width","height"],function(I,H){f(u.image)[H](u[H]=Math.ceil(u.original[H]*B))});var G={},A={},C=function(J,K,I){var H=0;if(/\%/.test(J)){var L=parseInt(J)/100;H=Math.ceil(f(u.image)[K]()*-1*L+I*L)}else{H=g.parseValue(J)}return H},E={top:{top:0},left:{left:0},right:{left:"100%"},bottom:{top:"100%"}};f.each(v.position.toLowerCase().split(" "),function(H,I){if(I=="center"){I="50%"}G[H?"top":"left"]=I});f.each(G,function(H,I){if(E.hasOwnProperty(I)){f.extend(A,E[I])}});G=G.top?f.extend(G,A):A;G=f.extend({top:"50%",left:"50%"},G);f(u.image).css({position:"relative",width:"100%",top:C(G.top,"height",t)-v.margin,left:C(G.left,"width",w)-v.margin});u.show();u.ready=true;v.complete.call(u,u)},error:function(){Galleria.raise("Could not scale image: "+u.image.src)},timeout:1000});return this}};f.extend(f.easing,{galleria:function(v,w,u,y,x){if((w/=x/2)<1){return y/2*w*w*w*w+u}return -y/2*((w-=2)*w*w*w-2)+u},galleriaIn:function(v,w,u,y,x){return y*(w/=x)*w*w*w+u},galleriaOut:function(v,w,u,y,x){return -y*((w=w/x-1)*w*w*w-1)+u}});f.fn.galleria=function(t){return this.each(function(){var u=new Galleria();u.init(this,t)})};l.Galleria=Galleria})(jQuery);
