/*
 * jQuery Cycle Plugin (with Transition Definitions)
 * Examples and documentation at: http://jquery.malsup.com/cycle/
 * Copyright (c) 2007-2010 M. Alsup
 * Version: 2.75 (10-FEB-2010)
 * Dual licensed under the MIT and GPL licenses:
 * http://www.opensource.org/licenses/mit-license.php
 * http://www.gnu.org/licenses/gpl.html
 * Requires: jQuery v1.2.6 or later
 */
(function($){var ver="2.75";if($.support==undefined){$.support={opacity:!($.browser.msie)};}function debug(s){if($.fn.cycle.debug){log(s);}}function log(){if(window.console&&window.console.log){window.console.log("[cycle] "+Array.prototype.join.call(arguments," "));}}$.fn.cycle=function(options,arg2){var o={s:this.selector,c:this.context};if(this.length===0&&options!="stop"){if(!$.isReady&&o.s){log("DOM not ready, queuing slideshow");$(function(){$(o.s,o.c).cycle(options,arg2);});return this;}log("terminating; zero elements found by selector"+($.isReady?"":" (DOM not ready)"));return this;}return this.each(function(){var opts=handleArguments(this,options,arg2);if(opts===false){return;}opts.updateActivePagerLink=opts.updateActivePagerLink||$.fn.cycle.updateActivePagerLink;if(this.cycleTimeout){clearTimeout(this.cycleTimeout);}this.cycleTimeout=this.cyclePause=0;var $cont=$(this);var $slides=opts.slideExpr?$(opts.slideExpr,this):$cont.children();var els=$slides.get();if(els.length<2){log("terminating; too few slides: "+els.length);return;}var opts2=buildOptions($cont,$slides,els,opts,o);if(opts2===false){return;}var startTime=opts2.continuous?10:getTimeout(opts2.currSlide,opts2.nextSlide,opts2,!opts2.rev);if(startTime){startTime+=(opts2.delay||0);if(startTime<10){startTime=10;}debug("first timeout: "+startTime);this.cycleTimeout=setTimeout(function(){go(els,opts2,0,!opts2.rev);},startTime);}});};function handleArguments(cont,options,arg2){if(cont.cycleStop==undefined){cont.cycleStop=0;}if(options===undefined||options===null){options={};}if(options.constructor==String){switch(options){case"stop":cont.cycleStop++;if(cont.cycleTimeout){clearTimeout(cont.cycleTimeout);}cont.cycleTimeout=0;$(cont).removeData("cycle.opts");return false;case"toggle":cont.cyclePause=(cont.cyclePause===1)?0:1;return false;case"pause":cont.cyclePause=1;return false;case"resume":cont.cyclePause=0;if(arg2===true){options=$(cont).data("cycle.opts");if(!options){log("options not found, can not resume");return false;}if(cont.cycleTimeout){clearTimeout(cont.cycleTimeout);cont.cycleTimeout=0;}go(options.elements,options,1,1);}return false;case"prev":case"next":var opts=$(cont).data("cycle.opts");if(!opts){log('options not found, "prev/next" ignored');return false;}$.fn.cycle[options](opts);return false;default:options={fx:options};}return options;}else{if(options.constructor==Number){var num=options;options=$(cont).data("cycle.opts");if(!options){log("options not found, can not advance slide");return false;}if(num<0||num>=options.elements.length){log("invalid slide index: "+num);return false;}options.nextSlide=num;if(cont.cycleTimeout){clearTimeout(cont.cycleTimeout);cont.cycleTimeout=0;}if(typeof arg2=="string"){options.oneTimeFx=arg2;}go(options.elements,options,1,num>=options.currSlide);return false;}}return options;}function removeFilter(el,opts){if(!$.support.opacity&&opts.cleartype&&el.style.filter){try{el.style.removeAttribute("filter");}catch(smother){}}}function buildOptions($cont,$slides,els,options,o){var opts=$.extend({},$.fn.cycle.defaults,options||{},$.metadata?$cont.metadata():$.meta?$cont.data():{});if(opts.autostop){opts.countdown=opts.autostopCount||els.length;}var cont=$cont[0];$cont.data("cycle.opts",opts);opts.$cont=$cont;opts.stopCount=cont.cycleStop;opts.elements=els;opts.before=opts.before?[opts.before]:[];opts.after=opts.after?[opts.after]:[];opts.after.unshift(function(){opts.busy=0;});if(!$.support.opacity&&opts.cleartype){opts.after.push(function(){removeFilter(this,opts);});}if(opts.continuous){opts.after.push(function(){go(els,opts,0,!opts.rev);});}saveOriginalOpts(opts);if(!$.support.opacity&&opts.cleartype&&!opts.cleartypeNoBg){clearTypeFix($slides);}if($cont.css("position")=="static"){$cont.css("position","relative");}if(opts.width){$cont.width(opts.width);}if(opts.height&&opts.height!="auto"){$cont.height(opts.height);}if(opts.startingSlide){opts.startingSlide=parseInt(opts.startingSlide);}if(opts.random){opts.randomMap=[];for(var i=0;i<els.length;i++){opts.randomMap.push(i);}opts.randomMap.sort(function(a,b){return Math.random()-0.5;});opts.randomIndex=1;opts.startingSlide=opts.randomMap[1];}else{if(opts.startingSlide>=els.length){opts.startingSlide=0;}}opts.currSlide=opts.startingSlide||0;var first=opts.startingSlide;$slides.css({position:"absolute",top:0,left:0}).hide().each(function(i){var z=first?i>=first?els.length-(i-first):first-i:els.length-i;$(this).css("z-index",z);});$(els[first]).css("opacity",1).show();removeFilter(els[first],opts);if(opts.fit&&opts.width){$slides.width(opts.width);}if(opts.fit&&opts.height&&opts.height!="auto"){$slides.height(opts.height);}var reshape=opts.containerResize&&!$cont.innerHeight();if(reshape){var maxw=0,maxh=0;for(var j=0;j<els.length;j++){var $e=$(els[j]),e=$e[0],w=$e.outerWidth(),h=$e.outerHeight();if(!w){w=e.offsetWidth;}if(!h){h=e.offsetHeight;}maxw=w>maxw?w:maxw;maxh=h>maxh?h:maxh;}if(maxw>0&&maxh>0){$cont.css({width:maxw+"px",height:maxh+"px"});}}if(opts.pause){$cont.hover(function(){this.cyclePause++;},function(){this.cyclePause--;});}if(supportMultiTransitions(opts)===false){return false;}var requeue=false;options.requeueAttempts=options.requeueAttempts||0;$slides.each(function(){var $el=$(this);this.cycleH=(opts.fit&&opts.height)?opts.height:$el.height();this.cycleW=(opts.fit&&opts.width)?opts.width:$el.width();if($el.is("img")){var loadingIE=($.browser.msie&&this.cycleW==28&&this.cycleH==30&&!this.complete);var loadingFF=($.browser.mozilla&&this.cycleW==34&&this.cycleH==19&&!this.complete);var loadingOp=($.browser.opera&&((this.cycleW==42&&this.cycleH==19)||(this.cycleW==37&&this.cycleH==17))&&!this.complete);var loadingOther=(this.cycleH==0&&this.cycleW==0&&!this.complete);if(loadingIE||loadingFF||loadingOp||loadingOther){if(o.s&&opts.requeueOnImageNotLoaded&&++options.requeueAttempts<100){log(options.requeueAttempts," - img slide not loaded, requeuing slideshow: ",this.src,this.cycleW,this.cycleH);setTimeout(function(){$(o.s,o.c).cycle(options);},opts.requeueTimeout);requeue=true;return false;}else{log("could not determine size of image: "+this.src,this.cycleW,this.cycleH);}}}return true;});if(requeue){return false;}opts.cssBefore=opts.cssBefore||{};opts.animIn=opts.animIn||{};opts.animOut=opts.animOut||{};$slides.not(":eq("+first+")").css(opts.cssBefore);if(opts.cssFirst){$($slides[first]).css(opts.cssFirst);}if(opts.timeout){opts.timeout=parseInt(opts.timeout);if(opts.speed.constructor==String){opts.speed=$.fx.speeds[opts.speed]||parseInt(opts.speed);}if(!opts.sync){opts.speed=opts.speed/2;}while((opts.timeout-opts.speed)<250){opts.timeout+=opts.speed;}}if(opts.easing){opts.easeIn=opts.easeOut=opts.easing;}if(!opts.speedIn){opts.speedIn=opts.speed;}if(!opts.speedOut){opts.speedOut=opts.speed;}opts.slideCount=els.length;opts.currSlide=opts.lastSlide=first;if(opts.random){if(++opts.randomIndex==els.length){opts.randomIndex=0;}opts.nextSlide=opts.randomMap[opts.randomIndex];}else{opts.nextSlide=opts.startingSlide>=(els.length-1)?0:opts.startingSlide+1;}if(!opts.multiFx){var init=$.fn.cycle.transitions[opts.fx];if($.isFunction(init)){init($cont,$slides,opts);}else{if(opts.fx!="custom"&&!opts.multiFx){log("unknown transition: "+opts.fx,"; slideshow terminating");return false;}}}var e0=$slides[first];if(opts.before.length){opts.before[0].apply(e0,[e0,e0,opts,true]);}if(opts.after.length>1){opts.after[1].apply(e0,[e0,e0,opts,true]);}if(opts.next){$(opts.next).bind(opts.prevNextEvent,function(){return advance(opts,opts.rev?-1:1);});}if(opts.prev){$(opts.prev).bind(opts.prevNextEvent,function(){return advance(opts,opts.rev?1:-1);});}if(opts.pager){buildPager(els,opts);}exposeAddSlide(opts,els);return opts;}function saveOriginalOpts(opts){opts.original={before:[],after:[]};opts.original.cssBefore=$.extend({},opts.cssBefore);opts.original.cssAfter=$.extend({},opts.cssAfter);opts.original.animIn=$.extend({},opts.animIn);opts.original.animOut=$.extend({},opts.animOut);$.each(opts.before,function(){opts.original.before.push(this);});$.each(opts.after,function(){opts.original.after.push(this);});}function supportMultiTransitions(opts){var i,tx,txs=$.fn.cycle.transitions;if(opts.fx.indexOf(",")>0){opts.multiFx=true;opts.fxs=opts.fx.replace(/\s*/g,"").split(",");for(i=0;i<opts.fxs.length;i++){var fx=opts.fxs[i];tx=txs[fx];if(!tx||!txs.hasOwnProperty(fx)||!$.isFunction(tx)){log("discarding unknown transition: ",fx);opts.fxs.splice(i,1);i--;}}if(!opts.fxs.length){log("No valid transitions named; slideshow terminating.");return false;}}else{if(opts.fx=="all"){opts.multiFx=true;opts.fxs=[];for(p in txs){tx=txs[p];if(txs.hasOwnProperty(p)&&$.isFunction(tx)){opts.fxs.push(p);}}}}if(opts.multiFx&&opts.randomizeEffects){var r1=Math.floor(Math.random()*20)+30;for(i=0;i<r1;i++){var r2=Math.floor(Math.random()*opts.fxs.length);opts.fxs.push(opts.fxs.splice(r2,1)[0]);}debug("randomized fx sequence: ",opts.fxs);}return true;}function exposeAddSlide(opts,els){opts.addSlide=function(newSlide,prepend){var $s=$(newSlide),s=$s[0];if(!opts.autostopCount){opts.countdown++;}els[prepend?"unshift":"push"](s);if(opts.els){opts.els[prepend?"unshift":"push"](s);}opts.slideCount=els.length;$s.css("position","absolute");$s[prepend?"prependTo":"appendTo"](opts.$cont);if(prepend){opts.currSlide++;opts.nextSlide++;}if(!$.support.opacity&&opts.cleartype&&!opts.cleartypeNoBg){clearTypeFix($s);}if(opts.fit&&opts.width){$s.width(opts.width);}if(opts.fit&&opts.height&&opts.height!="auto"){$slides.height(opts.height);}s.cycleH=(opts.fit&&opts.height)?opts.height:$s.height();s.cycleW=(opts.fit&&opts.width)?opts.width:$s.width();$s.css(opts.cssBefore);if(opts.pager){$.fn.cycle.createPagerAnchor(els.length-1,s,$(opts.pager),els,opts);}if($.isFunction(opts.onAddSlide)){opts.onAddSlide($s);}else{$s.hide();}};}$.fn.cycle.resetState=function(opts,fx){fx=fx||opts.fx;opts.before=[];opts.after=[];opts.cssBefore=$.extend({},opts.original.cssBefore);opts.cssAfter=$.extend({},opts.original.cssAfter);opts.animIn=$.extend({},opts.original.animIn);opts.animOut=$.extend({},opts.original.animOut);opts.fxFn=null;$.each(opts.original.before,function(){opts.before.push(this);});$.each(opts.original.after,function(){opts.after.push(this);});var init=$.fn.cycle.transitions[fx];if($.isFunction(init)){init(opts.$cont,$(opts.elements),opts);}};function go(els,opts,manual,fwd){if(manual&&opts.busy&&opts.manualTrump){$(els).stop(true,true);opts.busy=false;}if(opts.busy){return;}var p=opts.$cont[0],curr=els[opts.currSlide],next=els[opts.nextSlide];if(p.cycleStop!=opts.stopCount||p.cycleTimeout===0&&!manual){return;}if(!manual&&!p.cyclePause&&((opts.autostop&&(--opts.countdown<=0))||(opts.nowrap&&!opts.random&&opts.nextSlide<opts.currSlide))){if(opts.end){opts.end(opts);}return;}if(manual||!p.cyclePause){var fx=opts.fx;curr.cycleH=curr.cycleH||$(curr).height();curr.cycleW=curr.cycleW||$(curr).width();next.cycleH=next.cycleH||$(next).height();next.cycleW=next.cycleW||$(next).width();if(opts.multiFx){if(opts.lastFx==undefined||++opts.lastFx>=opts.fxs.length){opts.lastFx=0;}fx=opts.fxs[opts.lastFx];opts.currFx=fx;}if(opts.oneTimeFx){fx=opts.oneTimeFx;opts.oneTimeFx=null;}$.fn.cycle.resetState(opts,fx);if(opts.before.length){$.each(opts.before,function(i,o){if(p.cycleStop!=opts.stopCount){return;}o.apply(next,[curr,next,opts,fwd]);});}var after=function(){$.each(opts.after,function(i,o){if(p.cycleStop!=opts.stopCount){return;}o.apply(next,[curr,next,opts,fwd]);});};if(opts.nextSlide!=opts.currSlide){opts.busy=1;if(opts.fxFn){opts.fxFn(curr,next,opts,after,fwd);}else{if($.isFunction($.fn.cycle[opts.fx])){$.fn.cycle[opts.fx](curr,next,opts,after);}else{$.fn.cycle.custom(curr,next,opts,after,manual&&opts.fastOnEvent);}}}opts.lastSlide=opts.currSlide;if(opts.random){opts.currSlide=opts.nextSlide;if(++opts.randomIndex==els.length){opts.randomIndex=0;}opts.nextSlide=opts.randomMap[opts.randomIndex];}else{var roll=(opts.nextSlide+1)==els.length;opts.nextSlide=roll?0:opts.nextSlide+1;opts.currSlide=roll?els.length-1:opts.nextSlide-1;}if(opts.pager){opts.updateActivePagerLink(opts.pager,opts.currSlide,opts.activePagerClass);}}var ms=0;if(opts.timeout&&!opts.continuous){ms=getTimeout(curr,next,opts,fwd);}else{if(opts.continuous&&p.cyclePause){ms=10;}}if(ms>0){p.cycleTimeout=setTimeout(function(){go(els,opts,0,!opts.rev);},ms);}}$.fn.cycle.updateActivePagerLink=function(pager,currSlide,clsName){$(pager).each(function(){$(this).find("a").removeClass(clsName).filter("a:eq("+currSlide+")").addClass(clsName);});};function getTimeout(curr,next,opts,fwd){if(opts.timeoutFn){var t=opts.timeoutFn(curr,next,opts,fwd);while((t-opts.speed)<250){t+=opts.speed;}debug("calculated timeout: "+t+"; speed: "+opts.speed);if(t!==false){return t;}}return opts.timeout;}$.fn.cycle.next=function(opts){advance(opts,opts.rev?-1:1);};$.fn.cycle.prev=function(opts){advance(opts,opts.rev?1:-1);};function advance(opts,val){var els=opts.elements;var p=opts.$cont[0],timeout=p.cycleTimeout;if(timeout){clearTimeout(timeout);p.cycleTimeout=0;}if(opts.random&&val<0){opts.randomIndex--;if(--opts.randomIndex==-2){opts.randomIndex=els.length-2;}else{if(opts.randomIndex==-1){opts.randomIndex=els.length-1;}}opts.nextSlide=opts.randomMap[opts.randomIndex];}else{if(opts.random){opts.nextSlide=opts.randomMap[opts.randomIndex];}else{opts.nextSlide=opts.currSlide+val;if(opts.nextSlide<0){if(opts.nowrap){return false;}opts.nextSlide=els.length-1;}else{if(opts.nextSlide>=els.length){if(opts.nowrap){return false;}opts.nextSlide=0;}}}}if($.isFunction(opts.prevNextClick)){opts.prevNextClick(val>0,opts.nextSlide,els[opts.nextSlide]);}go(els,opts,1,val>=0);return false;}function buildPager(els,opts){var $p=$(opts.pager);$.each(els,function(i,o){$.fn.cycle.createPagerAnchor(i,o,$p,els,opts);});opts.updateActivePagerLink(opts.pager,opts.startingSlide,opts.activePagerClass);}$.fn.cycle.createPagerAnchor=function(i,el,$p,els,opts){var a;if($.isFunction(opts.pagerAnchorBuilder)){a=opts.pagerAnchorBuilder(i,el);}else{a='<a href="#">'+(i+1)+"</a>";}if(!a){return;}var $a=$(a);if($a.parents("body").length===0){var arr=[];if($p.length>1){$p.each(function(){var $clone=$a.clone(true);$(this).append($clone);arr.push($clone[0]);});$a=$(arr);}else{$a.appendTo($p);}}$a.bind(opts.pagerEvent,function(e){e.preventDefault();opts.nextSlide=i;var p=opts.$cont[0],timeout=p.cycleTimeout;if(timeout){clearTimeout(timeout);p.cycleTimeout=0;}if($.isFunction(opts.pagerClick)){opts.pagerClick(opts.nextSlide,els[opts.nextSlide]);}go(els,opts,1,opts.currSlide<i);return false;});if(opts.pagerEvent!="click"){$a.click(function(){return false;});}if(opts.pauseOnPagerHover){$a.hover(function(){opts.$cont[0].cyclePause++;},function(){opts.$cont[0].cyclePause--;});}};$.fn.cycle.hopsFromLast=function(opts,fwd){var hops,l=opts.lastSlide,c=opts.currSlide;if(fwd){hops=c>l?c-l:opts.slideCount-l;}else{hops=c<l?l-c:l+opts.slideCount-c;}return hops;};function clearTypeFix($slides){function hex(s){s=parseInt(s).toString(16);return s.length<2?"0"+s:s;}function getBg(e){for(;e&&e.nodeName.toLowerCase()!="html";e=e.parentNode){var v=$.css(e,"background-color");if(v.indexOf("rgb")>=0){var rgb=v.match(/\d+/g);return"#"+hex(rgb[0])+hex(rgb[1])+hex(rgb[2]);}if(v&&v!="transparent"){return v;}}return"#ffffff";}$slides.each(function(){$(this).css("background-color",getBg(this));});}$.fn.cycle.commonReset=function(curr,next,opts,w,h,rev){$(opts.elements).not(curr).hide();opts.cssBefore.opacity=1;opts.cssBefore.display="block";if(w!==false&&next.cycleW>0){opts.cssBefore.width=next.cycleW;}if(h!==false&&next.cycleH>0){opts.cssBefore.height=next.cycleH;}opts.cssAfter=opts.cssAfter||{};opts.cssAfter.display="none";$(curr).css("zIndex",opts.slideCount+(rev===true?1:0));$(next).css("zIndex",opts.slideCount+(rev===true?0:1));};$.fn.cycle.custom=function(curr,next,opts,cb,speedOverride){var $l=$(curr),$n=$(next);var speedIn=opts.speedIn,speedOut=opts.speedOut,easeIn=opts.easeIn,easeOut=opts.easeOut;$n.css(opts.cssBefore);if(speedOverride){if(typeof speedOverride=="number"){speedIn=speedOut=speedOverride;}else{speedIn=speedOut=1;}easeIn=easeOut=null;}var fn=function(){$n.animate(opts.animIn,speedIn,easeIn,cb);};$l.animate(opts.animOut,speedOut,easeOut,function(){if(opts.cssAfter){$l.css(opts.cssAfter);}if(!opts.sync){fn();}});if(opts.sync){fn();}};$.fn.cycle.transitions={fade:function($cont,$slides,opts){$slides.not(":eq("+opts.currSlide+")").css("opacity",0);opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts);opts.cssBefore.opacity=0;});opts.animIn={opacity:1};opts.animOut={opacity:0};opts.cssBefore={top:0,left:0};}};$.fn.cycle.ver=function(){return ver;};$.fn.cycle.defaults={fx:"fade",timeout:4000,timeoutFn:null,continuous:0,speed:1000,speedIn:null,speedOut:null,next:null,prev:null,prevNextClick:null,prevNextEvent:"click",pager:null,pagerClick:null,pagerEvent:"click",pagerAnchorBuilder:null,before:null,after:null,end:null,easing:null,easeIn:null,easeOut:null,shuffle:null,animIn:null,animOut:null,cssBefore:null,cssAfter:null,fxFn:null,height:"auto",startingSlide:0,sync:1,random:0,fit:0,containerResize:1,pause:0,pauseOnPagerHover:0,autostop:0,autostopCount:0,delay:0,slideExpr:null,cleartype:!$.support.opacity,cleartypeNoBg:false,nowrap:0,fastOnEvent:0,randomizeEffects:1,rev:0,manualTrump:true,requeueOnImageNotLoaded:true,requeueTimeout:250,activePagerClass:"activeSlide",updateActivePagerLink: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-2008 M. Alsup
 * Version:	 2.72
 * Dual licensed under the MIT and GPL licenses:
 * http://www.opensource.org/licenses/mit-license.php
 * http://www.gnu.org/licenses/gpl.html
 */
(function($){$.fn.cycle.transitions.none=function($cont,$slides,opts){opts.fxFn=function(curr,next,opts,after){$(next).show();$(curr).hide();after();};};$.fn.cycle.transitions.scrollUp=function($cont,$slides,opts){$cont.css("overflow","hidden");opts.before.push($.fn.cycle.commonReset);var h=$cont.height();opts.cssBefore={top:h,left:0};opts.cssFirst={top:0};opts.animIn={top:0};opts.animOut={top:-h};};$.fn.cycle.transitions.scrollDown=function($cont,$slides,opts){$cont.css("overflow","hidden");opts.before.push($.fn.cycle.commonReset);var h=$cont.height();opts.cssFirst={top:0};opts.cssBefore={top:-h,left:0};opts.animIn={top:0};opts.animOut={top:h};};$.fn.cycle.transitions.scrollLeft=function($cont,$slides,opts){$cont.css("overflow","hidden");opts.before.push($.fn.cycle.commonReset);var w=$cont.width();opts.cssFirst={left:0};opts.cssBefore={left:w,top:0};opts.animIn={left:0};opts.animOut={left:0-w};};$.fn.cycle.transitions.scrollRight=function($cont,$slides,opts){$cont.css("overflow","hidden");opts.before.push($.fn.cycle.commonReset);var w=$cont.width();opts.cssFirst={left:0};opts.cssBefore={left:-w,top:0};opts.animIn={left:0};opts.animOut={left:w};};$.fn.cycle.transitions.scrollHorz=function($cont,$slides,opts){$cont.css("overflow","hidden").width();opts.before.push(function(curr,next,opts,fwd){$.fn.cycle.commonReset(curr,next,opts);opts.cssBefore.left=fwd?(next.cycleW-1):(1-next.cycleW);opts.animOut.left=fwd?-curr.cycleW:curr.cycleW;});opts.cssFirst={left:0};opts.cssBefore={top:0};opts.animIn={left:0};opts.animOut={top:0};};$.fn.cycle.transitions.scrollVert=function($cont,$slides,opts){$cont.css("overflow","hidden");opts.before.push(function(curr,next,opts,fwd){$.fn.cycle.commonReset(curr,next,opts);opts.cssBefore.top=fwd?(1-next.cycleH):(next.cycleH-1);opts.animOut.top=fwd?curr.cycleH:-curr.cycleH;});opts.cssFirst={top:0};opts.cssBefore={left:0};opts.animIn={top:0};opts.animOut={left:0};};$.fn.cycle.transitions.slideX=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$(opts.elements).not(curr).hide();$.fn.cycle.commonReset(curr,next,opts,false,true);opts.animIn.width=next.cycleW;});opts.cssBefore={left:0,top:0,width:0};opts.animIn={width:"show"};opts.animOut={width:0};};$.fn.cycle.transitions.slideY=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$(opts.elements).not(curr).hide();$.fn.cycle.commonReset(curr,next,opts,true,false);opts.animIn.height=next.cycleH;});opts.cssBefore={left:0,top:0,height:0};opts.animIn={height:"show"};opts.animOut={height:0};};$.fn.cycle.transitions.shuffle=function($cont,$slides,opts){var i,w=$cont.css("overflow","visible").width();$slides.css({left:0,top:0});opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,true,true);});if(!opts.speedAdjusted){opts.speed=opts.speed/2;opts.speedAdjusted=true;}opts.random=0;opts.shuffle=opts.shuffle||{left:-w,top:15};opts.els=[];for(i=0;i<$slides.length;i++){opts.els.push($slides[i]);}for(i=0;i<opts.currSlide;i++){opts.els.push(opts.els.shift());}opts.fxFn=function(curr,next,opts,cb,fwd){var $el=fwd?$(curr):$(next);$(next).css(opts.cssBefore);var count=opts.slideCount;$el.animate(opts.shuffle,opts.speedIn,opts.easeIn,function(){var hops=$.fn.cycle.hopsFromLast(opts,fwd);for(var k=0;k<hops;k++){fwd?opts.els.push(opts.els.shift()):opts.els.unshift(opts.els.pop());}if(fwd){for(var i=0,len=opts.els.length;i<len;i++){$(opts.els[i]).css("z-index",len-i+count);}}else{var z=$(curr).css("z-index");$el.css("z-index",parseInt(z)+1+count);}$el.animate({left:0,top:0},opts.speedOut,opts.easeOut,function(){$(fwd?this:curr).hide();if(cb){cb();}});});};opts.cssBefore={display:"block",opacity:1,top:0,left:0};};$.fn.cycle.transitions.turnUp=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,false);opts.cssBefore.top=next.cycleH;opts.animIn.height=next.cycleH;});opts.cssFirst={top:0};opts.cssBefore={left:0,height:0};opts.animIn={top:0};opts.animOut={height:0};};$.fn.cycle.transitions.turnDown=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,false);opts.animIn.height=next.cycleH;opts.animOut.top=curr.cycleH;});opts.cssFirst={top:0};opts.cssBefore={left:0,top:0,height:0};opts.animOut={height:0};};$.fn.cycle.transitions.turnLeft=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,true);opts.cssBefore.left=next.cycleW;opts.animIn.width=next.cycleW;});opts.cssBefore={top:0,width:0};opts.animIn={left:0};opts.animOut={width:0};};$.fn.cycle.transitions.turnRight=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,true);opts.animIn.width=next.cycleW;opts.animOut.left=curr.cycleW;});opts.cssBefore={top:0,left:0,width:0};opts.animIn={left:0};opts.animOut={width:0};};$.fn.cycle.transitions.zoom=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,false,true);opts.cssBefore.top=next.cycleH/2;opts.cssBefore.left=next.cycleW/2;opts.animIn={top:0,left:0,width:next.cycleW,height:next.cycleH};opts.animOut={width:0,height:0,top:curr.cycleH/2,left:curr.cycleW/2};});opts.cssFirst={top:0,left:0};opts.cssBefore={width:0,height:0};};$.fn.cycle.transitions.fadeZoom=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,false);opts.cssBefore.left=next.cycleW/2;opts.cssBefore.top=next.cycleH/2;opts.animIn={top:0,left:0,width:next.cycleW,height:next.cycleH};});opts.cssBefore={width:0,height:0};opts.animOut={opacity:0};};$.fn.cycle.transitions.blindX=function($cont,$slides,opts){var w=$cont.css("overflow","hidden").width();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts);opts.animIn.width=next.cycleW;opts.animOut.left=curr.cycleW;});opts.cssBefore={left:w,top:0};opts.animIn={left:0};opts.animOut={left:w};};$.fn.cycle.transitions.blindY=function($cont,$slides,opts){var h=$cont.css("overflow","hidden").height();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts);opts.animIn.height=next.cycleH;opts.animOut.top=curr.cycleH;});opts.cssBefore={top:h,left:0};opts.animIn={top:0};opts.animOut={top:h};};$.fn.cycle.transitions.blindZ=function($cont,$slides,opts){var h=$cont.css("overflow","hidden").height();var w=$cont.width();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts);opts.animIn.height=next.cycleH;opts.animOut.top=curr.cycleH;});opts.cssBefore={top:h,left:w};opts.animIn={top:0,left:0};opts.animOut={top:h,left:w};};$.fn.cycle.transitions.growX=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,true);opts.cssBefore.left=this.cycleW/2;opts.animIn={left:0,width:this.cycleW};opts.animOut={left:0};});opts.cssBefore={width:0,top:0};};$.fn.cycle.transitions.growY=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,false);opts.cssBefore.top=this.cycleH/2;opts.animIn={top:0,height:this.cycleH};opts.animOut={top:0};});opts.cssBefore={height:0,left:0};};$.fn.cycle.transitions.curtainX=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,true,true);opts.cssBefore.left=next.cycleW/2;opts.animIn={left:0,width:this.cycleW};opts.animOut={left:curr.cycleW/2,width:0};});opts.cssBefore={top:0,width:0};};$.fn.cycle.transitions.curtainY=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,false,true);opts.cssBefore.top=next.cycleH/2;opts.animIn={top:0,height:next.cycleH};opts.animOut={top:curr.cycleH/2,height:0};});opts.cssBefore={left:0,height:0};};$.fn.cycle.transitions.cover=function($cont,$slides,opts){var d=opts.direction||"left";var w=$cont.css("overflow","hidden").width();var h=$cont.height();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts);if(d=="right"){opts.cssBefore.left=-w;}else{if(d=="up"){opts.cssBefore.top=h;}else{if(d=="down"){opts.cssBefore.top=-h;}else{opts.cssBefore.left=w;}}}});opts.animIn={left:0,top:0};opts.animOut={opacity:1};opts.cssBefore={top:0,left:0};};$.fn.cycle.transitions.uncover=function($cont,$slides,opts){var d=opts.direction||"left";var w=$cont.css("overflow","hidden").width();var h=$cont.height();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,true,true);if(d=="right"){opts.animOut.left=w;}else{if(d=="up"){opts.animOut.top=-h;}else{if(d=="down"){opts.animOut.top=h;}else{opts.animOut.left=-w;}}}});opts.animIn={left:0,top:0};opts.animOut={opacity:1};opts.cssBefore={top:0,left:0};};$.fn.cycle.transitions.toss=function($cont,$slides,opts){var w=$cont.css("overflow","visible").width();var h=$cont.height();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,true,true);if(!opts.animOut.left&&!opts.animOut.top){opts.animOut={left:w*2,top:-h/2,opacity:0};}else{opts.animOut.opacity=0;}});opts.cssBefore={left:0,top:0};opts.animIn={left:0};};$.fn.cycle.transitions.wipe=function($cont,$slides,opts){var w=$cont.css("overflow","hidden").width();var h=$cont.height();opts.cssBefore=opts.cssBefore||{};var clip;if(opts.clip){if(/l2r/.test(opts.clip)){clip="rect(0px 0px "+h+"px 0px)";}else{if(/r2l/.test(opts.clip)){clip="rect(0px "+w+"px "+h+"px "+w+"px)";}else{if(/t2b/.test(opts.clip)){clip="rect(0px "+w+"px 0px 0px)";}else{if(/b2t/.test(opts.clip)){clip="rect("+h+"px "+w+"px "+h+"px 0px)";}else{if(/zoom/.test(opts.clip)){var top=parseInt(h/2);var left=parseInt(w/2);clip="rect("+top+"px "+left+"px "+top+"px "+left+"px)";}}}}}}opts.cssBefore.clip=opts.cssBefore.clip||clip||"rect(0px 0px 0px 0px)";var d=opts.cssBefore.clip.match(/(\d+)/g);var t=parseInt(d[0]),r=parseInt(d[1]),b=parseInt(d[2]),l=parseInt(d[3]);opts.before.push(function(curr,next,opts){if(curr==next){return;}var $curr=$(curr),$next=$(next);$.fn.cycle.commonReset(curr,next,opts,true,true,false);opts.cssAfter.display="block";var step=1,count=parseInt((opts.speedIn/13))-1;(function f(){var tt=t?t-parseInt(step*(t/count)):0;var ll=l?l-parseInt(step*(l/count)):0;var bb=b<h?b+parseInt(step*((h-b)/count||1)):h;var rr=r<w?r+parseInt(step*((w-r)/count||1)):w;$next.css({clip:"rect("+tt+"px "+rr+"px "+bb+"px "+ll+"px)"});(step++<=count)?setTimeout(f,13):$curr.css("display","none");})();});opts.cssBefore={display:"block",opacity:1,top:0,left:0};opts.animIn={left:0};opts.animOut={left:0};};})(jQuery);
;/*
 * Galleria v 1.1.95 2010-08-06
 * http://galleria.aino.se
 *
 * Copyright (c) 2010, Aino
 * Licensed under the MIT license.
 */
(function(){var initializing=false,fnTest=/xyz/.test(function(){xyz;})?/\b__super\b/:/.*/,Class=function(){},window=this;Class.extend=function(prop){var __super=this.prototype;initializing=true;var proto=new this();initializing=false;for(var name in prop){if(name){proto[name]=typeof prop[name]=="function"&&typeof __super[name]=="function"&&fnTest.test(prop[name])?(function(name,fn){return function(){var tmp=this.__super;this.__super=__super[name];var ret=fn.apply(this,arguments);this.__super=tmp;return ret;};})(name,prop[name]):prop[name];}}
function Class(){if(!initializing&&this.__constructor){this.__constructor.apply(this,arguments);}}
Class.prototype=proto;Class.constructor=Class;Class.extend=arguments.callee;return Class;};var Base=Class.extend({loop:function(elem,fn){var scope=this;if(typeof elem=='number'){elem=new Array(elem);}
jQuery.each(elem,function(){fn.call(scope,arguments[1],arguments[0]);});return elem;},create:function(elem,className){elem=elem||'div';var el=document.createElement(elem);if(className){el.className=className;}
return el;},getElements:function(selector){var elems={};this.loop(jQuery(selector),this.proxy(function(elem){this.push(elem,elems);}));return elems;},setStyle:function(elem,css){jQuery(elem).css(css);return this;},getStyle:function(elem,styleProp,parse){var val=jQuery(elem).css(styleProp);return parse?this.parseValue(val):val;},cssText:function(string){var style=document.createElement('style');this.getElements('head')[0].appendChild(style);if(style.styleSheet){style.styleSheet.cssText=string;}else{var cssText=document.createTextNode(string);style.appendChild(cssText);}
return this;},touch:function(el){var sibling=el.nextSibling;var parent=el.parentNode;parent.removeChild(el);if(sibling){parent.insertBefore(el,sibling);}else{parent.appendChild(el);}
if(el.styleSheet&&el.styleSheet.imports.length){this.loop(el.styleSheet.imports,function(i){el.styleSheet.addImport(i.href);});}},loadCSS:function(href,callback){var exists=this.getElements('link[href="'+href+'"]').length;if(exists){callback.call(null);return exists[0];}
var link=this.create('link');link.rel='stylesheet';link.href=href;if(typeof callback=='function'){this.wait(function(){return!!document.body;},function(){var testElem=this.create('div','galleria-container galleria-stage');this.moveOut(testElem);document.body.appendChild(testElem);var getStyles=this.proxy(function(){var str='';var props;if(document.defaultView&&document.defaultView.getComputedStyle){props=document.defaultView.getComputedStyle(testElem,"");this.loop(props,function(prop){str+=prop+props.getPropertyValue(prop);});}else if(testElem.currentStyle){props=testElem.currentStyle;this.loop(props,function(val,prop){str+=prop+val;});}
return str;});var current=getStyles();this.wait(function(){return getStyles()!==current;},function(){document.body.removeChild(testElem);callback.call(link);},function(){G.raise('Could not confirm theme CSS');},2000);});}
window.setTimeout(this.proxy(function(){var styles=this.getElements('link[rel="stylesheet"],style');if(styles.length){styles[0].parentNode.insertBefore(link,styles[0]);}else{this.getElements('head')[0].appendChild(link);}
if(G.IE){this.loop(styles,function(el){this.touch(el);})}}),2);return link;},moveOut:function(elem){return this.setStyle(elem,{position:'absolute',left:'-10000px',display:'block'});},moveIn:function(elem){return this.setStyle(elem,{left:'0'});},reveal:function(elem){return jQuery(elem).show();},hide:function(elem){return jQuery(elem).hide();},mix:function(){return jQuery.extend.apply(jQuery,arguments);},proxy:function(fn,scope){if(typeof fn!=='function'){return function(){};}
scope=scope||this;return function(){return fn.apply(scope,Array.prototype.slice.call(arguments));};},listen:function(elem,type,fn){jQuery(elem).bind(type,fn);},forget:function(elem,type,fn){jQuery(elem).unbind(type,fn);},dispatch:function(elem,type){jQuery(elem).trigger(type);},clone:function(elem,keepEvents){keepEvents=keepEvents||false;return jQuery(elem).clone(keepEvents)[0];},removeAttr:function(elem,attributes){this.loop(attributes.split(' '),function(attr){jQuery(elem).removeAttr(attr);});},push:function(elem,obj){if(typeof obj.length=='undefined'){obj.length=0;}
Array.prototype.push.call(obj,elem);return elem;},width:function(elem,outer){return this.meassure(elem,outer,'Width');},height:function(elem,outer){return this.meassure(elem,outer,'Height');},meassure:function(el,outer,meassure){var elem=jQuery(el);var ret=outer?elem['outer'+meassure](true):elem[meassure.toLowerCase()]();if(G.QUIRK){var which=meassure=="Width"?["left","right"]:["top","bottom"];this.loop(which,function(s){ret+=elem.css('border-'+s+'-width').replace(/[^\d]/g,'')*1;ret+=elem.css('padding-'+s).replace(/[^\d]/g,'')*1;});}
return ret;},toggleClass:function(elem,className,arg){if(typeof arg!=='undefined'){var fn=arg?'addClass':'removeClass';jQuery(elem)[fn](className);return this;}
jQuery(elem).toggleClass(className);return this;},hideAll:function(el){jQuery(el).find('*').hide();},animate:function(el,options){options.complete=this.proxy(options.complete);var elem=jQuery(el);if(!elem.length){return;}
if(options.from){elem.css(from);}
elem.animate(options.to,{duration:options.duration||400,complete:options.complete,easing:options.easing||'swing'});},wait:function(fn,callback,err,max){fn=this.proxy(fn);callback=this.proxy(callback);err=this.proxy(err);var ts=new Date().getTime()+(max||3000);window.setTimeout(function(){if(fn()){callback();return false;}
if(new Date().getTime()>=ts){err();callback();return false;}
window.setTimeout(arguments.callee,2);},2);return this;},loadScript:function(url,callback){var script=document.createElement('script');script.src=url;script.async=true;var done=false;var scope=this;script.onload=script.onreadystatechange=function(){if(!done&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){done=true;if(typeof callback=='function'){callback.call(scope,this);}
script.onload=script.onreadystatechange=null;}};var s=document.getElementsByTagName('script')[0];s.parentNode.insertBefore(script,s);return this;},parseValue:function(val){if(typeof val=='number'){return val;}else if(typeof val=='string'){var arr=val.match(/\-?\d/g);return arr&&arr.constructor==Array?arr.join('')*1:0;}else{return 0;}}});var Picture=Base.extend({__constructor:function(order){this.image=null;this.elem=this.create('div','galleria-image');this.setStyle(this.elem,{overflow:'hidden',position:'relative'});this.order=order;this.orig={w:0,h:0,r:1};},cache:{},ready:false,add:function(src){if(this.cache[src]){return this.cache[src];}
var image=new Image();image.src=src;this.setStyle(image,{display:'block'});if(image.complete&&image.width){this.cache[src]=image;return image;}
image.onload=(function(scope){return function(){scope.cache[src]=image;};})(this);return image;},isCached:function(src){return this.cache[src]?this.cache[src].complete:false;},make:function(src){var i=this.cache[src]||this.add(src);return this.clone(i);},load:function(src,callback){callback=this.proxy(callback);this.elem.innerHTML='';this.image=this.make(src);this.moveOut(this.image);this.elem.appendChild(this.image);this.wait(function(){return(this.image.complete&&this.image.width);},function(){this.orig={h:this.h||this.image.height,w:this.w||this.image.width};callback({target:this.image,scope:this});},function(){G.raise('image not loaded in 20 seconds: '+src);},20000);return this;},scale:function(options){var o=this.mix({width:0,height:0,min:undefined,max:undefined,margin:0,complete:function(){},position:'center',crop:false},options);if(!this.image){return this;}
var width,height;this.wait(function(){width=o.width||this.width(this.elem);height=o.height||this.height(this.elem);return width&&height;},function(){var nw=(width-o.margin*2)/this.orig.w;var nh=(height-o.margin*2)/this.orig.h;var rmap={'true':Math.max(nw,nh),'width':nw,'height':nh,'false':Math.min(nw,nh)}
var ratio=rmap[o.crop.toString()];if(o.max){ratio=Math.min(o.max,ratio);}
if(o.min){ratio=Math.max(o.min,ratio);}
this.setStyle(this.elem,{width:width,height:height});this.image.width=Math.ceil(this.orig.w*ratio);this.image.height=Math.ceil(this.orig.h*ratio);var getPosition=this.proxy(function(value,img,m){var result=0;if(/\%/.test(value)){var pos=parseInt(value)/100;result=Math.ceil(this.image[img]*-1*pos+m*pos);}else{result=parseInt(value);}
return result;});var map={'top':{top:0},'left':{left:0},'right':{left:'100%'},'bottom':{top:'100%'}}
var pos={};var mix={};this.loop(o.position.toLowerCase().split(' '),function(p,i){if(p=='center'){p='50%';}
pos[i?'top':'left']=p;});this.loop(pos,function(val,key){if(map.hasOwnProperty(val)){mix=this.mix(mix,map[val]);}});pos=pos.top?this.mix(pos,mix):mix;pos=this.mix({top:'50%',left:'50%'},pos);this.setStyle(this.image,{position:'relative',top:getPosition(pos.top,'height',height),left:getPosition(pos.left,'width',width)});this.ready=true;o.complete.call(this);});return this;}});var G=window.Galleria=Base.extend({__constructor:function(options){this.theme=undefined;this.options=options;this.playing=false;this.playtime=5000;this.active=null;this.queue={};this.data={};this.dom={};var kb=this.keyboard={keys:{UP:38,DOWN:40,LEFT:37,RIGHT:39,RETURN:13,ESCAPE:27,BACKSPACE:8},map:{},bound:false,press:this.proxy(function(e){var key=e.keyCode||e.which;if(kb.map[key]&&typeof kb.map[key]=='function'){kb.map[key].call(this,e);}}),attach:this.proxy(function(map){for(var i in map){var k=i.toUpperCase();if(kb.keys[k]){kb.map[kb.keys[k]]=map[i];}}
if(!kb.bound){kb.bound=true;this.listen(document,'keydown',kb.press);}}),detach:this.proxy(function(){kb.bound=false;this.forget(document,'keydown',kb.press);})};this.timeouts={trunk:{},add:function(id,fn,delay,loop){loop=loop||false;this.clear(id);if(loop){var self=this;var old=fn;fn=function(){old();self.add(id,fn,delay);}}
this.trunk[id]=window.setTimeout(fn,delay);},clear:function(id){if(id&&this.trunk[id]){window.clearTimeout(this.trunk[id]);delete this.trunk[id];}else if(typeof id=='undefined'){for(var i in this.trunk){window.clearTimeout(this.trunk[i]);delete this.trunk[i];}}}};this.controls={0:null,1:null,active:0,swap:function(){this.active=this.active?0:1;},getActive:function(){return this[this.active];},getNext:function(){return this[Math.abs(this.active-1)];}};var fs=this.fullscreen={scrolled:0,enter:this.proxy(function(){this.toggleClass(this.get('container'),'fullscreen');fs.scrolled=jQuery(window).scrollTop();this.loop(fs.getElements(),function(el,i){fs.styles[i]=el.getAttribute('style');el.removeAttribute('style');});this.setStyle(fs.getElements(0),{position:'fixed',top:0,left:0,width:'100%',height:'100%',zIndex:10000});var bh={height:'100%',overflow:'hidden',margin:0,padding:0};this.setStyle(fs.getElements(1),bh);this.setStyle(fs.getElements(2),bh);this.attachKeyboard({escape:this.exitFullscreen,right:this.next,left:this.prev});this.rescale(this.proxy(function(){this.trigger(G.FULLSCREEN_ENTER);}));this.listen(window,'resize',fs.scale);}),scale:this.proxy(function(){this.rescale();}),exit:this.proxy(function(){this.toggleClass(this.get('container'),'fullscreen',false);if(!fs.styles.length){return;}
this.loop(fs.getElements(),function(el,i){el.removeAttribute('style');el.setAttribute('style',fs.styles[i]);});window.scrollTo(0,fs.scrolled);this.detachKeyboard();this.rescale(this.proxy(function(){this.trigger(G.FULLSCREEN_EXIT);}));this.forget(window,'resize',fs.scale);}),styles:[],getElements:this.proxy(function(i){var elems=[this.get('container'),document.body,this.getElements('html')[0]];return i?elems[i]:elems;})};var idle=this.idle={trunk:[],bound:false,add:this.proxy(function(elem,styles,fn){if(!elem){return;}
if(!idle.bound){idle.addEvent();}
elem=jQuery(elem);var orig={};for(var style in styles){orig[style]=elem.css(style);}
elem.data('idle',{from:orig,to:styles,complete:true,busy:false,fn:this.proxy(fn)});idle.addTimer();idle.trunk.push(elem);}),remove:this.proxy(function(elem){elem=jQuery(elem);this.loop(idle.trunk,function(el,i){if(el&&!el.not(elem).length){idle.show(elem);idle.trunk.splice(i,1);}});if(!idle.trunk.length){idle.removeEvent();this.clearTimer('idle');}}),addEvent:this.proxy(function(){idle.bound=true;this.listen(this.get('container'),'mousemove click',idle.showAll);}),removeEvent:this.proxy(function(){idle.bound=false;this.forget(this.get('container'),'mousemove click',idle.showAll);}),addTimer:this.proxy(function(){this.addTimer('idle',this.proxy(function(){idle.hide();}),this.options.idle_time);}),hide:this.proxy(function(){this.trigger(G.IDLE_ENTER);this.loop(idle.trunk,function(elem){var data=elem.data('idle');data.complete=false;data.fn();elem.animate(data.to,{duration:600,queue:false,easing:'swing'});});}),showAll:this.proxy(function(){this.clearTimer('idle');this.loop(idle.trunk,function(elem){idle.show(elem);});}),show:this.proxy(function(elem){var data=elem.data('idle');if(!data.busy&&!data.complete){data.busy=true;this.trigger(G.IDLE_EXIT);elem.animate(data.from,{duration:300,queue:false,easing:'swing',complete:function(){$(this).data('idle').busy=false;$(this).data('idle').complete=true;}});}
idle.addTimer();})};var lightbox=this.lightbox={w:0,h:0,initialized:false,active:null,init:this.proxy(function(){if(lightbox.initialized){return;}
lightbox.initialized=true;var elems='lightbox-overlay lightbox-box lightbox-content lightbox-shadow lightbox-title '+'lightbox-info lightbox-close lightbox-prev lightbox-next lightbox-counter';this.loop(elems.split(' '),function(el){this.addElement(el);lightbox[el.split('-')[1]]=this.get(el);});lightbox.image=new Galleria.Picture();this.append({'lightbox-box':['lightbox-shadow','lightbox-content','lightbox-close'],'lightbox-info':['lightbox-title','lightbox-counter','lightbox-next','lightbox-prev'],'lightbox-content':['lightbox-info']});document.body.appendChild(lightbox.overlay);document.body.appendChild(lightbox.box);lightbox.content.appendChild(lightbox.image.elem);lightbox.close.innerHTML='&#215;';lightbox.prev.innerHTML='&#9668;';lightbox.next.innerHTML='&#9658;';this.listen(lightbox.close,'click',lightbox.hide);this.listen(lightbox.overlay,'click',lightbox.hide);this.listen(lightbox.next,'click',lightbox.showNext);this.listen(lightbox.prev,'click',lightbox.showPrev);if(this.options.lightbox_clicknext){this.setStyle(lightbox.image.elem,{cursor:'pointer'});this.listen(lightbox.image.elem,'click',lightbox.showNext);}
this.setStyle(lightbox.overlay,{position:'fixed',display:'none',opacity:this.options.overlay_opacity,top:0,left:0,width:'100%',height:'100%',background:this.options.overlay_background,zIndex:99990});this.setStyle(lightbox.box,{position:'fixed',display:'none',width:400,height:400,top:'50%',left:'50%',marginTop:-200,marginLeft:-200,zIndex:99991});this.setStyle(lightbox.shadow,{background:'#000',opacity:.4,width:'100%',height:'100%',position:'absolute'});this.setStyle(lightbox.content,{backgroundColor:'#fff',position:'absolute',top:10,left:10,right:10,bottom:10,overflow:'hidden'});this.setStyle(lightbox.info,{color:'#444',fontSize:'11px',fontFamily:'Georgia,"Times New Roman",Times,serif',height:13,lineHeight:'13px',position:'absolute',bottom:10,left:10,right:10,opacity:0});this.setStyle(lightbox.close,{background:'#fff',height:20,width:20,position:'absolute',textAlign:'center',cursor:'pointer',top:10,right:10,lineHeight:'22px',fontSize:'16px',fontFamily:'Georgia,"Times New Roman",Times,serif',color:'#444',zIndex:99999});this.setStyle(lightbox.image.elem,{top:10,left:10,right:10,bottom:30,position:'absolute'});this.loop('title prev next counter'.split(' '),function(el){var css={display:'inline','float':'left'};if(el!='title'){this.mix(css,{'float':'right'});if(el!='counter'){this.mix(css,{cursor:'pointer'});}else{this.mix(css,{marginLeft:8});}}
this.setStyle(lightbox[el],css);});this.loop('prev next close'.split(' '),function(el){this.listen(lightbox[el],'mouseover',this.proxy(function(){this.setStyle(lightbox[el],{color:'#000'});}));this.listen(lightbox[el],'mouseout',this.proxy(function(){this.setStyle(lightbox[el],{color:'#444'});}));});this.trigger(G.LIGHTBOX_OPEN);}),rescale:this.proxy(function(e){var w=Math.min(this.width(window),lightbox.w);var h=Math.min(this.height(window),lightbox.h);var r=Math.min((w-60)/lightbox.w,(h-80)/lightbox.h);var destW=(lightbox.w*r)+40;var destH=(lightbox.h*r)+60;var dest={width:destW,height:destH,marginTop:Math.ceil(destH/2)*-1,marginLeft:Math.ceil(destW)/2*-1}
if(!e){this.animate(lightbox.box,{to:dest,duration:this.options.lightbox_transition_speed,easing:'galleria',complete:function(){this.trigger({type:G.LIGHTBOX_IMAGE,imageTarget:lightbox.image.image});this.moveIn(lightbox.image.image);this.animate(lightbox.image.image,{to:{opacity:1},duration:this.options.lightbox_fade_speed});this.animate(lightbox.info,{to:{opacity:1},duration:this.options.lightbox_fade_speed});}});}else{this.setStyle(lightbox.box,dest);}}),hide:this.proxy(function(){lightbox.image.image=null;this.forget(window,'resize',lightbox.rescale);this.hide(lightbox.box);this.setStyle(lightbox.info,{opacity:0});this.animate(lightbox.overlay,{to:{opacity:0},duration:200,complete:function(){this.hide(lightbox.overlay);this.setStyle(lightbox.overlay,{opacity:this.options.overlay_opacity});this.trigger(G.LIGHTBOX_CLOSE);}});}),showNext:this.proxy(function(){lightbox.show(this.getNext(lightbox.active));}),showPrev:this.proxy(function(){lightbox.show(this.getPrev(lightbox.active));}),show:this.proxy(function(index){if(!lightbox.initialized){lightbox.init();}
this.forget(window,'resize',lightbox.rescale);index=typeof index=='number'?index:this.getIndex();lightbox.active=index;var data=this.getData(index);var total=this.data.length;this.setStyle(lightbox.info,{opacity:0});lightbox.image.load(data.image,function(o){lightbox.w=o.scope.orig.w;lightbox.h=o.scope.orig.h;this.setStyle(o.target,{width:'100.5%',height:'100.5%',top:0,zIndex:99998,opacity:0});lightbox.title.innerHTML=data.title;lightbox.counter.innerHTML=(index+1)+' / '+total;this.listen(window,'resize',lightbox.rescale);lightbox.rescale();});this.reveal(lightbox.overlay);this.reveal(lightbox.box);})};this.thumbnails={width:0};this.stageWidth=0;this.stageHeight=0;var elems='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 close';elems=elems.split(' ');this.loop(elems,function(blueprint){this.dom[blueprint]=this.create('div','galleria-'+blueprint);});this.target=this.dom.target=options.target.nodeName?options.target:this.getElements(options.target)[0];if(!this.target){G.raise('Target not found.');}},init:function(){this.options=this.mix(G.theme.defaults,this.options);this.options=this.mix({autoplay:false,carousel:true,carousel_follow:true,carousel_speed:400,carousel_steps:'auto',clicknext:false,data_config:function(elem){return{};},data_image_selector:'img',data_source:this.target,data_type:'auto',debug:false,extend:function(options){},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_clicknext:true,lightbox_fade_speed:200,lightbox_transition_speed:300,link_source_images:true,max_scale_ratio:undefined,min_scale_ratio:undefined,on_image:function(img,thumb){},overlay_opacity:.85,overlay_background:'#0b0b0b',popup_links:false,preload:2,queue:true,show:0,show_info:true,show_counter:true,show_imagenav:true,thumb_crop:true,thumb_fit:true,thumb_margin:0,thumb_quality:'auto',thumbnails:true,transition:G.transitions.fade,transition_speed:400},this.options);var o=this.options;this.bind(G.DATA,function(){this.run();});if(o.clicknext){this.loop(this.data,function(data){delete data.link;});this.setStyle(this.get('stage'),{cursor:'pointer'});this.listen(this.get('stage'),'click',this.proxy(function(){this.next();}));}
this.bind(G.IMAGE,function(e){o.on_image.call(this,e.imageTarget,e.thumbTarget);});this.bind(G.READY,function(){if(G.History){G.History.change(this.proxy(function(e){var val=parseInt(e.value.replace(/\//,''));if(isNaN(val)){window.history.go(-1);}else{this.show(val,undefined,true);}}));}
G.theme.init.call(this,o);o.extend.call(this,o);if(/^[0-9]{1,4}$/.test(hash)&&G.History){this.show(hash,undefined,true);}else if(typeof o.show=='number'){this.show(o.show);}
if(o.autoplay){if(typeof o.autoplay=='number'){this.playtime=o.autoplay;}
this.trigger(G.PLAY);this.playing=true;}});this.load();return this;},bind:function(type,fn){this.listen(this.get('container'),type,this.proxy(fn));return this;},unbind:function(type){this.forget(this.get('container'),type);},trigger:function(type){type=typeof type=='object'?this.mix(type,{scope:this}):{type:type,scope:this};this.dispatch(this.get('container'),type);return this;},addIdleState:function(){this.idle.add.apply(this,arguments);return this;},removeIdleState:function(){this.idle.remove.apply(this,arguments);return this;},enterIdleMode:function(){this.idle.hide();return this;},exitIdleMode:function(){this.idle.show();return this;},addTimer:function(){this.timeouts.add.apply(this.timeouts,arguments);return this;},clearTimer:function(){this.timeouts.clear.apply(this.timeouts,arguments);return this;},enterFullscreen:function(){this.fullscreen.enter.apply(this,arguments);return this;},exitFullscreen:function(){this.fullscreen.exit.apply(this,arguments);return this;},openLightbox:function(){this.lightbox.show.apply(this,arguments);},closeLightbox:function(){this.lightbox.hide.apply(this,arguments);},getActive:function(){return this.controls.getActive();},getActiveImage:function(){return this.getActive().image||null;},run:function(){var o=this.options;if(!this.data.length){G.raise('Data is empty.');}
if(!o.keep_source&&!Galleria.IE){this.target.innerHTML='';}
this.loop(2,function(){var image=new Picture();this.setStyle(image.elem,{position:'absolute',top:0,left:0});this.setStyle(this.get('images'),{position:'relative',top:0,left:0,width:'100%',height:'100%'});this.get('images').appendChild(image.elem);this.push(image,this.controls);},this);if(o.carousel){this.bind(G.THUMBNAIL,this.parseCarousel);}
this.build();this.target.appendChild(this.get('container'));this.loop(['info','counter','image-nav'],function(el){if(o['show_'+el.replace(/-/,'')]===false){this.moveOut(this.get(el));}});var w=0;var h=0;for(var i=0;this.data[i];i++){var thumb;if(o.thumbnails===true){thumb=new Picture(i);var src=this.data[i].thumb||this.data[i].image;this.get('thumbnails').appendChild(thumb.elem);w=this.getStyle(thumb.elem,'width',true);h=this.getStyle(thumb.elem,'height',true);if(o.thumb_fit&&o.thum_crop!==true){this.setStyle(thumb.elem,{width:0,height:0});}
thumb.load(src,this.proxy(function(e){var orig=e.target.width;e.scope.scale({width:w,height:h,crop:o.thumb_crop,margin:o.thumb_margin,complete:this.proxy(function(){var top=['left','top'];var arr=['Height','Width'];this.loop(arr,function(m,i){if((!o.thumb_crop||o.thumb_crop==m.toLowerCase())&&o.thumb_fit){var css={};var opp=arr[Math.abs(i-1)].toLowerCase();css[opp]=e.target[opp];this.setStyle(e.target.parentNode,css);var css={};css[top[i]]=0;this.setStyle(e.target,css);}
e.scope['outer'+m]=this[m.toLowerCase()](e.target.parentNode,true);});this.toggleQuality(e.target,o.thumb_quality===true||(o.thumb_quality=='auto'&&orig<e.target.width*3));this.trigger({type:G.THUMBNAIL,thumbTarget:e.target,thumbOrder:e.scope.order});})});}));if(o.preload=='all'){thumb.add(this.data[i].image);}}else if(o.thumbnails=='empty'){thumb={elem:this.create('div','galleria-image'),image:this.create('span','img')};thumb.elem.appendChild(thumb.image);this.get('thumbnails').appendChild(thumb.elem);}else{thumb={elem:false,image:false}}
var activate=this.proxy(function(e){this.pause();e.preventDefault();var ind=e.currentTarget.rel;if(this.active!==ind){this.show(ind);}});if(o.thumbnails!==false){thumb.elem.rel=i;this.listen(thumb.elem,'click',activate);}
if(o.link_source_images&&o.keep_source&&this.data[i].elem){this.data[i].elem.rel=i;this.listen(this.data[i].elem,'click',activate);}
this.push(thumb,this.thumbnails);}
this.setStyle(this.get('thumbnails'),{opacity:0});if(o.height&&o.height!='auto'){this.setStyle(this.get('container'),{height:o.height})}
this.wait(function(){var cssHeight=this.getStyle(this.get('container'),'height',true);this.stageWidth=this.width(this.get('stage'));this.stageHeight=this.height(this.get('stage'));if(this.stageHeight<50&&o.height=='auto'){this.setStyle(this.get('container'),{height:Math.round(this.stageWidth*9/16)});this.stageHeight=this.height(this.get('stage'));}
return this.stageHeight&&this.stageWidth;},function(){this.listen(this.get('image-nav-right'),'click',this.proxy(function(e){if(o.clicknext){e.stopPropagation();}
this.pause();this.next();}));this.listen(this.get('image-nav-left'),'click',this.proxy(function(e){if(o.clicknext){e.stopPropagation();}
this.pause();this.prev();}));this.setStyle(this.get('thumbnails'),{opacity:1});this.trigger(G.READY);},function(){G.raise('Galleria could not load properly. Make sure stage has a height and width.');},5000);},mousePosition:function(e){return{x:e.pageX-this.$('stage').offset().left+jQuery(document).scrollLeft(),y:e.pageY-this.$('stage').offset().top+jQuery(document).scrollTop()};},addPan:function(img){var c=this.options.image_crop;if(c===false){return;}
if(this.options.image_crop===false){return;}
img=img||this.controls.getActive().image;if(img.tagName.toUpperCase()!='IMG'){G.raise('Could not add pan');}
var x=img.width/2;var y=img.height/2;var curX=destX=this.getStyle(img,'left',true)||0;var curY=destY=this.getStyle(img,'top',true)||0;var distX=0;var distY=0;var active=false;var ts=new Date().getTime();var calc=this.proxy(function(e){if(new Date().getTime()-ts<50){return;}
active=true;x=this.mousePosition(e).x;y=this.mousePosition(e).y;});var loop=this.proxy(function(e){if(!active){return;}
distX=img.width-this.stageWidth;distY=img.height-this.stageHeight;destX=x/this.stageWidth*distX*-1;destY=y/this.stageHeight*distY*-1;curX+=(destX-curX)/this.options.image_pan_smoothness;curY+=(destY-curY)/this.options.image_pan_smoothness;if(distY>0){this.setStyle(img,{top:Math.max(distY*-1,Math.min(0,curY))});}
if(distX>0){this.setStyle(img,{left:Math.max(distX*-1,Math.min(0,curX))});}});this.forget(this.get('stage'),'mousemove');this.listen(this.get('stage'),'mousemove',calc);this.addTimer('pan',loop,30,true);},removePan:function(){this.forget(this.get('stage'),'mousemove');this.clearTimer('pan');},parseCarousel:function(e){var w=0;var h=0;var hooks=[0];this.loop(this.thumbnails,function(thumb,i){if(thumb.ready){w+=thumb.outerWidth||this.width(thumb.elem,true);hooks[i+1]=w;h=Math.max(h,this.height(thumb.elem));}});this.toggleClass(this.get('thumbnails-container'),'galleria-carousel',w>this.stageWidth);this.setStyle(this.get('thumbnails-list'),{overflow:'hidden',position:'relative'});this.setStyle(this.get('thumbnails'),{width:w,height:h,position:'relative',overflow:'hidden'});if(!this.carousel){this.initCarousel();}
this.carousel.max=w;this.carousel.hooks=hooks;this.carousel.width=this.width(this.get('thumbnails-list'));this.carousel.setClasses();},initCarousel:function(){var c=this.carousel={right:this.get('thumb-nav-right'),left:this.get('thumb-nav-left'),update:this.proxy(function(){this.parseCarousel();}),width:0,current:0,set:function(i){i=Math.max(i,0);while(c.hooks[i-1]+c.width>c.max&&i>=0){i--;}
c.current=i;c.animate();},hooks:[],getLast:function(i){i=i||c.current
return i-1;},follow:function(i){if(i==0||i==c.hooks.length-2){c.set(i);return;}
var last=c.current;while(c.hooks[last]-c.hooks[c.current]<c.width&&last<=c.hooks.length){last++;}
if(i-1<c.current){c.set(i-1)}else if(i+2>last){c.set(i-last+c.current+2)}},max:0,setClasses:this.proxy(function(){this.toggleClass(c.left,'disabled',!c.current);this.toggleClass(c.right,'disabled',c.hooks[c.current]+c.width>c.max);}),animate:this.proxy(function(to){c.setClasses();this.animate(this.get('thumbnails'),{to:{left:c.hooks[c.current]*-1},duration:this.options.carousel_speed,easing:'galleria',queue:false});})};this.listen(c.right,'click',this.proxy(function(e){if(this.options.carousel_steps=='auto'){for(var i=c.current;i<c.hooks.length;i++){if(c.hooks[i]-c.hooks[c.current]>c.width){c.set(i-2);break;}}}else{c.set(c.current+this.options.carousel_steps);}}));this.listen(c.left,'click',this.proxy(function(e){if(this.options.carousel_steps=='auto'){for(var i=c.current;i>=0;i--){if(c.hooks[c.current]-c.hooks[i]>c.width){c.set(i+2);break;}else if(i==0){c.set(0);break;}}}else{c.set(c.current-this.options.carousel_steps);}}));},addElement:function(){this.loop(arguments,function(b){this.dom[b]=this.create('div','galleria-'+b);});return this;},getDimensions:function(i){return{w:i.width,h:i.height,cw:this.stageWidth,ch:this.stageHeight,top:(this.stageHeight-i.height)/2,left:(this.stageWidth-i.width)/2};},attachKeyboard:function(map){this.keyboard.attach(map);return this;},detachKeyboard:function(){this.keyboard.detach();return this;},build:function(){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']});this.current=this.create('span','current');this.current.innerHTML='-';this.get('counter').innerHTML=' / <span class="total">'+this.data.length+'</span>';this.prependChild('counter',this.current);},appendChild:function(parent,child){try{this.get(parent).appendChild(this.get(child));}catch(e){}},prependChild:function(parent,child){var child=this.get(child)||child;try{this.get(parent).insertBefore(child,this.get(parent).firstChild);}catch(e){}},remove:function(){var a=Array.prototype.slice.call(arguments);this.jQuery(a.join(',')).remove();},append:function(data){for(var i in data){if(data[i].constructor==Array){for(var j=0;data[i][j];j++){this.appendChild(i,data[i][j]);}}else{this.appendChild(i,data[i]);}}
return this;},rescale:function(width,height,callback){var o=this.options;callback=this.proxy(callback);if(typeof width=='function'){callback=this.proxy(width);width=undefined;}
var scale=this.proxy(function(){this.stageWidth=width||this.width(this.get('stage'));this.stageHeight=height||this.height(this.get('stage'));this.controls.getActive().scale({width:this.stageWidth,height:this.stageHeight,crop:o.image_crop,max:o.max_scale_ratio,min:o.min_scale_ratio,margin:o.image_margin,position:o.image_position});if(this.carousel){this.carousel.update();}
this.trigger(G.RESCALE)
callback();});if(G.WEBKIT&&!width&&!height){this.addTimer('scale',scale,5);}else{scale.call(this);}},show:function(index,rewind,history){if(!this.options.queue&&this.queue.stalled){return;}
rewind=typeof rewind!='undefined'?!!rewind:index<this.active;history=history||false;index=Math.max(0,Math.min(parseInt(index),this.data.length-1));if(!history&&G.History){G.History.value(index.toString());return;}
this.active=index;this.push([index,rewind],this.queue);if(!this.queue.stalled){this.showImage();}
return this;},showImage:function(){var o=this.options;var args=this.queue[0];var index=args[0];var rewind=!!args[1];if(o.carousel&&this.carousel&&o.carousel_follow){this.carousel.follow(index);}
var src=this.getData(index).image;var active=this.controls.getActive();var next=this.controls.getNext();var cached=next.isCached(src);var complete=this.proxy(function(){this.queue.stalled=false;this.toggleQuality(next.image,o.image_quality);this.setStyle(active.elem,{zIndex:0});this.setStyle(next.elem,{zIndex:1});this.trigger({type:G.IMAGE,index:index,imageTarget:next.image,thumbTarget:this.thumbnails[index].image});if(o.image_pan){this.addPan(next.image);}
this.controls.swap();this.moveOut(active.image);if(this.getData(index).link){this.setStyle(next.image,{cursor:'pointer'});this.listen(next.image,'click',this.proxy(function(){if(o.popup_links){var win=window.open(this.getData(index).link,'_blank');}else{window.location.href=this.getData(index).link;}}));}
Array.prototype.shift.call(this.queue);if(this.queue.length){this.showImage();}
this.playCheck();});if(typeof o.preload=='number'&&o.preload>0){var p,n=this.getNext();try{for(var i=o.preload;i>0;i--){p=new Picture();p.add(this.getData(n).image);n=this.getNext(n);}}catch(e){}}
this.trigger({type:G.LOADSTART,cached:cached,index:index,imageTarget:next.image,thumbTarget:this.thumbnails[index].image});jQuery(this.thumbnails[index].elem).addClass('active').siblings('.active').removeClass('active');next.load(src,this.proxy(function(e){next.scale({width:this.stageWidth,height:this.stageHeight,crop:o.image_crop,max:o.max_scale_ratio,min:o.min_scale_ratio,margin:o.image_margin,position:o.image_position,complete:this.proxy(function(){if(active.image){this.toggleQuality(active.image,false);}
this.toggleQuality(next.image,false);this.trigger({type:G.LOADFINISH,cached:cached,index:index,imageTarget:next.image,thumbTarget:this.thumbnails[index].image});this.queue.stalled=true;var transition=G.transitions[o.transition]||o.transition;this.removePan();this.setInfo(index);this.setCounter(index);if(typeof transition=='function'){transition.call(this,{prev:active.image,next:next.image,rewind:rewind,speed:o.transition_speed||400},complete);}else{complete();}})});}));},getNext:function(base){base=typeof base=='number'?base:this.active;return base==this.data.length-1?0:base+1;},getPrev:function(base){base=typeof base=='number'?base:this.active;return base===0?this.data.length-1:base-1;},next:function(){if(this.data.length>1){this.show(this.getNext(),false);}
return this;},prev:function(){if(this.data.length>1){this.show(this.getPrev(),true);}
return this;},get:function(elem){return elem in this.dom?this.dom[elem]:null;},getData:function(index){return this.data[index]||this.data[this.active];},getIndex:function(){return typeof this.active==='number'?this.active:0;},play:function(delay){this.trigger(G.PLAY);this.playing=true;this.playtime=delay||this.playtime;this.playCheck();return this;},pause:function(){this.trigger(G.PAUSE);this.playing=false;return this;},playCheck:function(){var p=0;var i=20;var ts=function(){return new Date().getTime();}
var now=ts();if(this.playing){this.clearTimer('play');var fn=this.proxy(function(){p=ts()-now;if(p>=this.playtime&&this.playing){this.clearTimer('play');this.next();return;}
if(this.playing){this.trigger({type:G.PROGRESS,percent:Math.ceil(p/this.playtime*100),seconds:Math.floor(p/1000),milliseconds:p});this.addTimer('play',fn,i);}});this.addTimer('play',fn,i);}},setActive:function(val){this.active=val;return this;},setCounter:function(index){index=index||this.active;this.current.innerHTML=index+1;return this;},setInfo:function(index){var data=this.getData(index||this.active);this.loop(['title','description','author'],function(type){var elem=this.get('info-'+type);var fn=data[type]&&data[type].length?'reveal':'hide';this[fn](elem);if(data[type]){elem.innerHTML=data[type];}});return this;},hasInfo:function(index){var d=this.getData(index);var check='title description author'.split(' ');for(var i=0;check[i];i++){if(d[check[i]]&&d[check[i]].length){return true;}}
return false;},getDataObject:function(o){var obj={image:'',thumb:'',title:'',description:'',author:'',link:''};return o?this.mix(obj,o):obj;},jQuery:function(str){var ret=[];this.loop(str.split(','),this.proxy(function(elem){elem=elem.replace(/^\s\s*/,"").replace(/\s\s*$/,"");if(this.get(elem)){ret.push(elem);}}));var jQ=jQuery(this.get(ret.shift()));this.loop(ret,this.proxy(function(elem){jQ=jQ.add(this.get(elem));}));return jQ;},$:function(str){return this.jQuery(str);},toggleQuality:function(img,force){if(!G.IE7||typeof img=='undefined'||!img){return this;}
if(typeof force==='undefined'){force=img.style.msInterpolationMode=='nearest-neighbor';}
img.style.msInterpolationMode=force?'bicubic':'nearest-neighbor';return this;},unload:function(){},load:function(){var loaded=0;var o=this.options;if((o.data_type=='auto'&&typeof o.data_source=='object'&&!(o.data_source instanceof jQuery)&&!o.data_source.tagName)||o.data_type=='json'||o.data_source.constructor==Array){this.data=o.data_source;this.trigger(G.DATA);}else{var images=jQuery(o.data_source).find(o.data_image_selector);var getData=this.proxy(function(elem){var i,j,anchor=elem.parentNode;if(anchor&&anchor.nodeName=='A'){if(anchor.href.match(/\.(png|gif|jpg|jpeg)/i)){i=anchor.href;}else{j=anchor.href;}}
var obj=this.getDataObject({title:elem.title,thumb:elem.src,image:i||elem.src,description:elem.alt,link:j||elem.getAttribute('longdesc'),elem:elem});return this.mix(obj,o.data_config(elem));});this.loop(images,function(elem){loaded++;this.push(getData(elem),this.data);if(!o.keep_source&&!Galleria.IE){elem.parentNode.removeChild(elem);}
if(loaded==images.length){this.trigger(G.DATA);}});}}});G.log=function(){try{console.log.apply(console,Array.prototype.slice.call(arguments));}catch(e){try{opera.postError.apply(opera,arguments);}catch(er){alert(Array.prototype.join.call(arguments," "));}}};var nav=navigator.userAgent.toLowerCase();var hash=window.location.hash.replace(/#\//,'');G.DATA='data';G.READY='ready';G.THUMBNAIL='thumbnail';G.LOADSTART='loadstart';G.LOADFINISH='loadfinish';G.IMAGE='image';G.THEMELOAD='themeload';G.PLAY='play';G.PAUSE='pause';G.PROGRESS='progress';G.FULLSCREEN_ENTER='fullscreen_enter';G.FULLSCREEN_EXIT='fullscreen_exit';G.IDLE_ENTER='idle_enter';G.IDLE_EXIT='idle_exit';G.RESCALE='rescale';G.LIGHTBOX_OPEN='lightbox_open';G.LIGHTBOX_CLOSE='lightbox_cloe';G.LIGHTBOX_IMAGE='lightbox_image';G.IE8=(typeof(XDomainRequest)!=='undefined')
G.IE7=!!(window.XMLHttpRequest&&document.expando);G.IE6=(!window.XMLHttpRequest);G.IE=!!(G.IE6||G.IE7);G.WEBKIT=/webkit/.test(nav);G.SAFARI=/safari/.test(nav);G.CHROME=/chrome/.test(nav);G.QUIRK=(G.IE&&document.compatMode&&document.compatMode=="BackCompat");G.MAC=/mac/.test(navigator.platform.toLowerCase());G.OPERA=!!window.opera
G.Picture=Picture;G.addTheme=function(obj){var theme={};var orig=['name','author','version','defaults','init'];var proto=G.prototype;proto.loop(orig,function(val){if(!obj[val]){G.raise(val+' not specified in theme.');}
if(val!='name'&&val!='init'){theme[val]=obj[val];}});theme.init=obj.init;if(obj.css){var css;proto.loop(proto.getElements('script'),function(el){var reg=new RegExp('galleria.'+obj.name.toLowerCase()+'.js');if(reg.test(el.src)){css=el.src.replace(/[^\/]*$/,"")+obj.css;proto.loadCSS(css,function(){G.theme=theme;jQuery(document).trigger(G.THEMELOAD);});}});if(!css){G.raise('No theme CSS loaded');}}
return theme;};G.raise=function(msg){if(G.debug){throw new Error(msg);}};G.loadTheme=function(src){G.prototype.loadScript(src);};G.galleries=[];G.get=function(index){if(G.galleries[index]){return G.galleries[index];}else if(typeof index!=='number'){return G.galleries;}else{G.raise('Gallery index not found');}}
jQuery.easing.galleria=function(x,t,b,c,d){if((t/=d/2)<1){return c/2*t*t*t*t+b;}
return-c/2*((t-=2)*t*t*t-2)+b;};G.transitions={add:function(name,fn){if(name!=arguments.callee.name){this[name]=fn;}},fade:function(params,complete){jQuery(params.next).show().css('opacity',0).animate({opacity:1},params.speed,complete);if(params.prev){jQuery(params.prev).css('opacity',1).animate({opacity:0},params.speed);}},flash:function(params,complete){jQuery(params.next).css('opacity',0);if(params.prev){jQuery(params.prev).animate({opacity:0},(params.speed/2),function(){jQuery(params.next).animate({opacity:1},params.speed,complete);});}else{jQuery(params.next).animate({opacity:1},params.speed,complete);}},pulse:function(params,complete){if(params.prev){jQuery(params.prev).css('opacity',0);}
jQuery(params.next).css('opacity',0).animate({opacity:1},params.speed,complete);},slide:function(params,complete){var image=jQuery(params.next).parent();var images=this.$('images');var width=this.stageWidth;image.css({left:width*(params.rewind?-1:1)});images.animate({left:width*(params.rewind?1:-1)},{duration:params.speed,queue:false,easing:'galleria',complete:function(){images.css('left',0);image.css('left',0);complete();}});},fadeslide:function(params,complete){if(params.prev){jQuery(params.prev).css({opacity:1,left:0}).animate({opacity:0,left:50*(params.rewind?1:-1)},{duration:params.speed,queue:false,easing:'swing'});}
jQuery(params.next).css({left:50*(params.rewind?-1:1),opacity:0}).animate({opacity:1,left:0},{duration:params.speed,complete:complete,queue:false,easing:'swing'});}};G.addTransition=function(){G.transitions.add.apply(this,arguments);}
jQuery.fn.galleria=function(options){options=options||{};var selector=this.selector;return this.each(function(){if(!options.keep_source){jQuery(this).children().hide();}
options=G.prototype.mix(options,{target:this});var height=G.prototype.height(this)||G.prototype.getStyle(this,'height',true);if(!options.height&&height){options=G.prototype.mix({height:height},options);}
G.debug=!!options.debug;var gallery=new G(options);Galleria.galleries.push(gallery);if(G.theme){gallery.init();}else{jQuery(document).bind(G.THEMELOAD,function(){gallery.init();});}})};})();
;jQuery(function($){$('a.image-swapper-link').live('click',function(e){var target=$(this).closest(".article").children(".article-media");var key=$(this).attr('id').substring(20);var articleId=target.attr('id').substring(14);var taem=$(this).hasClass('taem')?1:0;var width=target.width();var height=target.height();target.css({'width':width+'px','height':height+'px'});target.html('<img src="/pix/ajax-loader.gif" alt="loading..." class="ajax-loader" />');var loaderWidth=target.children('img.ajax-loader').width();var loaderHeight=target.children('img.ajax-loader').height();var marginTop=(height-loaderHeight)/2;var marginLeft=(width-loaderWidth)/2;target.children('img.ajax-loader').css({'margin-top':marginTop+'px','margin-left':marginLeft+'px'});$.ajax({async:false,type:'POST',url:'/inc/loadImage.php',cache:false,data:'key='+key+'&articleId='+articleId+'&taem='+taem,success:function(html){target.children('img.ajax-loader').hide();target.html(html).children().css({'visiblity':'hidden'});},complete:function(){var newWidth=target.find('.media-wrapper').attr('width');var imageHeight=target.find('.media-wrapper').outerHeight();var captionHeight=target.find('.article-media-caption').outerHeight();if(parseInt(captionHeight)>0){captionHeight=parseInt(captionHeight);}else{captionHeight=0;}
var newHeight=parseInt(imageHeight)+captionHeight;target.find('a.modal-box-link').css({'height':parseInt(imageHeight)});target.css({'height':newHeight+'px'});target.children().show();}});e.preventDefault();});});
;(function($){$.fn.hoverIntent=function(f,g){var cfg={sensitivity:7,interval:100,timeout:0};cfg=$.extend(cfg,g?{over:f,out:g}:f);var cX,cY,pX,pY;var track=function(ev){cX=ev.pageX;cY=ev.pageY;};var compare=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);if((Math.abs(pX-cX)+Math.abs(pY-cY))<cfg.sensitivity){$(ob).unbind("mousemove",track);ob.hoverIntent_s=1;return cfg.over.apply(ob,[ev]);}else{pX=cX;pY=cY;ob.hoverIntent_t=setTimeout(function(){compare(ev,ob);},cfg.interval);}};var delay=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);ob.hoverIntent_s=0;return cfg.out.apply(ob,[ev]);};var handleHover=function(e){var p=(e.type=="mouseover"?e.fromElement:e.toElement)||e.relatedTarget;while(p&&p!=this){try{p=p.parentNode;}catch(e){p=this;}}
if(p==this){return false;}
var ev=jQuery.extend({},e);var ob=this;if(ob.hoverIntent_t){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);}
if(e.type=="mouseover"){pX=ev.pageX;pY=ev.pageY;$(ob).bind("mousemove",track);if(ob.hoverIntent_s!=1){ob.hoverIntent_t=setTimeout(function(){compare(ev,ob);},cfg.interval);}}else{$(ob).unbind("mousemove",track);if(ob.hoverIntent_s==1){ob.hoverIntent_t=setTimeout(function(){delay(ev,ob);},cfg.timeout);}}};return this.mouseover(handleHover).mouseout(handleHover);};})(jQuery);
;;(function($){$.fn.superfish=function(op){var sf=$.fn.superfish,c=sf.c,$arrow=$(['<span class="',c.arrowClass,'"> &#187;</span>'].join('')),over=function(){var $$=$(this),menu=getMenu($$);clearTimeout(menu.sfTimer);$$.showSuperfishUl().siblings().hideSuperfishUl();},out=function(){var $$=$(this),menu=getMenu($$),o=sf.op;clearTimeout(menu.sfTimer);menu.sfTimer=setTimeout(function(){o.retainPath=($.inArray($$[0],o.$path)>-1);$$.hideSuperfishUl();if(o.$path.length&&$$.parents(['li.',o.hoverClass].join('')).length<1){over.call(o.$path);}},o.delay);},getMenu=function($menu){var menu=$menu.parents(['ul.',c.menuClass,':first'].join(''))[0];sf.op=sf.o[menu.serial];return menu;},addArrow=function($a){$a.addClass(c.anchorClass).append($arrow.clone());};return this.each(function(){var s=this.serial=sf.o.length;var o=$.extend({},sf.defaults,op);o.$path=$('li.'+o.pathClass,this).slice(0,o.pathLevels).each(function(){$(this).addClass([o.hoverClass,c.bcClass].join(' ')).filter('li:has(ul)').removeClass(o.pathClass);});sf.o[s]=sf.op=o;$('li:has(ul)',this)[($.fn.hoverIntent&&!o.disableHI)?'hoverIntent':'hover'](over,out).each(function(){if(o.autoArrows)addArrow($('>a:first-child',this));}).not('.'+c.bcClass).hideSuperfishUl();var $a=$('a',this);$a.each(function(i){var $li=$a.eq(i).parents('li');$a.eq(i).focus(function(){over.call($li);}).blur(function(){out.call($li);});});o.onInit.call(this);}).each(function(){var menuClasses=[c.menuClass];if(sf.op.dropShadows&&!($.browser.msie&&$.browser.version<7))menuClasses.push(c.shadowClass);$(this).addClass(menuClasses.join(' '));});};var sf=$.fn.superfish;sf.o=[];sf.op={};sf.IE7fix=function(){var o=sf.op;if($.browser.msie&&$.browser.version>6&&o.dropShadows&&o.animation.opacity!=undefined)
this.toggleClass(sf.c.shadowClass+'-off');};sf.c={bcClass:'sf-breadcrumb',menuClass:'sf-js-enabled',anchorClass:'sf-with-ul',arrowClass:'sf-sub-indicator',shadowClass:'sf-shadow'};sf.defaults={hoverClass:'sfHover',pathClass:'overideThisToUse',pathLevels:1,delay:800,animation:{opacity:'show'},speed:'normal',autoArrows:true,dropShadows:true,disableHI:false,onInit:function(){},onBeforeShow:function(){},onShow:function(){},onHide:function(){}};$.fn.extend({hideSuperfishUl:function(){var o=sf.op,not=(o.retainPath===true)?o.$path:'';o.retainPath=false;var $ul=$(['li.',o.hoverClass].join(''),this).add(this).not(not).removeClass(o.hoverClass).find('>ul').hide().css('visibility','hidden');o.onHide.call($ul);return this;},showSuperfishUl:function(){var o=sf.op,sh=sf.c.shadowClass+'-off',$ul=this.addClass(o.hoverClass).find('>ul:hidden').css('visibility','visible');sf.IE7fix.call($ul);o.onBeforeShow.call($ul);$ul.animate(o.animation,o.speed,function(){sf.IE7fix.call($ul);o.onShow.call($ul);});return this;}});})(jQuery);
;;(function($){$.fn.supersubs=function(options){var opts=$.extend({},$.fn.supersubs.defaults,options);return this.each(function(){var $$=$(this);var o=$.meta?$.extend({},opts,$$.data()):opts;var fontsize=$('<li id="menu-fontsize">&#8212;</li>').css({'padding':0,'position':'absolute','top':'-999em','width':'auto'}).appendTo($$).width();$('#menu-fontsize').remove();$ULs=$$.find('ul');$ULs.each(function(i){var $ul=$ULs.eq(i);var $LIs=$ul.children();var $As=$LIs.children('a');var liFloat=$LIs.css('white-space','nowrap').css('float');var emWidth=$ul.add($LIs).add($As).css({'float':'none','width':'auto'}).end().end()[0].clientWidth/fontsize;emWidth+=o.extraWidth;if(emWidth>o.maxWidth){emWidth=o.maxWidth;}
else if(emWidth<o.minWidth){emWidth=o.minWidth;}
emWidth+='em';$ul.css('width',emWidth);$LIs.css({'float':liFloat,'width':'100%','white-space':'normal'}).each(function(){var $childUl=$('>ul',this);var offsetDirection=$childUl.css('left')!==undefined?'left':'right';$childUl.css(offsetDirection,emWidth);});});});};$.fn.supersubs.defaults={minWidth:9,maxWidth:25,extraWidth:0};})(jQuery);
;/*
 * jPlayer Plugin for jQuery JavaScript Library
 * http://www.happyworm.com/jquery/jplayer
 *
 * Copyright (c) 2009 - 2010 Happyworm Ltd
 * Dual licensed under the MIT and GPL licenses.
 *  - http://www.opensource.org/licenses/mit-license.php
 *  - http://www.gnu.org/copyleft/gpl.html
 *
 * Author: Mark J Panaghiston
 * Version: 2.0.0
 * Date: 20th December 2010
 */

(function(c,h){c.fn.jPlayer=function(a){var b=typeof a==="string",d=Array.prototype.slice.call(arguments,1),f=this;a=!b&&d.length?c.extend.apply(null,[true,a].concat(d)):a;if(b&&a.charAt(0)==="_")return f;b?this.each(function(){var e=c.data(this,"jPlayer"),g=e&&c.isFunction(e[a])?e[a].apply(e,d):e;if(g!==e&&g!==h){f=g;return false}}):this.each(function(){var e=c.data(this,"jPlayer");if(e){e.option(a||{})._init();e.option(a||{})}else c.data(this,"jPlayer",new c.jPlayer(a,this))});return f};c.jPlayer=
function(a,b){if(arguments.length){this.element=c(b);this.options=c.extend(true,{},this.options,a);var d=this;this.element.bind("remove.jPlayer",function(){d.destroy()});this._init()}};c.jPlayer.event={ready:"jPlayer_ready",resize:"jPlayer_resize",error:"jPlayer_error",warning:"jPlayer_warning",loadstart:"jPlayer_loadstart",progress:"jPlayer_progress",suspend:"jPlayer_suspend",abort:"jPlayer_abort",emptied:"jPlayer_emptied",stalled:"jPlayer_stalled",play:"jPlayer_play",pause:"jPlayer_pause",loadedmetadata:"jPlayer_loadedmetadata",
loadeddata:"jPlayer_loadeddata",waiting:"jPlayer_waiting",playing:"jPlayer_playing",canplay:"jPlayer_canplay",canplaythrough:"jPlayer_canplaythrough",seeking:"jPlayer_seeking",seeked:"jPlayer_seeked",timeupdate:"jPlayer_timeupdate",ended:"jPlayer_ended",ratechange:"jPlayer_ratechange",durationchange:"jPlayer_durationchange",volumechange:"jPlayer_volumechange"};c.jPlayer.htmlEvent=["loadstart","abort","emptied","stalled","loadedmetadata","loadeddata","canplaythrough","ratechange"];c.jPlayer.pause=
function(){c.each(c.jPlayer.prototype.instances,function(a,b){b.data("jPlayer").status.srcSet&&b.jPlayer("pause")})};c.jPlayer.timeFormat={showHour:false,showMin:true,showSec:true,padHour:false,padMin:true,padSec:true,sepHour:":",sepMin:":",sepSec:""};c.jPlayer.convertTime=function(a){a=new Date(a*1E3);var b=a.getUTCHours(),d=a.getUTCMinutes();a=a.getUTCSeconds();b=c.jPlayer.timeFormat.padHour&&b<10?"0"+b:b;d=c.jPlayer.timeFormat.padMin&&d<10?"0"+d:d;a=c.jPlayer.timeFormat.padSec&&a<10?"0"+a:a;return(c.jPlayer.timeFormat.showHour?
b+c.jPlayer.timeFormat.sepHour:"")+(c.jPlayer.timeFormat.showMin?d+c.jPlayer.timeFormat.sepMin:"")+(c.jPlayer.timeFormat.showSec?a+c.jPlayer.timeFormat.sepSec:"")};c.jPlayer.uaMatch=function(a){a=a.toLowerCase();var b=/(opera)(?:.*version)?[ \/]([\w.]+)/,d=/(msie) ([\w.]+)/,f=/(mozilla)(?:.*? rv:([\w.]+))?/;a=/(webkit)[ \/]([\w.]+)/.exec(a)||b.exec(a)||d.exec(a)||a.indexOf("compatible")<0&&f.exec(a)||[];return{browser:a[1]||"",version:a[2]||"0"}};c.jPlayer.browser={};var m=c.jPlayer.uaMatch(navigator.userAgent);
if(m.browser){c.jPlayer.browser[m.browser]=true;c.jPlayer.browser.version=m.version}c.jPlayer.prototype={count:0,version:{script:"2.0.0",needFlash:"2.0.0",flash:"unknown"},options:{swfPath:"js",solution:"html, flash",supplied:"mp3",preload:"metadata",volume:0.8,muted:false,backgroundColor:"#000000",cssSelectorAncestor:"#jp_interface_1",cssSelector:{videoPlay:".jp-video-play",play:".jp-play",pause:".jp-pause",stop:".jp-stop",seekBar:".jp-seek-bar",playBar:".jp-play-bar",mute:".jp-mute",unmute:".jp-unmute",
volumeBar:".jp-volume-bar",volumeBarValue:".jp-volume-bar-value",currentTime:".jp-current-time",duration:".jp-duration"},idPrefix:"jp",errorAlerts:false,warningAlerts:false},instances:{},status:{src:"",media:{},paused:true,format:{},formatType:"",waitForPlay:true,waitForLoad:true,srcSet:false,video:false,seekPercent:0,currentPercentRelative:0,currentPercentAbsolute:0,currentTime:0,duration:0},_status:{volume:h,muted:false,width:0,height:0},internal:{ready:false,instance:h,htmlDlyCmdId:h},solution:{html:true,
flash:true},format:{mp3:{codec:'audio/mpeg; codecs="mp3"',flashCanPlay:true,media:"audio"},m4a:{codec:'audio/mp4; codecs="mp4a.40.2"',flashCanPlay:true,media:"audio"},oga:{codec:'audio/ogg; codecs="vorbis"',flashCanPlay:false,media:"audio"},wav:{codec:'audio/wav; codecs="1"',flashCanPlay:false,media:"audio"},webma:{codec:'audio/webm; codecs="vorbis"',flashCanPlay:false,media:"audio"},m4v:{codec:'video/mp4; codecs="avc1.42E01E, mp4a.40.2"',flashCanPlay:true,media:"video"},ogv:{codec:'video/ogg; codecs="theora, vorbis"',
flashCanPlay:false,media:"video"},webmv:{codec:'video/webm; codecs="vorbis, vp8"',flashCanPlay:false,media:"video"}},_init:function(){var a=this;this.element.empty();this.status=c.extend({},this.status,this._status);this.internal=c.extend({},this.internal);this.formats=[];this.solutions=[];this.require={};this.htmlElement={};this.html={};this.html.audio={};this.html.video={};this.flash={};this.css={};this.css.cs={};this.css.jq={};this.status.volume=this._limitValue(this.options.volume,0,1);this.status.muted=
this.options.muted;this.status.width=this.element.css("width");this.status.height=this.element.css("height");this.element.css({"background-color":this.options.backgroundColor});c.each(this.options.supplied.toLowerCase().split(","),function(e,g){var i=g.replace(/^\s+|\s+$/g,"");if(a.format[i]){var j=false;c.each(a.formats,function(n,k){if(i===k){j=true;return false}});j||a.formats.push(i)}});c.each(this.options.solution.toLowerCase().split(","),function(e,g){var i=g.replace(/^\s+|\s+$/g,"");if(a.solution[i]){var j=
false;c.each(a.solutions,function(n,k){if(i===k){j=true;return false}});j||a.solutions.push(i)}});this.internal.instance="jp_"+this.count;this.instances[this.internal.instance]=this.element;this.element.attr("id")===""&&this.element.attr("id",this.options.idPrefix+"_jplayer_"+this.count);this.internal.self=c.extend({},{id:this.element.attr("id"),jq:this.element});this.internal.audio=c.extend({},{id:this.options.idPrefix+"_audio_"+this.count,jq:h});this.internal.video=c.extend({},{id:this.options.idPrefix+
"_video_"+this.count,jq:h});this.internal.flash=c.extend({},{id:this.options.idPrefix+"_flash_"+this.count,jq:h,swf:this.options.swfPath+(this.options.swfPath!==""&&this.options.swfPath.slice(-1)!=="/"?"/":"")+"Jplayer.swf"});this.internal.poster=c.extend({},{id:this.options.idPrefix+"_poster_"+this.count,jq:h});c.each(c.jPlayer.event,function(e,g){if(a.options[e]!==h){a.element.bind(g+".jPlayer",a.options[e]);a.options[e]=h}});this.htmlElement.poster=document.createElement("img");this.htmlElement.poster.id=
this.internal.poster.id;this.htmlElement.poster.onload=function(){if(!a.status.video||a.status.waitForPlay)a.internal.poster.jq.show()};this.element.append(this.htmlElement.poster);this.internal.poster.jq=c("#"+this.internal.poster.id);this.internal.poster.jq.css({width:this.status.width,height:this.status.height});this.internal.poster.jq.hide();this.require.audio=false;this.require.video=false;c.each(this.formats,function(e,g){a.require[a.format[g].media]=true});this.html.audio.available=false;if(this.require.audio){this.htmlElement.audio=
document.createElement("audio");this.htmlElement.audio.id=this.internal.audio.id;this.html.audio.available=!!this.htmlElement.audio.canPlayType}this.html.video.available=false;if(this.require.video){this.htmlElement.video=document.createElement("video");this.htmlElement.video.id=this.internal.video.id;this.html.video.available=!!this.htmlElement.video.canPlayType}this.flash.available=this._checkForFlash(10);this.html.canPlay={};this.flash.canPlay={};c.each(this.formats,function(e,g){a.html.canPlay[g]=
a.html[a.format[g].media].available&&""!==a.htmlElement[a.format[g].media].canPlayType(a.format[g].codec);a.flash.canPlay[g]=a.format[g].flashCanPlay&&a.flash.available});this.html.desired=false;this.flash.desired=false;c.each(this.solutions,function(e,g){if(e===0)a[g].desired=true;else{var i=false,j=false;c.each(a.formats,function(n,k){if(a[a.solutions[0]].canPlay[k])if(a.format[k].media==="video")j=true;else i=true});a[g].desired=a.require.audio&&!i||a.require.video&&!j}});this.html.support={};
this.flash.support={};c.each(this.formats,function(e,g){a.html.support[g]=a.html.canPlay[g]&&a.html.desired;a.flash.support[g]=a.flash.canPlay[g]&&a.flash.desired});this.html.used=false;this.flash.used=false;c.each(this.solutions,function(e,g){c.each(a.formats,function(i,j){if(a[g].support[j]){a[g].used=true;return false}})});this.html.used||this.flash.used||this._error({type:c.jPlayer.error.NO_SOLUTION,context:"{solution:'"+this.options.solution+"', supplied:'"+this.options.supplied+"'}",message:c.jPlayer.errorMsg.NO_SOLUTION,
hint:c.jPlayer.errorHint.NO_SOLUTION});this.html.active=false;this.html.audio.gate=false;this.html.video.gate=false;this.flash.active=false;this.flash.gate=false;if(this.flash.used){var b="id="+escape(this.internal.self.id)+"&vol="+this.status.volume+"&muted="+this.status.muted;if(c.browser.msie&&Number(c.browser.version)<=8){var d='<object id="'+this.internal.flash.id+'"';d+=' classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"';d+=' codebase="'+document.URL.substring(0,document.URL.indexOf(":"))+
'://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab"';d+=' type="application/x-shockwave-flash"';d+=' width="0" height="0">';d+="</object>";var f=[];f[0]='<param name="movie" value="'+this.internal.flash.swf+'" />';f[1]='<param name="quality" value="high" />';f[2]='<param name="FlashVars" value="'+b+'" />';f[3]='<param name="allowScriptAccess" value="always" />';f[4]='<param name="bgcolor" value="'+this.options.backgroundColor+'" />';b=document.createElement(d);for(d=0;d<f.length;d++)b.appendChild(document.createElement(f[d]));
this.element.append(b)}else{f='<embed name="'+this.internal.flash.id+'" id="'+this.internal.flash.id+'" src="'+this.internal.flash.swf+'"';f+=' width="0" height="0" bgcolor="'+this.options.backgroundColor+'"';f+=' quality="high" FlashVars="'+b+'"';f+=' allowScriptAccess="always"';f+=' type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';this.element.append(f)}this.internal.flash.jq=c("#"+this.internal.flash.id);this.internal.flash.jq.css({width:"0px",
height:"0px"})}if(this.html.used){if(this.html.audio.available){this._addHtmlEventListeners(this.htmlElement.audio,this.html.audio);this.element.append(this.htmlElement.audio);this.internal.audio.jq=c("#"+this.internal.audio.id)}if(this.html.video.available){this._addHtmlEventListeners(this.htmlElement.video,this.html.video);this.element.append(this.htmlElement.video);this.internal.video.jq=c("#"+this.internal.video.id);this.internal.video.jq.css({width:"0px",height:"0px"})}}this.html.used&&!this.flash.used&&
window.setTimeout(function(){a.internal.ready=true;a.version.flash="n/a";a._trigger(c.jPlayer.event.ready)},100);c.each(this.options.cssSelector,function(e,g){a._cssSelector(e,g)});this._updateInterface();this._updateButtons(false);this._updateVolume(this.status.volume);this._updateMute(this.status.muted);this.css.jq.videoPlay.length&&this.css.jq.videoPlay.hide();c.jPlayer.prototype.count++},destroy:function(){this._resetStatus();this._updateInterface();this._seeked();this.css.jq.currentTime.length&&
this.css.jq.currentTime.text("");this.css.jq.duration.length&&this.css.jq.duration.text("");this.status.srcSet&&this.pause();c.each(this.css.jq,function(a,b){b.unbind(".jPlayer")});this.element.removeData("jPlayer");this.element.unbind(".jPlayer");this.element.empty();this.instances[this.internal.instance]=h},enable:function(){},disable:function(){},_addHtmlEventListeners:function(a,b){var d=this;a.preload=this.options.preload;a.muted=this.options.muted;a.addEventListener("progress",function(){if(b.gate&&
!d.status.waitForLoad){d._getHtmlStatus(a);d._updateInterface();d._trigger(c.jPlayer.event.progress)}},false);a.addEventListener("timeupdate",function(){if(b.gate&&!d.status.waitForLoad){d._getHtmlStatus(a);d._updateInterface();d._trigger(c.jPlayer.event.timeupdate)}},false);a.addEventListener("durationchange",function(){if(b.gate&&!d.status.waitForLoad){d.status.duration=this.duration;d._getHtmlStatus(a);d._updateInterface();d._trigger(c.jPlayer.event.durationchange)}},false);a.addEventListener("play",
function(){if(b.gate&&!d.status.waitForLoad){d._updateButtons(true);d._trigger(c.jPlayer.event.play)}},false);a.addEventListener("playing",function(){if(b.gate&&!d.status.waitForLoad){d._updateButtons(true);d._seeked();d._trigger(c.jPlayer.event.playing)}},false);a.addEventListener("pause",function(){if(b.gate&&!d.status.waitForLoad){d._updateButtons(false);d._trigger(c.jPlayer.event.pause)}},false);a.addEventListener("waiting",function(){if(b.gate&&!d.status.waitForLoad){d._seeking();d._trigger(c.jPlayer.event.waiting)}},
false);a.addEventListener("canplay",function(){if(b.gate&&!d.status.waitForLoad){a.volume=d._volumeFix(d.status.volume);d._trigger(c.jPlayer.event.canplay)}},false);a.addEventListener("seeking",function(){if(b.gate&&!d.status.waitForLoad){d._seeking();d._trigger(c.jPlayer.event.seeking)}},false);a.addEventListener("seeked",function(){if(b.gate&&!d.status.waitForLoad){d._seeked();d._trigger(c.jPlayer.event.seeked)}},false);a.addEventListener("suspend",function(){if(b.gate&&!d.status.waitForLoad){d._seeked();
d._trigger(c.jPlayer.event.suspend)}},false);a.addEventListener("ended",function(){if(b.gate&&!d.status.waitForLoad){if(!c.jPlayer.browser.webkit)d.htmlElement.media.currentTime=0;d.htmlElement.media.pause();d._updateButtons(false);d._getHtmlStatus(a,true);d._updateInterface();d._trigger(c.jPlayer.event.ended)}},false);a.addEventListener("error",function(){if(b.gate&&!d.status.waitForLoad){d._updateButtons(false);d._seeked();if(d.status.srcSet){d.status.waitForLoad=true;d.status.waitForPlay=true;
d.status.video&&d.internal.video.jq.css({width:"0px",height:"0px"});d._validString(d.status.media.poster)&&d.internal.poster.jq.show();d.css.jq.videoPlay.length&&d.css.jq.videoPlay.show();d._error({type:c.jPlayer.error.URL,context:d.status.src,message:c.jPlayer.errorMsg.URL,hint:c.jPlayer.errorHint.URL})}}},false);c.each(c.jPlayer.htmlEvent,function(f,e){a.addEventListener(this,function(){b.gate&&!d.status.waitForLoad&&d._trigger(c.jPlayer.event[e])},false)})},_getHtmlStatus:function(a,b){var d=0,
f=0,e=0,g=0;d=a.currentTime;f=this.status.duration>0?100*d/this.status.duration:0;if(typeof a.seekable==="object"&&a.seekable.length>0){e=this.status.duration>0?100*a.seekable.end(a.seekable.length-1)/this.status.duration:100;g=100*a.currentTime/a.seekable.end(a.seekable.length-1)}else{e=100;g=f}if(b)f=g=d=0;this.status.seekPercent=e;this.status.currentPercentRelative=g;this.status.currentPercentAbsolute=f;this.status.currentTime=d},_resetStatus:function(){this.status=c.extend({},this.status,c.jPlayer.prototype.status)},
_trigger:function(a,b,d){a=c.Event(a);a.jPlayer={};a.jPlayer.version=c.extend({},this.version);a.jPlayer.status=c.extend(true,{},this.status);a.jPlayer.html=c.extend(true,{},this.html);a.jPlayer.flash=c.extend(true,{},this.flash);if(b)a.jPlayer.error=c.extend({},b);if(d)a.jPlayer.warning=c.extend({},d);this.element.trigger(a)},jPlayerFlashEvent:function(a,b){if(a===c.jPlayer.event.ready&&!this.internal.ready){this.internal.ready=true;this.version.flash=b.version;this.version.needFlash!==this.version.flash&&
this._error({type:c.jPlayer.error.VERSION,context:this.version.flash,message:c.jPlayer.errorMsg.VERSION+this.version.flash,hint:c.jPlayer.errorHint.VERSION});this._trigger(a)}if(this.flash.gate)switch(a){case c.jPlayer.event.progress:this._getFlashStatus(b);this._updateInterface();this._trigger(a);break;case c.jPlayer.event.timeupdate:this._getFlashStatus(b);this._updateInterface();this._trigger(a);break;case c.jPlayer.event.play:this._seeked();this._updateButtons(true);this._trigger(a);break;case c.jPlayer.event.pause:this._updateButtons(false);
this._trigger(a);break;case c.jPlayer.event.ended:this._updateButtons(false);this._trigger(a);break;case c.jPlayer.event.error:this.status.waitForLoad=true;this.status.waitForPlay=true;this.status.video&&this.internal.flash.jq.css({width:"0px",height:"0px"});this._validString(this.status.media.poster)&&this.internal.poster.jq.show();this.css.jq.videoPlay.length&&this.css.jq.videoPlay.show();this.status.video?this._flash_setVideo(this.status.media):this._flash_setAudio(this.status.media);this._error({type:c.jPlayer.error.URL,
context:b.src,message:c.jPlayer.errorMsg.URL,hint:c.jPlayer.errorHint.URL});break;case c.jPlayer.event.seeking:this._seeking();this._trigger(a);break;case c.jPlayer.event.seeked:this._seeked();this._trigger(a);break;default:this._trigger(a)}return false},_getFlashStatus:function(a){this.status.seekPercent=a.seekPercent;this.status.currentPercentRelative=a.currentPercentRelative;this.status.currentPercentAbsolute=a.currentPercentAbsolute;this.status.currentTime=a.currentTime;this.status.duration=a.duration},
_updateButtons:function(a){this.status.paused=!a;if(this.css.jq.play.length&&this.css.jq.pause.length)if(a){this.css.jq.play.hide();this.css.jq.pause.show()}else{this.css.jq.play.show();this.css.jq.pause.hide()}},_updateInterface:function(){this.css.jq.seekBar.length&&this.css.jq.seekBar.width(this.status.seekPercent+"%");this.css.jq.playBar.length&&this.css.jq.playBar.width(this.status.currentPercentRelative+"%");this.css.jq.currentTime.length&&this.css.jq.currentTime.text(c.jPlayer.convertTime(this.status.currentTime));
this.css.jq.duration.length&&this.css.jq.duration.text(c.jPlayer.convertTime(this.status.duration))},_seeking:function(){this.css.jq.seekBar.length&&this.css.jq.seekBar.addClass("jp-seeking-bg")},_seeked:function(){this.css.jq.seekBar.length&&this.css.jq.seekBar.removeClass("jp-seeking-bg")},setMedia:function(a){var b=this;this._seeked();clearTimeout(this.internal.htmlDlyCmdId);var d=this.html.audio.gate,f=this.html.video.gate,e=false;c.each(this.formats,function(g,i){var j=b.format[i].media==="video";
c.each(b.solutions,function(n,k){if(b[k].support[i]&&b._validString(a[i])){var l=k==="html";if(j)if(l){b.html.audio.gate=false;b.html.video.gate=true;b.flash.gate=false}else{b.html.audio.gate=false;b.html.video.gate=false;b.flash.gate=true}else if(l){b.html.audio.gate=true;b.html.video.gate=false;b.flash.gate=false}else{b.html.audio.gate=false;b.html.video.gate=false;b.flash.gate=true}if(b.flash.active||b.html.active&&b.flash.gate||d===b.html.audio.gate&&f===b.html.video.gate)b.clearMedia();else if(d!==
b.html.audio.gate&&f!==b.html.video.gate){b._html_pause();b.status.video&&b.internal.video.jq.css({width:"0px",height:"0px"});b._resetStatus()}if(j){if(l){b._html_setVideo(a);b.html.active=true;b.flash.active=false}else{b._flash_setVideo(a);b.html.active=false;b.flash.active=true}b.css.jq.videoPlay.length&&b.css.jq.videoPlay.show();b.status.video=true}else{if(l){b._html_setAudio(a);b.html.active=true;b.flash.active=false}else{b._flash_setAudio(a);b.html.active=false;b.flash.active=true}b.css.jq.videoPlay.length&&
b.css.jq.videoPlay.hide();b.status.video=false}e=true;return false}});if(e)return false});if(e){if(this._validString(a.poster))if(this.htmlElement.poster.src!==a.poster)this.htmlElement.poster.src=a.poster;else this.internal.poster.jq.show();else this.internal.poster.jq.hide();this.status.srcSet=true;this.status.media=c.extend({},a);this._updateButtons(false);this._updateInterface()}else{this.status.srcSet&&!this.status.waitForPlay&&this.pause();this.html.audio.gate=false;this.html.video.gate=false;
this.flash.gate=false;this.html.active=false;this.flash.active=false;this._resetStatus();this._updateInterface();this._updateButtons(false);this.internal.poster.jq.hide();this.html.used&&this.require.video&&this.internal.video.jq.css({width:"0px",height:"0px"});this.flash.used&&this.internal.flash.jq.css({width:"0px",height:"0px"});this._error({type:c.jPlayer.error.NO_SUPPORT,context:"{supplied:'"+this.options.supplied+"'}",message:c.jPlayer.errorMsg.NO_SUPPORT,hint:c.jPlayer.errorHint.NO_SUPPORT})}},
clearMedia:function(){this._resetStatus();this._updateButtons(false);this.internal.poster.jq.hide();clearTimeout(this.internal.htmlDlyCmdId);if(this.html.active)this._html_clearMedia();else this.flash.active&&this._flash_clearMedia()},load:function(){if(this.status.srcSet)if(this.html.active)this._html_load();else this.flash.active&&this._flash_load();else this._urlNotSetError("load")},play:function(a){a=typeof a==="number"?a:NaN;if(this.status.srcSet)if(this.html.active)this._html_play(a);else this.flash.active&&
this._flash_play(a);else this._urlNotSetError("play")},videoPlay:function(){this.play()},pause:function(a){a=typeof a==="number"?a:NaN;if(this.status.srcSet)if(this.html.active)this._html_pause(a);else this.flash.active&&this._flash_pause(a);else this._urlNotSetError("pause")},pauseOthers:function(){var a=this;c.each(this.instances,function(b,d){a.element!==d&&d.data("jPlayer").status.srcSet&&d.jPlayer("pause")})},stop:function(){if(this.status.srcSet)if(this.html.active)this._html_pause(0);else this.flash.active&&
this._flash_pause(0);else this._urlNotSetError("stop")},playHead:function(a){a=this._limitValue(a,0,100);if(this.status.srcSet)if(this.html.active)this._html_playHead(a);else this.flash.active&&this._flash_playHead(a);else this._urlNotSetError("playHead")},mute:function(){this.status.muted=true;this.html.used&&this._html_mute(true);this.flash.used&&this._flash_mute(true);this._updateMute(true);this._updateVolume(0);this._trigger(c.jPlayer.event.volumechange)},unmute:function(){this.status.muted=false;
this.html.used&&this._html_mute(false);this.flash.used&&this._flash_mute(false);this._updateMute(false);this._updateVolume(this.status.volume);this._trigger(c.jPlayer.event.volumechange)},_updateMute:function(a){if(this.css.jq.mute.length&&this.css.jq.unmute.length)if(a){this.css.jq.mute.hide();this.css.jq.unmute.show()}else{this.css.jq.mute.show();this.css.jq.unmute.hide()}},volume:function(a){a=this._limitValue(a,0,1);this.status.volume=a;this.html.used&&this._html_volume(a);this.flash.used&&this._flash_volume(a);
this.status.muted||this._updateVolume(a);this._trigger(c.jPlayer.event.volumechange)},volumeBar:function(a){if(!this.status.muted&&this.css.jq.volumeBar){var b=this.css.jq.volumeBar.offset();a=a.pageX-b.left;b=this.css.jq.volumeBar.width();this.volume(a/b)}},volumeBarValue:function(a){this.volumeBar(a)},_updateVolume:function(a){this.css.jq.volumeBarValue.length&&this.css.jq.volumeBarValue.width(a*100+"%")},_volumeFix:function(a){var b=0.0010*Math.random();return a+(a<0.5?b:-b)},_cssSelectorAncestor:function(a,
b){this.options.cssSelectorAncestor=a;b&&c.each(this.options.cssSelector,function(d,f){self._cssSelector(d,f)})},_cssSelector:function(a,b){var d=this;if(typeof b==="string")if(c.jPlayer.prototype.options.cssSelector[a]){this.css.jq[a]&&this.css.jq[a].length&&this.css.jq[a].unbind(".jPlayer");this.options.cssSelector[a]=b;this.css.cs[a]=this.options.cssSelectorAncestor+" "+b;this.css.jq[a]=b?c(this.css.cs[a]):[];this.css.jq[a].length&&this.css.jq[a].bind("click.jPlayer",function(f){d[a](f);c(this).blur();
return false});b&&this.css.jq[a].length!==1&&this._warning({type:c.jPlayer.warning.CSS_SELECTOR_COUNT,context:this.css.cs[a],message:c.jPlayer.warningMsg.CSS_SELECTOR_COUNT+this.css.jq[a].length+" found for "+a+" method.",hint:c.jPlayer.warningHint.CSS_SELECTOR_COUNT})}else this._warning({type:c.jPlayer.warning.CSS_SELECTOR_METHOD,context:a,message:c.jPlayer.warningMsg.CSS_SELECTOR_METHOD,hint:c.jPlayer.warningHint.CSS_SELECTOR_METHOD});else this._warning({type:c.jPlayer.warning.CSS_SELECTOR_STRING,
context:b,message:c.jPlayer.warningMsg.CSS_SELECTOR_STRING,hint:c.jPlayer.warningHint.CSS_SELECTOR_STRING})},seekBar:function(a){if(this.css.jq.seekBar){var b=this.css.jq.seekBar.offset();a=a.pageX-b.left;b=this.css.jq.seekBar.width();this.playHead(100*a/b)}},playBar:function(a){this.seekBar(a)},currentTime:function(){},duration:function(){},option:function(a,b){var d=a;if(arguments.length===0)return c.extend(true,{},this.options);if(typeof a==="string"){var f=a.split(".");if(b===h){for(var e=c.extend(true,
{},this.options),g=0;g<f.length;g++)if(e[f[g]]!==h)e=e[f[g]];else{this._warning({type:c.jPlayer.warning.OPTION_KEY,context:a,message:c.jPlayer.warningMsg.OPTION_KEY,hint:c.jPlayer.warningHint.OPTION_KEY});return h}return e}e=d={};for(g=0;g<f.length;g++)if(g<f.length-1){e[f[g]]={};e=e[f[g]]}else e[f[g]]=b}this._setOptions(d);return this},_setOptions:function(a){var b=this;c.each(a,function(d,f){b._setOption(d,f)});return this},_setOption:function(a,b){var d=this;switch(a){case "cssSelectorAncestor":this.options[a]=
b;c.each(d.options.cssSelector,function(f,e){d._cssSelector(f,e)});break;case "cssSelector":c.each(b,function(f,e){d._cssSelector(f,e)})}return this},resize:function(a){this.html.active&&this._resizeHtml(a);this.flash.active&&this._resizeFlash(a);this._trigger(c.jPlayer.event.resize)},_resizePoster:function(){},_resizeHtml:function(){},_resizeFlash:function(a){this.internal.flash.jq.css({width:a.width,height:a.height})},_html_initMedia:function(){this.status.srcSet&&!this.status.waitForPlay&&this.htmlElement.media.pause();
this.options.preload!=="none"&&this._html_load();this._trigger(c.jPlayer.event.timeupdate)},_html_setAudio:function(a){var b=this;c.each(this.formats,function(d,f){if(b.html.support[f]&&a[f]){b.status.src=a[f];b.status.format[f]=true;b.status.formatType=f;return false}});this.htmlElement.media=this.htmlElement.audio;this._html_initMedia()},_html_setVideo:function(a){var b=this;c.each(this.formats,function(d,f){if(b.html.support[f]&&a[f]){b.status.src=a[f];b.status.format[f]=true;b.status.formatType=
f;return false}});this.htmlElement.media=this.htmlElement.video;this._html_initMedia()},_html_clearMedia:function(){if(this.htmlElement.media){this.htmlElement.media.id===this.internal.video.id&&this.internal.video.jq.css({width:"0px",height:"0px"});this.htmlElement.media.pause();this.htmlElement.media.src="";c.browser.msie&&Number(c.browser.version)>=9||this.htmlElement.media.load()}},_html_load:function(){if(this.status.waitForLoad){this.status.waitForLoad=false;this.htmlElement.media.src=this.status.src;
try{this.htmlElement.media.load()}catch(a){}}clearTimeout(this.internal.htmlDlyCmdId)},_html_play:function(a){var b=this;this._html_load();this.htmlElement.media.play();if(!isNaN(a))try{this.htmlElement.media.currentTime=a}catch(d){this.internal.htmlDlyCmdId=setTimeout(function(){b.play(a)},100);return}this._html_checkWaitForPlay()},_html_pause:function(a){var b=this;a>0?this._html_load():clearTimeout(this.internal.htmlDlyCmdId);this.htmlElement.media.pause();if(!isNaN(a))try{this.htmlElement.media.currentTime=
a}catch(d){this.internal.htmlDlyCmdId=setTimeout(function(){b.pause(a)},100);return}a>0&&this._html_checkWaitForPlay()},_html_playHead:function(a){var b=this;this._html_load();try{if(typeof this.htmlElement.media.seekable==="object"&&this.htmlElement.media.seekable.length>0)this.htmlElement.media.currentTime=a*this.htmlElement.media.seekable.end(this.htmlElement.media.seekable.length-1)/100;else if(this.htmlElement.media.duration>0&&!isNaN(this.htmlElement.media.duration))this.htmlElement.media.currentTime=
a*this.htmlElement.media.duration/100;else throw"e";}catch(d){this.internal.htmlDlyCmdId=setTimeout(function(){b.playHead(a)},100);return}this.status.waitForLoad||this._html_checkWaitForPlay()},_html_checkWaitForPlay:function(){if(this.status.waitForPlay){this.status.waitForPlay=false;this.css.jq.videoPlay.length&&this.css.jq.videoPlay.hide();if(this.status.video){this.internal.poster.jq.hide();this.internal.video.jq.css({width:this.status.width,height:this.status.height})}}},_html_volume:function(a){if(this.html.audio.available)this.htmlElement.audio.volume=
a;if(this.html.video.available)this.htmlElement.video.volume=a},_html_mute:function(a){if(this.html.audio.available)this.htmlElement.audio.muted=a;if(this.html.video.available)this.htmlElement.video.muted=a},_flash_setAudio:function(a){var b=this;try{c.each(this.formats,function(f,e){if(b.flash.support[e]&&a[e]){switch(e){case "m4a":b._getMovie().fl_setAudio_m4a(a[e]);break;case "mp3":b._getMovie().fl_setAudio_mp3(a[e])}b.status.src=a[e];b.status.format[e]=true;b.status.formatType=e;return false}});
if(this.options.preload==="auto"){this._flash_load();this.status.waitForLoad=false}}catch(d){this._flashError(d)}},_flash_setVideo:function(a){var b=this;try{c.each(this.formats,function(f,e){if(b.flash.support[e]&&a[e]){switch(e){case "m4v":b._getMovie().fl_setVideo_m4v(a[e])}b.status.src=a[e];b.status.format[e]=true;b.status.formatType=e;return false}});if(this.options.preload==="auto"){this._flash_load();this.status.waitForLoad=false}}catch(d){this._flashError(d)}},_flash_clearMedia:function(){this.internal.flash.jq.css({width:"0px",
height:"0px"});try{this._getMovie().fl_clearMedia()}catch(a){this._flashError(a)}},_flash_load:function(){try{this._getMovie().fl_load()}catch(a){this._flashError(a)}this.status.waitForLoad=false},_flash_play:function(a){try{this._getMovie().fl_play(a)}catch(b){this._flashError(b)}this.status.waitForLoad=false;this._flash_checkWaitForPlay()},_flash_pause:function(a){try{this._getMovie().fl_pause(a)}catch(b){this._flashError(b)}if(a>0){this.status.waitForLoad=false;this._flash_checkWaitForPlay()}},
_flash_playHead:function(a){try{this._getMovie().fl_play_head(a)}catch(b){this._flashError(b)}this.status.waitForLoad||this._flash_checkWaitForPlay()},_flash_checkWaitForPlay:function(){if(this.status.waitForPlay){this.status.waitForPlay=false;this.css.jq.videoPlay.length&&this.css.jq.videoPlay.hide();if(this.status.video){this.internal.poster.jq.hide();this.internal.flash.jq.css({width:this.status.width,height:this.status.height})}}},_flash_volume:function(a){try{this._getMovie().fl_volume(a)}catch(b){this._flashError(b)}},
_flash_mute:function(a){try{this._getMovie().fl_mute(a)}catch(b){this._flashError(b)}},_getMovie:function(){return document[this.internal.flash.id]},_checkForFlash:function(a){var b=false,d;if(window.ActiveXObject)try{new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+a);b=true}catch(f){}else if(navigator.plugins&&navigator.mimeTypes.length>0)if(d=navigator.plugins["Shockwave Flash"])if(navigator.plugins["Shockwave Flash"].description.replace(/.*\s(\d+\.\d+).*/,"$1")>=a)b=true;return c.browser.msie&&
Number(c.browser.version)>=9?false:b},_validString:function(a){return a&&typeof a==="string"},_limitValue:function(a,b,d){return a<b?b:a>d?d:a},_urlNotSetError:function(a){this._error({type:c.jPlayer.error.URL_NOT_SET,context:a,message:c.jPlayer.errorMsg.URL_NOT_SET,hint:c.jPlayer.errorHint.URL_NOT_SET})},_flashError:function(a){this._error({type:c.jPlayer.error.FLASH,context:this.internal.flash.swf,message:c.jPlayer.errorMsg.FLASH+a.message,hint:c.jPlayer.errorHint.FLASH})},_error:function(a){this._trigger(c.jPlayer.event.error,
a);if(this.options.errorAlerts)this._alert("Error!"+(a.message?"\n\n"+a.message:"")+(a.hint?"\n\n"+a.hint:"")+"\n\nContext: "+a.context)},_warning:function(a){this._trigger(c.jPlayer.event.warning,h,a);if(this.options.errorAlerts)this._alert("Warning!"+(a.message?"\n\n"+a.message:"")+(a.hint?"\n\n"+a.hint:"")+"\n\nContext: "+a.context)},_alert:function(a){alert("jPlayer "+this.version.script+" : id='"+this.internal.self.id+"' : "+a)}};c.jPlayer.error={FLASH:"e_flash",NO_SOLUTION:"e_no_solution",NO_SUPPORT:"e_no_support",
URL:"e_url",URL_NOT_SET:"e_url_not_set",VERSION:"e_version"};c.jPlayer.errorMsg={FLASH:"jPlayer's Flash fallback is not configured correctly, or a command was issued before the jPlayer Ready event. Details: ",NO_SOLUTION:"No solution can be found by jPlayer in this browser. Neither HTML nor Flash can be used.",NO_SUPPORT:"It is not possible to play any media format provided in setMedia() on this browser using your current options.",URL:"Media URL could not be loaded.",URL_NOT_SET:"Attempt to issue media playback commands, while no media url is set.",
VERSION:"jPlayer "+c.jPlayer.prototype.version.script+" needs Jplayer.swf version "+c.jPlayer.prototype.version.needFlash+" but found "};c.jPlayer.errorHint={FLASH:"Check your swfPath option and that Jplayer.swf is there.",NO_SOLUTION:"Review the jPlayer options: support and supplied.",NO_SUPPORT:"Video or audio formats defined in the supplied option are missing.",URL:"Check media URL is valid.",URL_NOT_SET:"Use setMedia() to set the media URL.",VERSION:"Update jPlayer files."};c.jPlayer.warning=
{CSS_SELECTOR_COUNT:"e_css_selector_count",CSS_SELECTOR_METHOD:"e_css_selector_method",CSS_SELECTOR_STRING:"e_css_selector_string",OPTION_KEY:"e_option_key"};c.jPlayer.warningMsg={CSS_SELECTOR_COUNT:"The number of methodCssSelectors found did not equal one: ",CSS_SELECTOR_METHOD:"The methodName given in jPlayer('cssSelector') is not a valid jPlayer method.",CSS_SELECTOR_STRING:"The methodCssSelector given in jPlayer('cssSelector') is not a String or is empty.",OPTION_KEY:"The option requested in jPlayer('option') is undefined."};
c.jPlayer.warningHint={CSS_SELECTOR_COUNT:"Check your css selector and the ancestor.",CSS_SELECTOR_METHOD:"Check your method name.",CSS_SELECTOR_STRING:"Check your css selector is a string.",OPTION_KEY:"Check your option name."}})(jQuery);
