﻿/*
 * 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(a){var r="2.9995";if(a.support==undefined)a.support={opacity:!a.browser.msie};function c(c){a.fn.cycle.debug&&b(c)}function b(){window.console&&console.log&&console.log("[cycle] "+Array.prototype.join.call(arguments," "))}a.expr[":"].paused=function(a){return a.cyclePause};a.fn.cycle=function(f,g){var d={s:this.selector,c:this.context};if(this.length===0&&f!="stop"){if(!a.isReady&&d.s){b("DOM not ready, queuing slideshow");a(function(){a(d.s,d.c).cycle(f,g)});return this}b("terminating; zero elements found by selector"+(a.isReady?"":" (DOM not ready)"));return this}return this.each(function(){var j=l(this,f,g);if(j===false)return;j.updateActivePagerLink=j.updateActivePagerLink||a.fn.cycle.updateActivePagerLink;this.cycleTimeout&&clearTimeout(this.cycleTimeout);this.cycleTimeout=this.cyclePause=0;var p=a(this),o=j.slideExpr?a(j.slideExpr,this):p.children(),m=o.get(),h=n(p,o,m,j,d);if(h===false)return;if(m.length<2){b("terminating; too few slides: "+m.length);return}var k=h.continuous?10:i(m[h.currSlide],m[h.nextSlide],h,!h.backwards);if(k){k+=h.delay||0;if(k<10)k=10;c("first timeout: "+k);this.cycleTimeout=setTimeout(function(){e(m,h,0,!j.backwards)},k)}})};function d(c,d,e){var b=a(c).data("cycle.opts"),f=!!c.cyclePause;if(f&&b.paused)b.paused(c,b,d,e);else!f&&b.resumed&&b.resumed(c,b,d,e)}function l(c,f,i){if(c.cycleStop==undefined)c.cycleStop=0;if(f===undefined||f===null)f={};if(f.constructor==String){switch(f){case"destroy":case"stop":var g=a(c).data("cycle.opts");if(!g)return false;c.cycleStop++;c.cycleTimeout&&clearTimeout(c.cycleTimeout);c.cycleTimeout=0;g.elements&&a(g.elements).stop();a(c).removeData("cycle.opts");f=="destroy"&&q(g);return false;case"toggle":c.cyclePause=c.cyclePause===1?0:1;j(c.cyclePause,i,c);d(c);return false;case"pause":c.cyclePause=1;d(c);return false;case"resume":c.cyclePause=0;j(false,i,c);d(c);return false;case"prev":case"next":var g=a(c).data("cycle.opts");if(!g){b('options not found, "prev/next" ignored');return false}a.fn.cycle[f](g);return false;default:f={fx:f}}return f}else if(f.constructor==Number){var h=f;f=a(c).data("cycle.opts");if(!f){b("options not found, can not advance slide");return false}if(h<0||h>=f.elements.length){b("invalid slide index: "+h);return false}f.nextSlide=h;if(c.cycleTimeout){clearTimeout(c.cycleTimeout);c.cycleTimeout=0}if(typeof i=="string")f.oneTimeFx=i;e(f.elements,f,1,h>=f.currSlide);return false}return f;function j(f,g,d){if(!f&&g===true){var c=a(d).data("cycle.opts");if(!c){b("options not found, can not resume");return false}if(d.cycleTimeout){clearTimeout(d.cycleTimeout);d.cycleTimeout=0}e(c.elements,c,1,!c.backwards)}}}function h(b,c){if(!a.support.opacity&&c.cleartype&&b.style.filter)try{b.style.removeAttribute("filter")}catch(d){}}function q(b){b.next&&a(b.next).unbind(b.prevNextEvent);b.prev&&a(b.prev).unbind(b.prevNextEvent);(b.pager||b.pagerAnchorBuilder)&&a.each(b.pagerAnchors||[],function(){this.unbind().remove()});b.pagerAnchors=null;b.destroy&&b.destroy(b)}function n(l,p,i,q,B){var c=a.extend({},a.fn.cycle.defaults,q||{},a.metadata?l.metadata():a.meta?l.data():{}),F=a.isFunction(l.data)?l.data(c.metaAttr):null;if(F)c=a.extend(c,F);if(c.autostop)c.countdown=c.autostopCount||i.length;var y=l[0];l.data("cycle.opts",c);c.$cont=l;c.stopCount=y.cycleStop;c.elements=i;c.before=c.before?[c.before]:[];c.after=c.after?[c.after]:[];!a.support.opacity&&c.cleartype&&c.after.push(function(){h(this,c)});c.continuous&&c.after.push(function(){e(i,c,0,!c.backwards)});k(c);!a.support.opacity&&c.cleartype&&!c.cleartypeNoBg&&g(p);l.css("position")=="static"&&l.css("position","relative");c.width&&l.width(c.width);c.height&&c.height!="auto"&&l.height(c.height);if(c.startingSlide)c.startingSlide=parseInt(c.startingSlide,10);else if(c.backwards)c.startingSlide=i.length-1;if(c.random){c.randomMap=[];for(var z=0;z<i.length;z++)c.randomMap.push(z);c.randomMap.sort(function(){return Math.random()-.5});c.randomIndex=1;c.startingSlide=c.randomMap[1]}else if(c.startingSlide>=i.length)c.startingSlide=0;c.currSlide=c.startingSlide||0;var n=c.startingSlide;p.css({position:"absolute",top:0,left:0}).hide().each(function(b){var d;if(c.backwards)d=n?b<=n?i.length+(b-n):n-b:i.length-b;else d=n?b>=n?i.length-(b-n):n-b:i.length-b;a(this).css("z-index",d)});a(i[n]).css("opacity",1).show();h(i[n],c);if(c.fit)if(!c.aspect){c.width&&p.width(c.width);c.height&&c.height!="auto"&&p.height(c.height)}else p.each(function(){var b=a(this),d=c.aspect===true?b.width()/b.height():c.aspect;if(c.width&&b.width()!=c.width){b.width(c.width);b.height(c.width/d)}if(c.height&&b.height()<c.height){b.height(c.height);b.width(c.height*d)}});c.center&&(!c.fit||c.aspect)&&p.each(function(){var b=a(this);b.css({"margin-left":c.width?(c.width-b.width())/2+"px":0,"margin-top":c.height?(c.height-b.height())/2+"px":0})});c.center&&!c.fit&&!c.slideResize&&p.each(function(){var b=a(this);b.css({"margin-left":c.width?(c.width-b.width())/2+"px":0,"margin-top":c.height?(c.height-b.height())/2+"px":0})});var G=c.containerResize&&!l.innerHeight();if(G){for(var t=0,s=0,A=0;A<i.length;A++){var u=a(i[A]),v=u[0],x=u.outerWidth(),w=u.outerHeight();if(!x)x=v.offsetWidth||v.width||u.attr("width");if(!w)w=v.offsetHeight||v.height||u.attr("height");t=x>t?x:t;s=w>s?w:s}t>0&&s>0&&l.css({width:t+"px",height:s+"px"})}var C=false;c.pause&&l.hover(function(){C=true;this.cyclePause++;d(y,true)},function(){C&&this.cyclePause--;d(y,true)});if(j(c)===false)return false;var D=false;q.requeueAttempts=q.requeueAttempts||0;p.each(function(){var d=a(this);this.cycleH=c.fit&&c.height?c.height:d.height()||this.offsetHeight||this.height||d.attr("height")||0;this.cycleW=c.fit&&c.width?c.width:d.width()||this.offsetWidth||this.width||d.attr("width")||0;if(d.is("img")){var g=a.browser.msie&&this.cycleW==28&&this.cycleH==30&&!this.complete,f=a.browser.mozilla&&this.cycleW==34&&this.cycleH==19&&!this.complete,h=a.browser.opera&&(this.cycleW==42&&this.cycleH==19||this.cycleW==37&&this.cycleH==17)&&!this.complete,e=this.cycleH==0&&this.cycleW==0&&!this.complete;if(g||f||h||e)if(B.s&&c.requeueOnImageNotLoaded&&++q.requeueAttempts<100){b(q.requeueAttempts," - img slide not loaded, requeuing slideshow: ",this.src,this.cycleW,this.cycleH);setTimeout(function(){a(B.s,B.c).cycle(q)},c.requeueTimeout);D=true;return false}else b("could not determine size of image: "+this.src,this.cycleW,this.cycleH)}return true});if(D)return false;c.cssBefore=c.cssBefore||{};c.cssAfter=c.cssAfter||{};c.cssFirst=c.cssFirst||{};c.animIn=c.animIn||{};c.animOut=c.animOut||{};p.not(":eq("+n+")").css(c.cssBefore);a(p[n]).css(c.cssFirst);if(c.timeout){c.timeout=parseInt(c.timeout,10);if(c.speed.constructor==String)c.speed=a.fx.speeds[c.speed]||parseInt(c.speed,10);if(!c.sync)c.speed=c.speed/2;var H=c.fx=="none"?0:c.fx=="shuffle"?500:250;while(c.timeout-c.speed<H)c.timeout+=c.speed}if(c.easing)c.easeIn=c.easeOut=c.easing;if(!c.speedIn)c.speedIn=c.speed;if(!c.speedOut)c.speedOut=c.speed;c.slideCount=i.length;c.currSlide=c.lastSlide=n;if(c.random){if(++c.randomIndex==i.length)c.randomIndex=0;c.nextSlide=c.randomMap[c.randomIndex]}else if(c.backwards)c.nextSlide=c.startingSlide==0?i.length-1:c.startingSlide-1;else c.nextSlide=c.startingSlide>=i.length-1?0:c.startingSlide+1;if(!c.multiFx){var E=a.fn.cycle.transitions[c.fx];if(a.isFunction(E))E(l,p,c);else if(c.fx!="custom"&&!c.multiFx){b("unknown transition: "+c.fx,"; slideshow terminating");return false}}var r=p[n];if(!c.skipInitializationCallbacks){c.before.length&&c.before[0].apply(r,[r,r,c,true]);c.after.length&&c.after[0].apply(r,[r,r,c,true])}c.next&&a(c.next).bind(c.prevNextEvent,function(){return f(c,1)});c.prev&&a(c.prev).bind(c.prevNextEvent,function(){return f(c,0)});(c.pager||c.pagerAnchorBuilder)&&o(i,c);m(c,i);return c}function k(b){b.original={before:[],after:[]};b.original.cssBefore=a.extend({},b.cssBefore);b.original.cssAfter=a.extend({},b.cssAfter);b.original.animIn=a.extend({},b.animIn);b.original.animOut=a.extend({},b.animOut);a.each(b.before,function(){b.original.before.push(this)});a.each(b.after,function(){b.original.after.push(this)})}function j(d){var e,g,f=a.fn.cycle.transitions;if(d.fx.indexOf(",")>0){d.multiFx=true;d.fxs=d.fx.replace(/\s*/g,"").split(",");for(e=0;e<d.fxs.length;e++){var h=d.fxs[e];g=f[h];if(!g||!f.hasOwnProperty(h)||!a.isFunction(g)){b("discarding unknown transition: ",h);d.fxs.splice(e,1);e--}}if(!d.fxs.length){b("No valid transitions named; slideshow terminating.");return false}}else if(d.fx=="all"){d.multiFx=true;d.fxs=[];for(p in f){g=f[p];f.hasOwnProperty(p)&&a.isFunction(g)&&d.fxs.push(p)}}if(d.multiFx&&d.randomizeEffects){var i=Math.floor(Math.random()*20)+30;for(e=0;e<i;e++){var j=Math.floor(Math.random()*d.fxs.length);d.fxs.push(d.fxs.splice(j,1)[0])}c("randomized fx sequence: ",d.fxs)}return true}function m(b,c){b.addSlide=function(h,f){var d=a(h),e=d[0];if(!b.autostopCount)b.countdown++;c[f?"unshift":"push"](e);b.els&&b.els[f?"unshift":"push"](e);b.slideCount=c.length;d.css("position","absolute");d[f?"prependTo":"appendTo"](b.$cont);if(f){b.currSlide++;b.nextSlide++}!a.support.opacity&&b.cleartype&&!b.cleartypeNoBg&&g(d);b.fit&&b.width&&d.width(b.width);b.fit&&b.height&&b.height!="auto"&&d.height(b.height);e.cycleH=b.fit&&b.height?b.height:d.height();e.cycleW=b.fit&&b.width?b.width:d.width();d.css(b.cssBefore);(b.pager||b.pagerAnchorBuilder)&&a.fn.cycle.createPagerAnchor(c.length-1,e,a(b.pager),c,b);if(a.isFunction(b.onAddSlide))b.onAddSlide(d);else d.hide()}}a.fn.cycle.resetState=function(b,c){c=c||b.fx;b.before=[];b.after=[];b.cssBefore=a.extend({},b.original.cssBefore);b.cssAfter=a.extend({},b.original.cssAfter);b.animIn=a.extend({},b.original.animIn);b.animOut=a.extend({},b.original.animOut);b.fxFn=null;a.each(b.original.before,function(){b.before.push(this)});a.each(b.original.after,function(){b.after.push(this)});var d=a.fn.cycle.transitions[c];a.isFunction(d)&&d(b.$cont,a(b.elements),b)};function e(f,b,k,h){if(k&&b.busy&&b.manualTrump){c("manualTrump in go(), stopping active transition");a(f).stop(true,true);b.busy=0}if(b.busy){c("transition active, ignoring new tx request");return}var j=b.$cont[0],g=f[b.currSlide],d=f[b.nextSlide];if(j.cycleStop!=b.stopCount||j.cycleTimeout===0&&!k)return;if(!k&&!j.cyclePause&&!b.bounce&&(b.autostop&&--b.countdown<=0||b.nowrap&&!b.random&&b.nextSlide<b.currSlide)){b.end&&b.end(b);return}var o=false;if((k||!j.cyclePause)&&b.nextSlide!=b.currSlide){o=true;var m=b.fx;g.cycleH=g.cycleH||a(g).height();g.cycleW=g.cycleW||a(g).width();d.cycleH=d.cycleH||a(d).height();d.cycleW=d.cycleW||a(d).width();if(b.multiFx){if(h&&(b.lastFx==undefined||++b.lastFx>=b.fxs.length))b.lastFx=0;else if(!h&&(b.lastFx==undefined||--b.lastFx<0))b.lastFx=b.fxs.length-1;m=b.fxs[b.lastFx]}if(b.oneTimeFx){m=b.oneTimeFx;b.oneTimeFx=null}a.fn.cycle.resetState(b,m);b.before.length&&a.each(b.before,function(c,a){if(j.cycleStop!=b.stopCount)return;a.apply(d,[g,d,b,h])});var p=function(){b.busy=0;a.each(b.after,function(c,a){if(j.cycleStop!=b.stopCount)return;a.apply(d,[g,d,b,h])})};c("tx firing("+m+"); currSlide: "+b.currSlide+"; nextSlide: "+b.nextSlide);b.busy=1;if(b.fxFn)b.fxFn(g,d,b,p,h,k&&b.fastOnEvent);else if(a.isFunction(a.fn.cycle[b.fx]))a.fn.cycle[b.fx](g,d,b,p,h,k&&b.fastOnEvent);else a.fn.cycle.custom(g,d,b,p,h,k&&b.fastOnEvent)}if(o||b.nextSlide==b.currSlide){b.lastSlide=b.currSlide;if(b.random){b.currSlide=b.nextSlide;if(++b.randomIndex==f.length)b.randomIndex=0;b.nextSlide=b.randomMap[b.randomIndex];if(b.nextSlide==b.currSlide)b.nextSlide=b.currSlide==b.slideCount-1?0:b.currSlide+1}else if(b.backwards){var l=b.nextSlide-1<0;if(l&&b.bounce){b.backwards=!b.backwards;b.nextSlide=1;b.currSlide=0}else{b.nextSlide=l?f.length-1:b.nextSlide-1;b.currSlide=l?0:b.nextSlide+1}}else{var l=b.nextSlide+1==f.length;if(l&&b.bounce){b.backwards=!b.backwards;b.nextSlide=f.length-2;b.currSlide=f.length-1}else{b.nextSlide=l?0:b.nextSlide+1;b.currSlide=l?f.length-1:b.nextSlide-1}}}o&&b.pager&&b.updateActivePagerLink(b.pager,b.currSlide,b.activePagerClass);var n=0;if(b.timeout&&!b.continuous)n=i(f[b.currSlide],f[b.nextSlide],b,h);else if(b.continuous&&j.cyclePause)n=10;if(n>0)j.cycleTimeout=setTimeout(function(){e(f,b,0,!b.backwards)},n)}a.fn.cycle.updateActivePagerLink=function(d,c,b){a(d).each(function(){a(this).children().removeClass(b).eq(c).addClass(b)})};function i(d,e,a,f){if(a.timeoutFn){var b=a.timeoutFn.call(d,d,e,a,f);while(a.fx!="none"&&b-a.speed<250)b+=a.speed;c("calculated timeout: "+b+"; speed: "+a.speed);if(b!==false)return b}return a.timeout}a.fn.cycle.next=function(a){f(a,1)};a.fn.cycle.prev=function(a){f(a,0)};function f(b,f){var d=f?1:-1,c=b.elements,i=b.$cont[0],g=i.cycleTimeout;if(g){clearTimeout(g);i.cycleTimeout=0}if(b.random&&d<0){b.randomIndex--;if(--b.randomIndex==-2)b.randomIndex=c.length-2;else if(b.randomIndex==-1)b.randomIndex=c.length-1;b.nextSlide=b.randomMap[b.randomIndex]}else if(b.random)b.nextSlide=b.randomMap[b.randomIndex];else{b.nextSlide=b.currSlide+d;if(b.nextSlide<0){if(b.nowrap)return false;b.nextSlide=c.length-1}else if(b.nextSlide>=c.length){if(b.nowrap)return false;b.nextSlide=0}}var h=b.onPrevNextEvent||b.prevNextClick;a.isFunction(h)&&h(d>0,b.nextSlide,c[b.nextSlide]);e(c,b,1,f);return false}function o(c,b){var d=a(b.pager);a.each(c,function(e,f){a.fn.cycle.createPagerAnchor(e,f,d,c,b)});b.updateActivePagerLink(b.pager,b.startingSlide,b.activePagerClass)}a.fn.cycle.createPagerAnchor=function(h,o,j,n,b){var g;if(a.isFunction(b.pagerAnchorBuilder)){g=b.pagerAnchorBuilder(h,o);c("pagerAnchorBuilder("+h+", el) returned: "+g)}else g='<a href="#">'+(h+1)+"</a>";if(!g)return;var f=a(g);if(f.parents("body").length===0){var m=[];if(j.length>1){j.each(function(){var b=f.clone(true);a(this).append(b);m.push(b[0])});f=a(m)}else f.appendTo(j)}b.pagerAnchors=b.pagerAnchors||[];b.pagerAnchors.push(f);var l=function(g){g.preventDefault();b.nextSlide=h;var f=b.$cont[0],c=f.cycleTimeout;if(c){clearTimeout(c);f.cycleTimeout=0}var d=b.onPagerEvent||b.pagerClick;a.isFunction(d)&&d(b.nextSlide,n[b.nextSlide]);e(n,b,1,b.currSlide<h)};if(/mouseenter|mouseover/i.test(b.pagerEvent))f.hover(l,function(){});else f.bind(b.pagerEvent,l);!/^click/.test(b.pagerEvent)&&!b.allowPagerClickBubble&&f.bind("click.cycle",function(){return false});var i=b.$cont[0],k=false;b.pauseOnPagerHover&&f.hover(function(){k=true;i.cyclePause++;d(i,true,true)},function(){k&&i.cyclePause--;d(i,true,true)})};a.fn.cycle.hopsFromLast=function(c,e){var d,a=c.lastSlide,b=c.currSlide;if(e)d=b>a?b-a:c.slideCount-a;else d=b<a?a-b:a+c.slideCount-b;return d};function g(d){c("applying clearType background-color hack");function b(a){a=parseInt(a,10).toString(16);return a.length<2?"0"+a:a}function e(d){for(;d&&d.nodeName.toLowerCase()!="html";d=d.parentNode){var c=a.css(d,"background-color");if(c&&c.indexOf("rgb")>=0){var e=c.match(/\d+/g);return"#"+b(e[0])+b(e[1])+b(e[2])}if(c&&c!="transparent")return c}return"#ffffff"}d.each(function(){a(this).css("background-color",e(this))})}a.fn.cycle.commonReset=function(d,c,b,g,f,e){a(b.elements).not(d).hide();if(typeof b.cssBefore.opacity=="undefined")b.cssBefore.opacity=1;b.cssBefore.display="block";if(b.slideResize&&g!==false&&c.cycleW>0)b.cssBefore.width=c.cycleW;if(b.slideResize&&f!==false&&c.cycleH>0)b.cssBefore.height=c.cycleH;b.cssAfter=b.cssAfter||{};b.cssAfter.display="none";a(d).css("zIndex",b.slideCount+(e===true?1:0));a(c).css("zIndex",b.slideCount+(e===true?0:1))};a.fn.cycle.custom=function(k,l,b,m,n,c){var h=a(k),i=a(l),e=b.speedIn,d=b.speedOut,g=b.easeIn,f=b.easeOut;i.css(b.cssBefore);if(c){if(typeof c=="number")e=d=c;else e=d=1;g=f=null}var j=function(){i.animate(b.animIn,e,g,function(){m()})};h.animate(b.animOut,d,f,function(){h.css(b.cssAfter);!b.sync&&j()});b.sync&&j()};a.fn.cycle.transitions={fade:function(d,c,b){c.not(":eq("+b.currSlide+")").css("opacity",0);b.before.push(function(c,d,b){a.fn.cycle.commonReset(c,d,b);b.cssBefore.opacity=0});b.animIn={opacity:1};b.animOut={opacity:0};b.cssBefore={top:0,left:0}}};a.fn.cycle.ver=function(){return r};a.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:!a.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:1e3,speedIn:null,speedOut:null,startingSlide:0,sync:1,timeout:4e3,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,c,b){b.fxFn=function(c,d,e,b){a(d).show();a(c).hide();b()}};a.fn.cycle.transitions.fadeout=function(d,c,b){c.not(":eq("+b.currSlide+")").css({display:"block",opacity:1});b.before.push(function(d,e,b,g,f,c){a(d).css("zIndex",b.slideCount+(!c===true?1:0));a(e).css("zIndex",b.slideCount+(!c===true?0:1))});b.animIn.opacity=1;b.animOut.opacity=0;b.cssBefore.opacity=1;b.cssBefore.display="block";b.cssAfter.zIndex=0};a.fn.cycle.transitions.scrollUp=function(c,e,b){c.css("overflow","hidden");b.before.push(a.fn.cycle.commonReset);var d=c.height();b.cssBefore.top=d;b.cssBefore.left=0;b.cssFirst.top=0;b.animIn.top=0;b.animOut.top=-d};a.fn.cycle.transitions.scrollDown=function(c,e,b){c.css("overflow","hidden");b.before.push(a.fn.cycle.commonReset);var d=c.height();b.cssFirst.top=0;b.cssBefore.top=-d;b.cssBefore.left=0;b.animIn.top=0;b.animOut.top=d};a.fn.cycle.transitions.scrollLeft=function(c,e,b){c.css("overflow","hidden");b.before.push(a.fn.cycle.commonReset);var d=c.width();b.cssFirst.left=0;b.cssBefore.left=d;b.cssBefore.top=0;b.animIn.left=0;b.animOut.left=0-d};a.fn.cycle.transitions.scrollRight=function(c,e,b){c.css("overflow","hidden");b.before.push(a.fn.cycle.commonReset);var d=c.width();b.cssFirst.left=0;b.cssBefore.left=-d;b.cssBefore.top=0;b.animIn.left=0;b.animOut.left=d};a.fn.cycle.transitions.scrollHorz=function(c,d,b){c.css("overflow","hidden").width();b.before.push(function(d,e,b,c){if(b.rev)c=!c;a.fn.cycle.commonReset(d,e,b);b.cssBefore.left=c?e.cycleW-1:1-e.cycleW;b.animOut.left=c?-d.cycleW:d.cycleW});b.cssFirst.left=0;b.cssBefore.top=0;b.animIn.left=0;b.animOut.top=0};a.fn.cycle.transitions.scrollVert=function(c,d,b){c.css("overflow","hidden");b.before.push(function(d,e,b,c){if(b.rev)c=!c;a.fn.cycle.commonReset(d,e,b);b.cssBefore.top=c?1-e.cycleH:e.cycleH-1;b.animOut.top=c?d.cycleH:-d.cycleH});b.cssFirst.top=0;b.cssBefore.left=0;b.animIn.top=0;b.animOut.left=0};a.fn.cycle.transitions.slideX=function(d,c,b){b.before.push(function(c,d,b){a(b.elements).not(c).hide();a.fn.cycle.commonReset(c,d,b,false,true);b.animIn.width=d.cycleW});b.cssBefore.left=0;b.cssBefore.top=0;b.cssBefore.width=0;b.animIn.width="show";b.animOut.width=0};a.fn.cycle.transitions.slideY=function(d,c,b){b.before.push(function(c,d,b){a(b.elements).not(c).hide();a.fn.cycle.commonReset(c,d,b,true,false);b.animIn.height=d.cycleH});b.cssBefore.left=0;b.cssBefore.top=0;b.cssBefore.height=0;b.animIn.height="show";b.animOut.height=0};a.fn.cycle.transitions.shuffle=function(e,d,b){var c,f=e.css("overflow","visible").width();d.css({left:0,top:0});b.before.push(function(b,c,d){a.fn.cycle.commonReset(b,c,d,true,true,true)});if(!b.speedAdjusted){b.speed=b.speed/2;b.speedAdjusted=true}b.random=0;b.shuffle=b.shuffle||{left:-f,top:15};b.els=[];for(c=0;c<d.length;c++)b.els.push(d[c]);for(c=0;c<b.currSlide;c++)b.els.push(b.els.shift());b.fxFn=function(d,g,b,h,c){if(b.rev)c=!c;var e=c?a(d):a(g);a(g).css(b.cssBefore);var f=b.slideCount;e.animate(b.shuffle,b.speedIn,b.easeIn,function(){for(var k=a.fn.cycle.hopsFromLast(b,c),j=0;j<k;j++)c?b.els.push(b.els.shift()):b.els.unshift(b.els.pop());if(c)for(var g=0,i=b.els.length;g<i;g++)a(b.els[g]).css("z-index",i-g+f);else{var l=a(d).css("z-index");e.css("z-index",parseInt(l,10)+1+f)}e.animate({left:0,top:0},b.speedOut,b.easeOut,function(){a(c?this:d).hide();h&&h()})})};a.extend(b.cssBefore,{display:"block",opacity:1,top:0,left:0})};a.fn.cycle.transitions.turnUp=function(d,c,b){b.before.push(function(d,b,c){a.fn.cycle.commonReset(d,b,c,true,false);c.cssBefore.top=b.cycleH;c.animIn.height=b.cycleH;c.animOut.width=b.cycleW});b.cssFirst.top=0;b.cssBefore.left=0;b.cssBefore.height=0;b.animIn.top=0;b.animOut.height=0};a.fn.cycle.transitions.turnDown=function(d,c,b){b.before.push(function(c,d,b){a.fn.cycle.commonReset(c,d,b,true,false);b.animIn.height=d.cycleH;b.animOut.top=c.cycleH});b.cssFirst.top=0;b.cssBefore.left=0;b.cssBefore.top=0;b.cssBefore.height=0;b.animOut.height=0};a.fn.cycle.transitions.turnLeft=function(d,c,b){b.before.push(function(d,b,c){a.fn.cycle.commonReset(d,b,c,false,true);c.cssBefore.left=b.cycleW;c.animIn.width=b.cycleW});b.cssBefore.top=0;b.cssBefore.width=0;b.animIn.left=0;b.animOut.width=0};a.fn.cycle.transitions.turnRight=function(d,c,b){b.before.push(function(c,d,b){a.fn.cycle.commonReset(c,d,b,false,true);b.animIn.width=d.cycleW;b.animOut.left=c.cycleW});a.extend(b.cssBefore,{top:0,left:0,width:0});b.animIn.left=0;b.animOut.width=0};a.fn.cycle.transitions.zoom=function(d,c,b){b.before.push(function(d,b,c){a.fn.cycle.commonReset(d,b,c,false,false,true);c.cssBefore.top=b.cycleH/2;c.cssBefore.left=b.cycleW/2;a.extend(c.animIn,{top:0,left:0,width:b.cycleW,height:b.cycleH});a.extend(c.animOut,{width:0,height:0,top:d.cycleH/2,left:d.cycleW/2})});b.cssFirst.top=0;b.cssFirst.left=0;b.cssBefore.width=0;b.cssBefore.height=0};a.fn.cycle.transitions.fadeZoom=function(d,c,b){b.before.push(function(d,b,c){a.fn.cycle.commonReset(d,b,c,false,false);c.cssBefore.left=b.cycleW/2;c.cssBefore.top=b.cycleH/2;a.extend(c.animIn,{top:0,left:0,width:b.cycleW,height:b.cycleH})});b.cssBefore.width=0;b.cssBefore.height=0;b.animOut.opacity=0};a.fn.cycle.transitions.blindX=function(d,e,b){var c=d.css("overflow","hidden").width();b.before.push(function(c,d,b){a.fn.cycle.commonReset(c,d,b);b.animIn.width=d.cycleW;b.animOut.left=c.cycleW});b.cssBefore.left=c;b.cssBefore.top=0;b.animIn.left=0;b.animOut.left=c};a.fn.cycle.transitions.blindY=function(d,e,b){var c=d.css("overflow","hidden").height();b.before.push(function(c,d,b){a.fn.cycle.commonReset(c,d,b);b.animIn.height=d.cycleH;b.animOut.top=c.cycleH});b.cssBefore.top=c;b.cssBefore.left=0;b.animIn.top=0;b.animOut.top=c};a.fn.cycle.transitions.blindZ=function(c,f,b){var d=c.css("overflow","hidden").height(),e=c.width();b.before.push(function(c,d,b){a.fn.cycle.commonReset(c,d,b);b.animIn.height=d.cycleH;b.animOut.top=c.cycleH});b.cssBefore.top=d;b.cssBefore.left=e;b.animIn.top=0;b.animIn.left=0;b.animOut.top=d;b.animOut.left=e};a.fn.cycle.transitions.growX=function(d,c,b){b.before.push(function(c,d,b){a.fn.cycle.commonReset(c,d,b,false,true);b.cssBefore.left=this.cycleW/2;b.animIn.left=0;b.animIn.width=this.cycleW;b.animOut.left=0});b.cssBefore.top=0;b.cssBefore.width=0};a.fn.cycle.transitions.growY=function(d,c,b){b.before.push(function(c,d,b){a.fn.cycle.commonReset(c,d,b,true,false);b.cssBefore.top=this.cycleH/2;b.animIn.top=0;b.animIn.height=this.cycleH;b.animOut.top=0});b.cssBefore.height=0;b.cssBefore.left=0};a.fn.cycle.transitions.curtainX=function(d,c,b){b.before.push(function(c,d,b){a.fn.cycle.commonReset(c,d,b,false,true,true);b.cssBefore.left=d.cycleW/2;b.animIn.left=0;b.animIn.width=this.cycleW;b.animOut.left=c.cycleW/2;b.animOut.width=0});b.cssBefore.top=0;b.cssBefore.width=0};a.fn.cycle.transitions.curtainY=function(d,c,b){b.before.push(function(d,c,b){a.fn.cycle.commonReset(d,c,b,true,false,true);b.cssBefore.top=c.cycleH/2;b.animIn.top=0;b.animIn.height=c.cycleH;b.animOut.top=d.cycleH/2;b.animOut.height=0});b.cssBefore.height=0;b.cssBefore.left=0};a.fn.cycle.transitions.cover=function(d,g,b){var c=b.direction||"left",f=d.css("overflow","hidden").width(),e=d.height();b.before.push(function(d,g,b){a.fn.cycle.commonReset(d,g,b);if(c=="right")b.cssBefore.left=-f;else if(c=="up")b.cssBefore.top=e;else if(c=="down")b.cssBefore.top=-e;else b.cssBefore.left=f});b.animIn.left=0;b.animIn.top=0;b.cssBefore.top=0;b.cssBefore.left=0};a.fn.cycle.transitions.uncover=function(d,g,b){var c=b.direction||"left",f=d.css("overflow","hidden").width(),e=d.height();b.before.push(function(d,g,b){a.fn.cycle.commonReset(d,g,b,true,true,true);if(c=="right")b.animOut.left=f;else if(c=="up")b.animOut.top=-e;else if(c=="down")b.animOut.top=e;else b.animOut.left=-f});b.animIn.left=0;b.animIn.top=0;b.cssBefore.top=0;b.cssBefore.left=0};a.fn.cycle.transitions.toss=function(c,f,b){var e=c.css("overflow","visible").width(),d=c.height();b.before.push(function(c,f,b){a.fn.cycle.commonReset(c,f,b,true,true,true);if(!b.animOut.left&&!b.animOut.top)a.extend(b.animOut,{left:e*2,top:-d/2,opacity:0});else b.animOut.opacity=0});b.cssBefore.left=0;b.cssBefore.top=0;b.animIn.left=0};a.fn.cycle.transitions.wipe=function(k,n,b){var d=k.css("overflow","hidden").width(),c=k.height();b.cssBefore=b.cssBefore||{};var e;if(b.clip)if(/l2r/.test(b.clip))e="rect(0px 0px "+c+"px 0px)";else if(/r2l/.test(b.clip))e="rect(0px "+d+"px "+c+"px "+d+"px)";else if(/t2b/.test(b.clip))e="rect(0px "+d+"px 0px 0px)";else if(/b2t/.test(b.clip))e="rect("+c+"px "+d+"px "+c+"px 0px)";else if(/zoom/.test(b.clip)){var m=parseInt(c/2,10),l=parseInt(d/2,10);e="rect("+m+"px "+l+"px "+m+"px "+l+"px)"}b.cssBefore.clip=b.cssBefore.clip||e||"rect(0px 0px 0px 0px)";var f=b.cssBefore.clip.match(/(\d+)/g),j=parseInt(f[0],10),i=parseInt(f[1],10),g=parseInt(f[2],10),h=parseInt(f[3],10);b.before.push(function(f,k,l){if(f==k)return;var m=a(f),n=a(k);a.fn.cycle.commonReset(f,k,l,true,true,false);l.cssAfter.display="block";var e=1,b=parseInt(l.speedIn/13,10)-1;(function o(){var l=j?j-parseInt(e*(j/b),10):0,f=h?h-parseInt(e*(h/b),10):0,a=g<c?g+parseInt(e*((c-g)/b||1),10):c,k=i<d?i+parseInt(e*((d-i)/b||1),10):d;n.css({clip:"rect("+l+"px "+k+"px "+a+"px "+f+"px)"});e++<=b?setTimeout(o,13):m.css("display","none")})()});a.extend(b.cssBefore,{display:"block",opacity:1,top:0,left:0});b.animIn={left:0};b.animOut={left:0}}})(jQuery);(function(a,h,y){var w="function",v="password",j="maxLength",n="type",b="",c=true,u="placeholder",i=false,t="watermark",g=t,f="watermarkClass",q="watermarkFocus",l="watermarkSubmit",o="watermarkMaxLength",e="watermarkPassword",d="watermarkText",k=/\r/g,s="input:data("+g+"),textarea:data("+g+")",m="input:text,input:password,input[type=search],input:not([type]),textarea",p=["Page_ClientValidate"],r=i,x=u in document.createElement("input");a.watermark=a.watermark||{version:"3.1.3",runOnce:c,options:{className:t,useNative:c,hideBeforeUnload:c},hide:function(b){a(b).filter(s).each(function(){a.watermark._hide(a(this))})},_hide:function(a,r){var p=a[0],q=(p.value||b).replace(k,b),l=a.data(d)||b,m=a.data(o)||0,i=a.data(f);if(l.length&&q==l){p.value=b;if(a.data(e))if((a.attr(n)||b)==="text"){var g=a.data(e)||[],c=a.parent()||[];if(g.length&&c.length){c[0].removeChild(a[0]);c[0].appendChild(g[0]);a=g}}if(m){a.attr(j,m);a.removeData(o)}if(r){a.attr("autocomplete","off");h.setTimeout(function(){a.select()},1)}}i&&a.removeClass(i)},show:function(b){a(b).filter(s).each(function(){a.watermark._show(a(this))})},_show:function(g){var p=g[0],u=(p.value||b).replace(k,b),h=g.data(d)||b,s=g.attr(n)||b,t=g.data(f);if((u.length==0||u==h)&&!g.data(q)){r=c;if(g.data(e))if(s===v){var m=g.data(e)||[],l=g.parent()||[];if(m.length&&l.length){l[0].removeChild(g[0]);l[0].appendChild(m[0]);g=m;g.attr(j,h.length);p=g[0]}}if(s==="text"||s==="search"){var i=g.attr(j)||0;if(i>0&&h.length>i){g.data(o,i);g.attr(j,h.length)}}t&&g.addClass(t);p.value=h}else a.watermark._hide(g)},hideAll:function(){if(r){a.watermark.hide(m);r=i}},showAll:function(){a.watermark.show(m)}};a.fn.watermark=a.fn.watermark||function(p,o){var t="string";if(!this.length)return this;var s=i,r=typeof p===t;if(r)p=p.replace(k,b);if(typeof o==="object"){s=typeof o.className===t;o=a.extend({},a.watermark.options,o)}else if(typeof o===t){s=c;o=a.extend({},a.watermark.options,{className:o})}else o=a.watermark.options;if(typeof o.useNative!==w)o.useNative=o.useNative?function(){return c}:function(){return i};return this.each(function(){var B="dragleave",A="dragenter",z=this,i=a(z);if(!i.is(m))return;if(i.data(g)){if(r||s){a.watermark._hide(i);r&&i.data(d,p);s&&i.data(f,o.className)}}else{if(x&&o.useNative.call(z,i)&&(i.attr("tagName")||b)!=="TEXTAREA"){r&&i.attr(u,p);return}i.data(d,r?p:b);i.data(f,o.className);i.data(g,1);if((i.attr(n)||b)===v){var C=i.wrap("<span>").parent(),t=a(C.html().replace(/type=["']?password["']?/i,'type="text"'));t.data(d,i.data(d));t.data(f,i.data(f));t.data(g,1);t.attr(j,p.length);t.focus(function(){a.watermark._hide(t,c)}).bind(A,function(){a.watermark._hide(t)}).bind("dragend",function(){h.setTimeout(function(){t.blur()},1)});i.blur(function(){a.watermark._show(i)}).bind(B,function(){a.watermark._show(i)});t.data(e,i);i.data(e,t)}else i.focus(function(){i.data(q,1);a.watermark._hide(i,c)}).blur(function(){i.data(q,0);a.watermark._show(i)}).bind(A,function(){a.watermark._hide(i)}).bind(B,function(){a.watermark._show(i)}).bind("dragend",function(){h.setTimeout(function(){a.watermark._show(i)},1)}).bind("drop",function(e){var c=i[0],a=e.originalEvent.dataTransfer.getData("Text");if((c.value||b).replace(k,b).replace(a,b)===i.data(d))c.value=a;i.focus()});if(z.form){var w=z.form,y=a(w);if(!y.data(l)){y.submit(a.watermark.hideAll);if(w.submit){y.data(l,w.submit);w.submit=function(c,b){return function(){var d=b.data(l);a.watermark.hideAll();if(d.apply)d.apply(c,Array.prototype.slice.call(arguments));else d()}}(w,y)}else{y.data(l,1);w.submit=function(b){return function(){a.watermark.hideAll();delete b.submit;b.submit()}}(w)}}}}a.watermark._show(i)})};if(a.watermark.runOnce){a.watermark.runOnce=i;a.extend(a.expr[":"],{data:function(c,d,b){return!!a.data(c,b[3])}});(function(c){a.fn.val=function(){var e=this;if(!e.length)return arguments.length?e:y;if(!arguments.length)if(e.data(g)){var f=(e[0].value||b).replace(k,b);return f===(e.data(d)||b)?b:f}else return c.apply(e,arguments);else{c.apply(e,arguments);a.watermark.show(e);return e}}})(a.fn.val);p.length&&a(function(){for(var b,c,d=p.length-1;d>=0;d--){b=p[d];c=h[b];if(typeof c===w)h[b]=function(b){return function(){a.watermark.hideAll();return b.apply(null,Array.prototype.slice.call(arguments))}}(c)}});a(h).bind("beforeunload",function(){a.watermark.options.hideBeforeUnload&&a.watermark.hideAll()})}})(jQuery,window);(function(a){var i,p,q,d,w,g,x,j,v,t,m=0,c={},k=[],l=0,b={},h=[],z=null,r=new Image,B=/\.(jpg|gif|png|bmp|jpeg)(.*)?$/i,M=/[^\.]\.(swf)\s*$/i,C,D=1,s=0,o="",n,f,e=false,u=a.extend(a("<div/>")[0],{prop:0}),E=a.browser.msie&&a.browser.version<7&&!window.XMLHttpRequest,F=function(){p.hide();r.onerror=r.onload=null;z&&z.abort();i.empty()},G=function(){if(false===c.onError(k,m,c)){p.hide();e=false}else{c.titleShow=false;c.width="auto";c.height="auto";i.html('<p id="fancybox-error">The requested content cannot be loaded.<br />Please try again later.</p>');y()}},A=function(){var b=k[m],d,h,l,j,n,f;F();c=a.extend({},a.fn.fancybox.defaults,typeof a(b).data("fancybox")=="undefined"?c:a(b).data("fancybox"));f=c.onStart(k,m,c);if(f===false)e=false;else{if(typeof f=="object")c=a.extend(c,f);l=c.title||(b.nodeName?a(b).attr("title"):b.title)||"";if(b.nodeName&&!c.orig)c.orig=a(b).children("img:first").length?a(b).children("img:first"):a(b);if(l===""&&c.orig&&c.titleFromAlt)l=c.orig.attr("alt");d=c.href||(b.nodeName?a(b).attr("href"):b.href)||null;if(/^(?:javascript)/i.test(d)||d=="#")d=null;if(c.type){h=c.type;if(!d)d=c.content}else if(c.content)h="html";else if(d)h=d.match(B)?"image":d.match(M)?"swf":a(b).hasClass("iframe")?"iframe":d.indexOf("#")===0?"inline":"ajax";if(h){if(h=="inline"){b=d.substr(d.indexOf("#"));h=a(b).length>0?"inline":"ajax"}c.type=h;c.href=d;c.title=l;if(c.autoDimensions)if(c.type=="html"||c.type=="inline"||c.type=="ajax"){c.width="auto";c.height="auto"}else c.autoDimensions=false;if(c.modal){c.overlayShow=true;c.hideOnOverlayClick=false;c.hideOnContentClick=false;c.enableEscapeButton=false;c.showCloseButton=false}c.padding=parseInt(c.padding,10);c.margin=parseInt(c.margin,10);i.css("padding",c.padding+c.margin);a(".fancybox-inline-tmp").unbind("fancybox-cancel").bind("fancybox-change",function(){a(this).replaceWith(g.children())});switch(h){case"html":i.html(c.content);y();break;case"inline":if(a(b).parent().is("#fancybox-content")===true){e=false;break}a('<div class="fancybox-inline-tmp" />').hide().insertBefore(a(b)).bind("fancybox-cleanup",function(){a(this).replaceWith(g.children())}).bind("fancybox-cancel",function(){a(this).replaceWith(i.children())});a(b).appendTo(i);y();break;case"image":e=false;a.fancybox.showActivity();r=new Image;r.onerror=function(){G()};r.onload=function(){e=true;r.onerror=r.onload=null;c.width=r.width;c.height=r.height;a("<img />").attr({id:"fancybox-img",src:r.src,alt:c.title}).appendTo(i);H()};r.src=d;break;case"swf":c.scrolling="no";j='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+c.width+'" height="'+c.height+'"><param name="movie" value="'+d+'"></param>';n="";a.each(c.swf,function(b,a){j+='<param name="'+b+'" value="'+a+'"></param>';n+=" "+b+'="'+a+'"'});j+='<embed src="'+d+'" type="application/x-shockwave-flash" width="'+c.width+'" height="'+c.height+'"'+n+"></embed></object>";i.html(j);y();break;case"ajax":e=false;a.fancybox.showActivity();c.ajax.win=c.ajax.success;z=a.ajax(a.extend({},c.ajax,{url:d,data:c.ajax.data||{},error:function(a){a.status>0&&G()},success:function(b,e,a){if((typeof a=="object"?a:z).status==200){if(typeof c.ajax.win=="function"){f=c.ajax.win(d,b,e,a);if(f===false){p.hide();return}else if(typeof f=="string"||typeof f=="object")b=f}i.html(b);y()}}}));break;case"iframe":H()}}else G()}},y=function(){var b=c.width,d=c.height;b=b.toString().indexOf("%")>-1?parseInt((a(window).width()-c.margin*2)*parseFloat(b)/100,10)+"px":b=="auto"?"auto":b+"px";d=d.toString().indexOf("%")>-1?parseInt((a(window).height()-c.margin*2)*parseFloat(d)/100,10)+"px":d=="auto"?"auto":d+"px";i.wrapInner('<div style="width:'+b+";height:"+d+";overflow: "+(c.scrolling=="auto"?"auto":c.scrolling=="yes"?"scroll":"hidden")+';position:relative;"></div>');c.width=i.width();c.height=i.height();H()},H=function(){var r,y;p.hide();if(d.is(":visible")&&false===b.onCleanup(h,l,b)){a.event.trigger("fancybox-cancel");e=false}else{e=true;a(g.add(q)).unbind();a(window).unbind("resize.fb scroll.fb");a(document).unbind("keydown.fb");d.is(":visible")&&b.titlePosition!=="outside"&&d.css("height",d.height());h=k;l=m;b=c;if(b.overlayShow){q.css({"background-color":b.overlayColor,opacity:b.overlayOpacity,cursor:b.hideOnOverlayClick?"pointer":"auto",height:a(document).height()});if(!q.is(":visible")){E&&a("select:not(#fancybox-tmp select)").filter(function(){return this.style.visibility!=="hidden"}).css({visibility:"hidden"}).one("fancybox-cleanup",function(){this.style.visibility="inherit"});q.show()}}else q.hide();f=N();o=b.title||"";s=0;j.empty().removeAttr("style").removeClass();if(b.titleShow!==false){if(a.isFunction(b.titleFormat))r=b.titleFormat(o,h,l,b);else r=o&&o.length?b.titlePosition=="float"?'<table id="fancybox-title-float-wrap" cellpadding="0" cellspacing="0"><tr><td id="fancybox-title-float-left"></td><td id="fancybox-title-float-main">'+o+'</td><td id="fancybox-title-float-right"></td></tr></table>':'<div id="fancybox-title-'+b.titlePosition+'">'+o+"</div>":false;o=r;if(!(!o||o==="")){j.addClass("fancybox-title-"+b.titlePosition).html(o).appendTo("body").show();switch(b.titlePosition){case"inside":j.css({width:f.width-b.padding*2,marginLeft:b.padding,marginRight:b.padding});s=j.outerHeight(true);j.appendTo(w);f.height+=s;break;case"over":j.css({marginLeft:b.padding,width:f.width-b.padding*2,bottom:b.padding}).appendTo(w);break;case"float":j.css("left",parseInt((j.width()-f.width-40)/2,10)*-1).appendTo(d);break;default:j.css({width:f.width-b.padding*2,paddingLeft:b.padding,paddingRight:b.padding}).appendTo(d)}}}j.hide();if(d.is(":visible")){a(x.add(v).add(t)).hide();r=d.position();n={top:r.top,left:r.left,width:d.width(),height:d.height()};y=n.width==f.width&&n.height==f.height;g.fadeTo(b.changeFade,.3,function(){var d=function(){g.html(i.contents()).fadeTo(b.changeFade,1,I)};a.event.trigger("fancybox-change");g.empty().removeAttr("filter").css({"border-width":b.padding,width:f.width-b.padding*2,height:c.autoDimensions?"auto":f.height-s-b.padding*2});if(y)d();else{u.prop=0;a(u).animate({prop:1},{duration:b.changeSpeed,easing:b.easingChange,step:J,complete:d})}})}else{d.removeAttr("style");g.css("border-width",b.padding);if(b.transitionIn=="elastic"){n=L();g.html(i.contents());d.show();if(b.opacity)f.opacity=0;u.prop=0;a(u).animate({prop:1},{duration:b.speedIn,easing:b.easingIn,step:J,complete:I})}else{b.titlePosition=="inside"&&s>0&&j.show();g.css({width:f.width-b.padding*2,height:c.autoDimensions?"auto":f.height-s-b.padding*2}).html(i.contents());d.css(f).fadeIn(b.transitionIn=="none"?0:b.speedIn,I)}}}},O=function(){(b.enableEscapeButton||b.enableKeyboardNav)&&a(document).bind("keydown.fb",function(c){if(c.keyCode==27&&b.enableEscapeButton){c.preventDefault();a.fancybox.close()}else if((c.keyCode==37||c.keyCode==39)&&b.enableKeyboardNav&&c.target.tagName!=="INPUT"&&c.target.tagName!=="TEXTAREA"&&c.target.tagName!=="SELECT"){c.preventDefault();a.fancybox[c.keyCode==37?"prev":"next"]()}});if(b.showNavArrows){(b.cyclic&&h.length>1||l!==0)&&v.show();(b.cyclic&&h.length>1||l!=h.length-1)&&t.show()}else{v.hide();t.hide()}},I=function(){if(!a.support.opacity){g.get(0).style.removeAttribute("filter");d.get(0).style.removeAttribute("filter")}c.autoDimensions&&g.css("height","auto");d.css("height","auto");o&&o.length&&j.show();b.showCloseButton&&x.show();O();b.hideOnContentClick&&g.bind("click",a.fancybox.close);b.hideOnOverlayClick&&q.bind("click",a.fancybox.close);a(window).bind("resize.fb",a.fancybox.resize);b.centerOnScroll&&a(window).bind("scroll.fb",a.fancybox.center);b.type=="iframe"&&a('<iframe id="fancybox-frame" name="fancybox-frame'+(new Date).getTime()+'" frameborder="0" hspace="0" '+(a.browser.msie?'allowtransparency="true""':"")+' scrolling="'+c.scrolling+'" src="'+b.href+'"></iframe>').appendTo(g);d.show();e=false;a.fancybox.center();b.onComplete(h,l,b);var f,i;if(h.length-1>l){f=h[l+1].href;if(typeof f!=="undefined"&&f.match(B)){i=new Image;i.src=f}}if(l>0){f=h[l-1].href;if(typeof f!=="undefined"&&f.match(B)){i=new Image;i.src=f}}},J=function(a){var c={width:parseInt(n.width+(f.width-n.width)*a,10),height:parseInt(n.height+(f.height-n.height)*a,10),top:parseInt(n.top+(f.top-n.top)*a,10),left:parseInt(n.left+(f.left-n.left)*a,10)};if(typeof f.opacity!=="undefined")c.opacity=a<.5?.5:a;d.css(c);g.css({width:c.width-b.padding*2,height:c.height-s*a-b.padding*2})},K=function(){return[a(window).width()-b.margin*2,a(window).height()-b.margin*2,a(document).scrollLeft()+b.margin,a(document).scrollTop()+b.margin]},N=function(){var d=K(),a={},f=b.autoScale,e=b.padding*2;a.width=b.width.toString().indexOf("%")>-1?parseInt(d[0]*parseFloat(b.width)/100,10):b.width+e;a.height=b.height.toString().indexOf("%")>-1?parseInt(d[1]*parseFloat(b.height)/100,10):b.height+e;if(f&&(a.width>d[0]||a.height>d[1]))if(c.type=="image"||c.type=="swf"){f=b.width/b.height;if(a.width>d[0]){a.width=d[0];a.height=parseInt((a.width-e)/f+e,10)}if(a.height>d[1]){a.height=d[1];a.width=parseInt((a.height-e)*f+e,10)}}else{a.width=Math.min(a.width,d[0]);a.height=Math.min(a.height,d[1])}a.top=parseInt(Math.max(d[3]-20,d[3]+(d[1]-a.height-40)*.5),10);a.left=parseInt(Math.max(d[2]-20,d[2]+(d[0]-a.width-40)*.5),10);return a},L=function(){var d=c.orig?a(c.orig):false,e={};if(d&&d.length){e=d.offset();e.top+=parseInt(d.css("paddingTop"),10)||0;e.left+=parseInt(d.css("paddingLeft"),10)||0;e.top+=parseInt(d.css("border-top-width"),10)||0;e.left+=parseInt(d.css("border-left-width"),10)||0;e.width=d.width();e.height=d.height();e={width:e.width+b.padding*2,height:e.height+b.padding*2,top:e.top-b.padding-20,left:e.left-b.padding-20}}else{d=K();e={width:b.padding*2,height:b.padding*2,top:parseInt(d[3]+d[1]*.5,10),left:parseInt(d[2]+d[0]*.5,10)}}return e},P=function(){if(p.is(":visible")){a("div",p).css("top",D*-40+"px");D=(D+1)%12}else clearInterval(C)};a.fn.fancybox=function(b){if(!a(this).length)return this;a(this).data("fancybox",a.extend({},b,a.metadata?a(this).metadata():{})).unbind("click.fb").bind("click.fb",function(b){b.preventDefault();if(!e){e=true;a(this).blur();k=[];m=0;b=a(this).attr("rel")||"";if(!b||b==""||b==="nofollow")k.push(this);else{k=a("a[rel="+b+"], area[rel="+b+"]");m=k.index(this)}A()}});return this};a.fancybox=function(b,f){var d;if(!e){e=true;d=typeof f!=="undefined"?f:{};k=[];m=parseInt(d.index,10)||0;if(a.isArray(b)){for(var c=0,g=b.length;c<g;c++)if(typeof b[c]=="object")a(b[c]).data("fancybox",a.extend({},d,b[c]));else b[c]=a({}).data("fancybox",a.extend({content:b[c]},d));k=jQuery.merge(k,b)}else{if(typeof b=="object")a(b).data("fancybox",a.extend({},d,b));else b=a({}).data("fancybox",a.extend({content:b},d));k.push(b)}if(m>k.length||m<0)m=0;A()}};a.fancybox.showActivity=function(){clearInterval(C);p.show();C=setInterval(P,66)};a.fancybox.hideActivity=function(){p.hide()};a.fancybox.next=function(){return a.fancybox.pos(l+1)};a.fancybox.prev=function(){return a.fancybox.pos(l-1)};a.fancybox.pos=function(a){if(!e){a=parseInt(a);k=h;if(a>-1&&a<h.length){m=a;A()}else if(b.cyclic&&h.length>1){m=a>=h.length?0:h.length-1;A()}}};a.fancybox.cancel=function(){if(!e){e=true;a.event.trigger("fancybox-cancel");F();c.onCancel(k,m,c);e=false}};a.fancybox.close=function(){function i(){q.fadeOut("fast");j.empty().hide();d.hide();a.event.trigger("fancybox-cleanup");g.empty();b.onClosed(h,l,b);h=c=[];l=m=0;b=c={};e=false}if(!(e||d.is(":hidden"))){e=true;if(b&&false===b.onCleanup(h,l,b))e=false;else{F();a(x.add(v).add(t)).hide();a(g.add(q)).unbind();a(window).unbind("resize.fb scroll.fb");a(document).unbind("keydown.fb");g.find("iframe").attr("src",E&&/^https/i.test(window.location.href||"")?"javascript:void(false)":"about:blank");b.titlePosition!=="inside"&&j.empty();d.stop();if(b.transitionOut=="elastic"){n=L();var k=d.position();f={top:k.top,left:k.left,width:d.width(),height:d.height()};if(b.opacity)f.opacity=1;j.empty().hide();u.prop=1;a(u).animate({prop:0},{duration:b.speedOut,easing:b.easingOut,step:J,complete:i})}else d.fadeOut(b.transitionOut=="none"?0:b.speedOut,i)}}};a.fancybox.resize=function(){q.is(":visible")&&q.css("height",a(document).height());a.fancybox.center(true)};a.fancybox.center=function(c){var a,f;if(!e){f=c===true?1:0;a=K();!f&&(d.width()>a[0]||d.height()>a[1])||d.stop().animate({top:parseInt(Math.max(a[3]-20,a[3]+(a[1]-g.height()-40)*.5-b.padding)),left:parseInt(Math.max(a[2]-20,a[2]+(a[0]-g.width()-40)*.5-b.padding))},typeof c=="number"?c:200)}};a.fancybox.init=function(){if(!a("#fancybox-wrap").length){a("body").append(i=a('<div id="fancybox-tmp"></div>'),p=a('<div id="fancybox-loading"><div></div></div>'),q=a('<div id="fancybox-overlay"></div>'),d=a('<div id="fancybox-wrap"></div>'));w=a('<div id="fancybox-outer"></div>').append('<div class="fancybox-bg" id="fancybox-bg-n"></div><div class="fancybox-bg" id="fancybox-bg-ne"></div><div class="fancybox-bg" id="fancybox-bg-e"></div><div class="fancybox-bg" id="fancybox-bg-se"></div><div class="fancybox-bg" id="fancybox-bg-s"></div><div class="fancybox-bg" id="fancybox-bg-sw"></div><div class="fancybox-bg" id="fancybox-bg-w"></div><div class="fancybox-bg" id="fancybox-bg-nw"></div>').appendTo(d);w.append(g=a('<div id="fancybox-content"></div>'),x=a('<a id="fancybox-close"></a>'),j=a('<div id="fancybox-title"></div>'),v=a('<a href="javascript:;" id="fancybox-left"><span class="fancy-ico" id="fancybox-left-ico"></span></a>'),t=a('<a href="javascript:;" id="fancybox-right"><span class="fancy-ico" id="fancybox-right-ico"></span></a>'));x.click(a.fancybox.close);p.click(a.fancybox.cancel);v.click(function(b){b.preventDefault();a.fancybox.prev()});t.click(function(b){b.preventDefault();a.fancybox.next()});a.fn.mousewheel&&d.bind("mousewheel.fb",function(b,c){if(e)b.preventDefault();else if(a(b.target).get(0).clientHeight==0||a(b.target).get(0).scrollHeight===a(b.target).get(0).clientHeight){b.preventDefault();a.fancybox[c>0?"prev":"next"]()}});a.support.opacity||d.addClass("fancybox-ie");if(E){p.addClass("fancybox-ie6");d.addClass("fancybox-ie6");a('<iframe id="fancybox-hide-sel-frame" src="'+(/^https/i.test(window.location.href||"")?"javascript:void(false)":"about:blank")+'" scrolling="no" border="0" frameborder="0" tabindex="-1"></iframe>').prependTo(w)}}};a.fn.fancybox.defaults={padding:10,margin:40,opacity:false,modal:false,cyclic:false,scrolling:"auto",width:560,height:340,autoScale:true,autoDimensions:true,centerOnScroll:false,ajax:{},swf:{wmode:"transparent"},hideOnOverlayClick:true,hideOnContentClick:false,overlayShow:true,overlayOpacity:.7,overlayColor:"#777",titleShow:true,titlePosition:"float",titleFormat:null,titleFromAlt:false,transitionIn:"fade",transitionOut:"fade",speedIn:300,speedOut:300,changeSpeed:300,changeFade:"fast",easingIn:"swing",easingOut:"swing",showCloseButton:true,showNavArrows:true,enableEscapeButton:true,enableKeyboardNav:true,onStart:function(){},onCancel:function(){},onComplete:function(){},onCleanup:function(){},onClosed:function(){},onError:function(){}};a(document).ready(function(){a.fancybox.init()})})(jQuery);(function(a){a.fn.hoverIntent=function(j,k){var b={sensitivity:7,interval:100,timeout:0};b=a.extend(b,k?{over:j,out:k}:j);var d,e,f,g,c=function(a){d=a.pageX;e=a.pageY},i=function(j,h){h.hoverIntent_t=clearTimeout(h.hoverIntent_t);if(Math.abs(f-d)+Math.abs(g-e)<b.sensitivity){a(h).unbind("mousemove",c);h.hoverIntent_s=1;return b.over.apply(h,[j])}else{f=d;g=e;h.hoverIntent_t=setTimeout(function(){i(j,h)},b.interval)}},l=function(c,a){a.hoverIntent_t=clearTimeout(a.hoverIntent_t);a.hoverIntent_s=0;return b.out.apply(a,[c])},h=function(h){var e=jQuery.extend({},h),d=this;if(d.hoverIntent_t)d.hoverIntent_t=clearTimeout(d.hoverIntent_t);if(h.type=="mouseenter"){f=e.pageX;g=e.pageY;a(d).bind("mousemove",c);if(d.hoverIntent_s!=1)d.hoverIntent_t=setTimeout(function(){i(e,d)},b.interval)}else{a(d).unbind("mousemove",c);if(d.hoverIntent_s==1)d.hoverIntent_t=setTimeout(function(){l(e,d)},b.timeout)}};return this.bind("mouseenter",h).bind("mouseleave",h)}})(jQuery);(function(a,b,g){a.fn.borderWidth=function(){return a(this).outerWidth()-a(this).innerWidth()};a.fn.paddingWidth=function(){return a(this).innerWidth()-a(this).width()};a.fn.extraWidth=function(){return a(this).outerWidth(true)-a(this).width()};a.fn.offsetFrom=function(c){var b=a(c);return{left:a(this).offset().left-b.offset().left,top:a(this).offset().top-b.offset().top}};a.fn.maxWidth=function(){var b=0;a(this).each(function(){if(a(this).width()>b)b=a(this).width()});return b};a.fn.triggerAll=function(b,c){return a(this).each(function(){a(this).triggerHandler(b,c)})};var e=Array.prototype.slice,c=function(){return Math.floor(Math.random()*999999999)};a.proto=function(){var c=arguments[0],b=arguments[1],d=b,g={},f;opts=a.extend({elem:"elem",access:"access",init:"init",instantAccess:false},arguments[2]);if(b._super){g[opts.init]=function(){};d=b.extend(g)}a.fn[c]=function(){var h,g=arguments;a(this).each(function(){var j=a(this),i=j.data(c),k=!i;if(k){i=new d;if(b._super)i[opts.init]=b.prototype.init;i[opts.elem]=j[0];i[opts.init]&&i[opts.init].apply(i,opts.instantAccess?[]:e.call(g,0));j.data(c,i)}if(!k||opts.instantAccess){i[opts.access]&&i[opts.access].apply(i,e.call(g,0));if(g.length>0)if(a.isFunction(i[g[0]]))h=i[g[0]].apply(i,e.call(g,1));else if(g.length===1)if(a.getObject)h=a.getObject(g[0],i);else h=i[g[0]];else if(a.setObject)a.setObject(g[0],g[1],i);else i[g[0]]=g[1];else if(h===f)h=j.data(c)}});return h===f?a(this):h}};var d=function(){return false},f=function(){var cb=this,e={},i=null,p=null,h=null,j=null,f=null,l=null,L="",r=null,Y=null,O=null,X,D,T,M,z,q,Z,t,k,o,v,G,E,W,V,x,C,ab,I,A,y,P,H,J,s,u,m,w,Q,S,U,bb,N,B,K,n,R,F;X=function(){h=a("<div class='sb "+e.selectboxClass+" "+i.attr("class")+"' id='sb"+c()+"'></div>").attr("role","listbox").attr("aria-has-popup","true").attr("aria-labelledby",p.attr("id")?p.attr("id"):"");a("body").append(h);var k=i.children().size()>0?e.displayFormat.call(i.find("option:selected")[0],0,0):"&nbsp;";j=a("<div class='display "+i.attr("class")+"' id='sbd"+c()+"'></div>").append(a("<div class='text'></div>").append(k)).append(e.arrowMarkup);h.append(j);f=a("<ul class='"+e.selectboxClass+" items "+i.attr("class")+"' role='menu' id='sbdd"+c()+"'></ul>").attr("aria-hidden","true");h.append(f).attr("aria-owns",f.attr("id"));if(i.children().size()===0)f.append(D().addClass("selected"));else i.children().each(function(c){var h,b,d,g;if(a(this).is("optgroup")){b=a(this);d=a("<li class='optgroup'>"+e.optgroupFormat.call(b[0],c+1)+"</li>").addClass(b.is(":disabled")?"disabled":"").attr("aria-disabled",b.is(":disabled")?"true":"");g=a("<ul class='items'></ul>");d.append(g);f.append(d);b.children("option").each(function(){h=D(a(this),c).addClass(b.is(":disabled")?"disabled":"").attr("aria-disabled",b.is(":disabled")?"true":"");g.append(h)})}else f.append(D(a(this),c))});l=f.find("li").not(".optgroup");h.attr("aria-active-descendant",l.filter(".selected").attr("id"));f.children(":first").addClass("first");f.children(":last").addClass("last");if(!e.fixedWidth){var g=f.find(".text, .optgroup").maxWidth()+j.extraWidth()+1;h.width(e.maxWidth?Math.min(e.maxWidth,g):g)}else e.maxWidth&&h.width()>e.maxWidth&&h.width(e.maxWidth);i.before(h).addClass("has_sb").hide().show();v();R();f.hide();if(!i.is(":disabled")){i.bind("blur.sb",M).bind("focus.sb",T);j.mouseup(P).mouseup(W).click(d).focus(ab).blur(I).hover(A,y);u().click(V).hover(A,y);f.find(".optgroup").hover(A,y).click(d);l.filter(".disabled").click(d);(!a.browser.msie||a.browser.version>=9)&&a(b).resize(a.throttle?a.throttle(100,G):E)}else{h.addClass("disabled").attr("aria-disabled");j.click(function(a){a.preventDefault()})}h.bind("close.sb",o).bind("destroy.sb",z);i.bind("reload.sb",q);a.fn.tie&&e.useTie&&i.bind("domupdate.sb",Z)};E=function(){clearTimeout(O);O=setTimeout(G,50)};G=function(){if(h.is(".open")){v();t(true)}};D=function(b,d){if(!b){b=a("<option value=''>&nbsp;</option>");d=0}var h=a("<li id='sbo"+c()+"'></li>").attr("role","option").data("orig",b[0]).data("value",b?b.attr("value"):"").addClass(b.is(":selected")?"selected":"").addClass(b.is(":disabled")?"disabled":"").attr("aria-disabled",b.is(":disabled")?"true":""),g=a("<div class='item'></div>"),f=a("<div class='text'></div>").html(e.optionFormat.call(b[0],0,d+1));return h.append(g.append(f))};T=function(){K();j.triggerHandler("focus")};M=function(){!h.is(".open")&&j.triggerHandler("blur")};z=function(c){h.remove();i.unbind(".sb").removeClass("has_sb");a(b).unbind("resize",E);!c&&i.removeData("sb")};q=function(){var a=h.is(".open"),b=j.is(".focused");o(true);z(true);cb.init(e);if(a){i.focus();t(true)}else b&&i.focus()};Z=function(){clearTimeout(Y);Y=setTimeout(q,30)};B=function(){h.removeClass("focused");o();F()};F=function(){a(document).unbind("click",B).unbind("keyup",x).unbind("keypress",n).unbind("keydown",n).unbind("keydown",C)};bb=function(){a(".sb.open."+e.selectboxClass).triggerAll("close")};K=function(){a(".sb.focused."+e.selectboxClass).not(h[0]).find(".display").blur()};N=function(){a(".sb.open."+e.selectboxClass).not(h[0]).triggerAll("close")};o=function(a){if(h.is(".open")){j.blur();l.removeClass("hover");F();f.attr("aria-hidden","true");if(a===true){f.hide();h.removeClass("open");h.append(f)}else f.fadeOut(e.animDuration,function(){h.removeClass("open");h.append(f)})}};J=function(){var b=null;if(e.ddCtx==="self")b=h;else if(a.isFunction(e.ddCtx))b=a(e.ddCtx.call(i[0]));else b=a(e.ddCtx);return b};s=function(){return l.filter(".selected")};u=function(){return l.not(".disabled")};k=function(){f.scrollTop(f.scrollTop()+s().offsetFrom(f).top-f.height()/2+s().outerHeight(true)/2)};R=function(){a.browser.msie&&a.browser.version<8&&a("."+e.selectboxClass+" .display").hide().show()};t=function(b){var a,c=J();K();h.addClass("open");c.append(f);a=v();f.attr("aria-hidden","false");if(b===true){f.show();k()}else if(a==="down")f.slideDown(e.animDuration,k);else f.fadeIn(e.animDuration,k);i.focus()};v=function(){var h=J(),c=0,r=j.offsetFrom(h).left,g=0,d="",p,q,k,i,l,m,o,n;f.removeClass("above");f.show().css({maxHeight:"none",position:"relative",visibility:"hidden"});!e.fixedWidth&&f.width(j.outerWidth()-f.extraWidth()+1);k=a(b).scrollTop()+a(b).height()-j.offset().top-j.outerHeight();i=j.offset().top-a(b).scrollTop();l=j.offsetFrom(h).top+j.outerHeight();m=k-i+e.dropupThreshold;if(f.outerHeight()<k){c=e.maxHeight?e.maxHeight:k;g=l;d="down"}else if(f.outerHeight()<i){c=e.maxHeight?e.maxHeight:i;g=j.offsetFrom(h).top-Math.min(c,f.outerHeight());d="up"}else if(m>=0){c=e.maxHeight?e.maxHeight:k;g=l;d="down"}else if(m<0){c=e.maxHeight?e.maxHeight:i;g=j.offsetFrom(h).top-Math.min(c,f.outerHeight());d="up"}else{c=e.maxHeight?e.maxHeight:"none";g=l;d="down"}p=(""+a("body").css("margin-left")).match(/^\d+/)?a("body").css("margin-left"):0;q=(""+a("body").css("margin-top")).match(/^\d+/)?a("body").css("margin-top"):0;o=a().jquery>="1.4.2"?parseInt(p):a("body").offset().left;n=a().jquery>="1.4.2"?parseInt(q):a("body").offset().top;f.hide().css({left:r+(h.is("body")?o:0),maxHeight:c,position:"absolute",top:g+(h.is("body")?n:0),visibility:"visible"});d==="up"&&f.addClass("above");return d};W=function(){if(h.is(".open"))o();else t();return false};m=function(){var b=a(this),d=i.val(),c=b.data("value");i.find("option").each(function(){this.selected=false});a(b.data("orig")).each(function(){this.selected=true});l.removeClass("selected");b.addClass("selected");h.attr("aria-active-descendant",b.attr("id"));j.find(".text").attr("title",b.find(".text").html());j.find(".text").html(e.displayFormat.call(b.data("orig")));d!==c&&i.change()};V=function(){B();i.focus();m.call(this);return false};w=function(){L=""};Q=function(e){for(var d,b,c=u(),a=0;a<c.size();a++){b=c.eq(a).find(".text");d=b.children().size()==0?b.text():b.find("*").text();if(e.length>0&&d.toLowerCase().match("^"+e.toLowerCase()))return c.eq(a)}return null};S=function(b){var a=Q(b);if(a!==null){m.call(a[0]);return true}return false};n=function(a){if(a.ctrlKey||a.altKey)return;(a.which===38||a.which===40||a.which===8||a.which===32)&&a.preventDefault()};U=function(d){for(var c,e=s(),a=u(),b=a.index(e)+1;b<a.size();b++){c=a.eq(b).find(".text").text();if(c!==""&&c.substring(0,1).toLowerCase()===d.toLowerCase()){m.call(a.eq(b)[0]);return true}}return false};C=function(b){if(b.altKey||b.ctrlKey)return false;var a=s(),c=u();switch(b.which){case 9:o();I();break;case 35:if(a.size()>0){b.preventDefault();m.call(c.filter(":last")[0]);k()}break;case 36:if(a.size()>0){b.preventDefault();m.call(c.filter(":first")[0]);k()}break;case 38:if(a.size()>0){if(c.filter(":first")[0]!==a[0]){b.preventDefault();m.call(c.eq(c.index(a)-1)[0])}k()}break;case 40:if(a.size()>0){if(c.filter(":last")[0]!==a[0]){b.preventDefault();m.call(c.eq(c.index(a)+1)[0]);k()}}else if(l.size()>1){b.preventDefault();m.call(l.eq(0)[0])}}};x=function(a){if(a.altKey||a.ctrlKey)return false;if(a.which!==38&&a.which!==40){L+=String.fromCharCode(a.keyCode);if(S(L)){clearTimeout(r);r=setTimeout(w,e.acTimeout)}else if(U(String.fromCharCode(a.keyCode))){k();clearTimeout(r);r=setTimeout(w,e.acTimeout)}else{w();clearTimeout(r)}}};ab=function(){N();h.addClass("focused");a(document).click(B).keyup(x).keypress(n).keydown(n).keydown(C)};I=function(){h.removeClass("focused");j.removeClass("active");a(document).unbind("keyup",x).unbind("keydown",n).unbind("keypress",n).unbind("keydown",C)};A=function(){a(this).addClass("hover")};y=function(){a(this).removeClass("hover")};P=function(){j.addClass("active");a(document).bind("mouseup",H)};H=function(){j.removeClass("active");a(document).unbind("mouseup",H)};this.init=function(b){if(a.browser.msie&&a.browser.version<7)return;i=a(this.elem);if(i.attr("id"))p=a("label[for='"+i.attr("id")+"']:first");if(!p||p.size()===0)p=i.closest("label");if(i.hasClass("has_sb"))return;e=a.extend({acTimeout:800,animDuration:200,ddCtx:"body",dropupThreshold:150,fixedWidth:false,maxHeight:false,maxWidth:false,selectboxClass:"selectbox",useTie:false,arrowMarkup:"<div class='arrow_btn'><span class='arrow'></span></div>",displayFormat:g,optionFormat:function(){if(a(this).size()>0){var b=a(this).attr("label");return b&&b.length>0?b:a(this).text()}else return""},optgroupFormat:function(){return"<span class='label'>"+a(this).attr("label")+"</span>"}},b);e.displayFormat=e.displayFormat||e.optionFormat;X()};this.open=t;this.close=o;this.refresh=q;this.destroy=z;this.options=function(b){e=a.extend(e,b);q()}};a.proto("sb",f)})(jQuery,window);(function(a){a.fn.filestyle=function(c){var b={width:250};c&&a.extend(b,c);return this.each(function(){var c=this,e=a("<div>").css({width:b.imagewidth+"px",height:b.imageheight+"px",background:"url("+b.image+") 0 0 no-repeat","background-position":"right",display:"inline",position:"absolute",overflow:"hidden"}),d=a('<input class="file">').addClass(a(c).attr("class")).css({display:"inline",width:b.width+"px"});a(c).before(d);a(c).wrap(e);a(c).css({position:"relative",height:b.imageheight+"px",width:b.width+"px",display:"inline",cursor:"pointer",opacity:"0.0"});if(a.browser.mozilla)if(/Win/.test(navigator.platform))a(c).css("margin-left","-142px");else a(c).css("margin-left","-168px");else a(c).css("margin-left",b.imagewidth-b.width+"px");a(c).bind("change",function(){d.val(a(c).val())})})}})(jQuery);var $_animationDone=true;$(document).ready(function(){$.each($("ul"),function(){$(this).children("li:last").addClass("last")});setTimeout(function(){$.each($("#main-menu li .menu-link"),verticalCenter)},100);setTimeout(function(){$.each($("#slider-nav li a span"),verticalCenter)},100);setTimeout(function(){$.each($("#main-menu li .menu-link"),verticalCenter)},500);setTimeout(function(){$.each($("#slider-nav li a span"),verticalCenter)},500);setTimeout(function(){$.each($("#main-menu li .menu-link"),verticalCenter)},1e3);setTimeout(function(){$.each($("#slider-nav li a span"),verticalCenter)},1e3);$(".video-link").click(function(){$.fancybox({padding:0,autoScale:false,transitionIn:"none",transitionOut:"none",title:this.title,width:640,height:360,href:this.href.replace(new RegExp("([0-9])","i"),"moogaloop.swf?clip_id=$1"),type:"swf"});return false});var a=true,b=$("#slide-container").cycle({speed:1e3,height:461,width:989,fit:1,slideExpr:$(".slide"),before:function(c,b){if(a==false){$("#slider-nav li.active").removeClass("active");$("#slider-nav li:nth-child("+($(b).index()+1)+")").addClass("active")}a=false},timeOut:4e3});$("#slider-nav li:first").addClass("active");$("#slider-nav li").click(function(a){a.preventDefault();if($_animationDone==true){b.cycle($(this).index());$("#slider-nav li.active").removeClass("active");$(this).addClass("active")}});$(window).resize(function(){centerSliderBg()});$(".latest-slider").cycle({height:43,width:969,fit:1,fx:"scrollHorz",timeout:4e3,slideExpr:$(".latest-slider a:not(#twitter)")});$(".has-submenu").hoverIntent({over:function(){$(this).addClass("hover");$(this).children(".sub-menu").slideDown()},timeout:500,out:function(){}});$(".has-submenu").mouseleave(function(){$(this).removeClass("hover");$(this).children(".sub-menu").slideUp()});$("select").sb({fixedWidth:true});$("input[type=file]").filestyle({image:"/images/common/file-button.png",imageheight:49,imagewidth:101,width:179})});function verticalCenter(){var b=$(this).height(),a=$(this).parent().height(),c=(a-b)/2;$(this).css({position:"relative"});$(this).animate({top:c+"px"},100)}
