;(function($){var ver='Lite-1.0';$.fn.cycle=function(options){return this.each(function(){options=options||{};if(this.cycleTimeout)clearTimeout(this.cycleTimeout);this.cycleTimeout=0;this.cyclePause=0;var $cont=$(this);var $slides=options.slideExpr?$(options.slideExpr,this):$cont.children();var els=$slides.get();if(els.length<2){if(window.console&&window.console.log)
window.console.log('terminating; too few slides: '+els.length);return;}
var opts=$.extend({},$.fn.cycle.defaults,options||{},$.metadata?$cont.metadata():$.meta?$cont.data():{});opts.before=opts.before?[opts.before]:[];opts.after=opts.after?[opts.after]:[];opts.after.unshift(function(){opts.busy=0;});var cls=this.className;opts.width=parseInt((cls.match(/w:(\d+)/)||[])[1])||opts.width;opts.height=parseInt((cls.match(/h:(\d+)/)||[])[1])||opts.height;opts.timeout=parseInt((cls.match(/t:(\d+)/)||[])[1])||opts.timeout;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);var first=0;$slides.css({position:'absolute',top:0,left:0}).hide().each(function(i){$(this).css('z-index',els.length-i)});$(els[first]).css('opacity',1).show();if($.browser.msie)els[first].style.removeAttribute('filter');if(opts.fit&&opts.width)
$slides.width(opts.width);if(opts.fit&&opts.height&&opts.height!='auto')
$slides.height(opts.height);if(opts.pause)
$cont.hover(function(){this.cyclePause=1;},function(){this.cyclePause=0;});$.fn.cycle.transitions.fade($cont,$slides,opts);$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();});$slides.not(':eq('+first+')').css({opacity:0});if(opts.cssFirst)
$($slides[first]).css(opts.cssFirst);if(opts.timeout){if(opts.speed.constructor==String)
opts.speed={slow:600,fast:200}[opts.speed]||400;if(!opts.sync)
opts.speed=opts.speed/2;while((opts.timeout-opts.speed)<250)
opts.timeout+=opts.speed;}
opts.speedIn=opts.speed;opts.speedOut=opts.speed;opts.slideCount=els.length;opts.currSlide=first;opts.nextSlide=1;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.click&&!opts.next)
opts.next=opts.click;if(opts.next)
$(opts.next).bind('click',function(){return advance(els,opts,opts.rev?-1:1)});if(opts.prev)
$(opts.prev).bind('click',function(){return advance(els,opts,opts.rev?1:-1)});if(opts.timeout)
this.cycleTimeout=setTimeout(function(){go(els,opts,0,!opts.rev)},opts.timeout+(opts.delay||0));});};function go(els,opts,manual,fwd){if(opts.busy)return;var p=els[0].parentNode,curr=els[opts.currSlide],next=els[opts.nextSlide];if(p.cycleTimeout===0&&!manual)
return;if(manual||!p.cyclePause){if(opts.before.length)
$.each(opts.before,function(i,o){o.apply(next,[curr,next,opts,fwd]);});var after=function(){if($.browser.msie)
this.style.removeAttribute('filter');$.each(opts.after,function(i,o){o.apply(next,[curr,next,opts,fwd]);});};if(opts.nextSlide!=opts.currSlide){opts.busy=1;$.fn.cycle.custom(curr,next,opts,after);}
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.timeout)
p.cycleTimeout=setTimeout(function(){go(els,opts,0,!opts.rev)},opts.timeout);};function advance(els,opts,val){var p=els[0].parentNode,timeout=p.cycleTimeout;if(timeout){clearTimeout(timeout);p.cycleTimeout=0;}
opts.nextSlide=opts.currSlide+val;if(opts.nextSlide<0){opts.nextSlide=els.length-1;}
else if(opts.nextSlide>=els.length){opts.nextSlide=0;}
go(els,opts,1,val>=0);return false;};$.fn.cycle.custom=function(curr,next,opts,cb){var $l=$(curr),$n=$(next);$n.css({opacity:0});var fn=function(){$n.animate({opacity:1},opts.speedIn,opts.easeIn,cb)};$l.animate({opacity:0},opts.speedOut,opts.easeOut,function(){$l.css({display:'none'});if(!opts.sync)fn();});if(opts.sync)fn();};$.fn.cycle.transitions={fade:function($cont,$slides,opts){$slides.not(':eq(0)').css('opacity',0);opts.before.push(function(){$(this).show()});}};$.fn.cycle.ver=function(){return ver;};$.fn.cycle.defaults={timeout:4000,speed:1000,next:null,prev:null,before:null,after:null,height:'auto',sync:1,fit:0,pause:0,delay:0,slideExpr:null};})(jQuery);
jQuery.extend(jQuery.easing,{easeInQuad:function(x,t,b,c,d){return c*(t/=d)*t+b;},easeOutQuad:function(x,t,b,c,d){return-c*(t/=d)*(t-2)+b;},easeInOutQuad:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t+b;return-c/2*((--t)*(t-2)-1)+b;},easeInCubic:function(x,t,b,c,d){return c*(t/=d)*t*t+b;},easeOutCubic:function(x,t,b,c,d){return c*((t=t/d-1)*t*t+1)+b;},easeInOutCubic:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t+b;return c/2*((t-=2)*t*t+2)+b;},easeInQuart:function(x,t,b,c,d){return c*(t/=d)*t*t*t+b;},easeOutQuart:function(x,t,b,c,d){return-c*((t=t/d-1)*t*t*t-1)+b;},easeInOutQuart: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;},easeInQuint:function(x,t,b,c,d){return c*(t/=d)*t*t*t*t+b;},easeOutQuint:function(x,t,b,c,d){return c*((t=t/d-1)*t*t*t*t+1)+b;},easeInOutQuint:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t*t*t+b;return c/2*((t-=2)*t*t*t*t+2)+b;},easeInSine:function(x,t,b,c,d){return-c*Math.cos(t/d*(Math.PI/2))+c+b;},easeOutSine:function(x,t,b,c,d){return c*Math.sin(t/d*(Math.PI/2))+b;},easeInOutSine:function(x,t,b,c,d){return-c/2*(Math.cos(Math.PI*t/d)-1)+b;},easeInExpo:function(x,t,b,c,d){return(t==0)?b:c*Math.pow(2,10*(t/d-1))+b;},easeOutExpo:function(x,t,b,c,d){return(t==d)?b+c:c*(-Math.pow(2,-10*t/d)+1)+b;},easeInOutExpo:function(x,t,b,c,d){if(t==0)return b;if(t==d)return b+c;if((t/=d/2)<1)return c/2*Math.pow(2,10*(t-1))+b;return c/2*(-Math.pow(2,-10*--t)+2)+b;},easeInCirc:function(x,t,b,c,d){return-c*(Math.sqrt(1-(t/=d)*t)-1)+b;},easeOutCirc:function(x,t,b,c,d){return c*Math.sqrt(1-(t=t/d-1)*t)+b;},easeInOutCirc:function(x,t,b,c,d){if((t/=d/2)<1)return-c/2*(Math.sqrt(1-t*t)-1)+b;return c/2*(Math.sqrt(1-(t-=2)*t)+1)+b;},easeInElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d)==1)return b+c;if(!p)p=d*.3;if(a<Math.abs(c)){a=c;var s=p/4;}
else var s=p/(2*Math.PI)*Math.asin(c/a);return-(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b;},easeOutElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d)==1)return b+c;if(!p)p=d*.3;if(a<Math.abs(c)){a=c;var s=p/4;}
else var s=p/(2*Math.PI)*Math.asin(c/a);return a*Math.pow(2,-10*t)*Math.sin((t*d-s)*(2*Math.PI)/p)+c+b;},easeInOutElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d/2)==2)return b+c;if(!p)p=d*(.3*1.5);if(a<Math.abs(c)){a=c;var s=p/4;}
else var s=p/(2*Math.PI)*Math.asin(c/a);if(t<1)return-.5*(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b;return a*Math.pow(2,-10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p)*.5+c+b;},easeInBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;return c*(t/=d)*t*((s+1)*t-s)+b;},easeOutBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;return c*((t=t/d-1)*t*((s+1)*t+s)+1)+b;},easeInOutBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;if((t/=d/2)<1)return c/2*(t*t*(((s*=(1.525))+1)*t-s))+b;return c/2*((t-=2)*t*(((s*=(1.525))+1)*t+s)+2)+b;},easeInBounce:function(x,t,b,c,d){return c-jQuery.easing.easeOutBounce(x,d-t,0,c,d)+b;},easeOutBounce:function(x,t,b,c,d){if((t/=d)<(1/2.75)){return c*(7.5625*t*t)+b;}else if(t<(2/2.75)){return c*(7.5625*(t-=(1.5/2.75))*t+.75)+b;}else if(t<(2.5/2.75)){return c*(7.5625*(t-=(2.25/2.75))*t+.9375)+b;}else{return c*(7.5625*(t-=(2.625/2.75))*t+.984375)+b;}},easeInOutBounce:function(x,t,b,c,d){if(t<d/2)return jQuery.easing.easeInBounce(x,t*2,0,c,d)*.5+b;return jQuery.easing.easeOutBounce(x,t*2-d,0,c,d)*.5+c*.5+b;}});
;(function($){YCodaSlider={};YCodaSlider.Init=function(options,data){if(typeof options=="string"){return YCodaSlider.Api[options](this,data);}else{return this.each(function(){new YCodaSlider.Core(this,options);});}};YCodaSlider.Api={current:function(el){return $(el).data("current");},width:function(el){return $(el).data("width");},count:function(el){return $(el).data("count");},left:function(el){return $(el).trigger("left");},right:function(el){return $(el).trigger("right");},go:function(el,nr){return $(el).trigger("go",nr);}};YCodaSlider.Core=function(el,options){var _metadata={};if($.metadata)
_metadata=$(el).metadata();var _options=$.extend({height:false,width:false,shortcut:[37,39],id:false,scroll:false,history:false,arrows:true,navigator:true,easeFunc:false,easeTime:false,after:false,tracking:false,tracking_pre:false,debug:false},_metadata,options);var that=el;if(!$.ajaxHistory)
_options.history=false;var _pw=false;var _pc=false;var _vw=false;var _current=1;_data("width",0);_data("current",_current);$(that).bind("left",_left);$(that).bind("right",_right);$(that).bind("go",_go);$(that).bind("after",_after);_html();_set_options();_set_panel_width();_set_container_width();_set_current_panel();_check_arrows();_arrows();_keyword();_navigator();_move();_debug();function _left(){var _goto=0;var _position=_current-1;if(_current==1){_goto=_pc-1;}else{_goto=_position-1;};$(that).trigger("go",[_goto]);var _history=_goto+1;if(_options.history)
location.hash=_history;}
function _right(){var _goto=0;var _position=_current-1;if(_current==_pc){_goto=0;}else{_goto=_position+1;};$(that).trigger("go",[_goto]);if(_options.history)
location.hash=_current;}
function _go(ev,nr){var _x=-(_pw*nr);_current=_data("current",nr+1);$("div.yslider-viewer",that).animate({scrollTop:0},_options.easeTime,_options.easeFunc);$("div.yslider-container",that).animate({left:_x},_options.easeTime,_options.easeFunc);$(that).trigger("after");}
function _after(){if(_options.after)
_after();}
function _is_valid_current(){return _options.history&&location.hash&&parseInt(location.hash.slice(1))<=_pc;}
function _move(){$(that).trigger("go",[(_current-1)]);if(_options.history)
location.hash=_current;}
function _debug(){if(_options.debug){$('div.yslider-viewer',that).css({width:10653,overflow:'auto'});}}
function _keyword(){var sc=_options.shortcut;if(sc&&sc[0]&&sc[1]){$(document).keydown(function(e){if(e==null){keycode=event.keyCode;}else{keycode=e.which;}
if(!($(that).css("display")==="none")){if(keycode==sc[0]){$(that).ycodaslider("left");}else if(keycode==sc[1]){$(that).ycodaslider("right");}}});}}
function _arrows(){if(_options.arrows)
new YCodaSlider.Arrows(that,_options);}
function _navigator(){if(_options.navigator){new YCodaSlider.Navigator(that,_options);}}
function _check_arrows(){if(_pc<=1)
_options.arrows=false;}
function _set_current_panel(){if(_is_valid_current()){_current=parseInt(location.hash.slice(1))||1;}}
function _set_container_width(){var _container=$("div.yslider-container",that);_container.css("width",_vw);}
function _set_panel_width(){var _panels=$(that).find("div.yslider-panel");_pw=_options.width||_panels.width();_pc=_panels.size();_vw=_pw*_pc;_data("width",_pw);}
function _set_options(){if(_options.width){_set_width(_options.width);}
if(_options.height){_set_height(_options.height);}
if(_options.scroll){_set_scroll();}}
function _html(){var _html='<div class="yslider-wrap"><div class="yslider-viewer"><div class="yslider-container">';var _panels=$(".yslider-panelwrapper",that);$(that).empty();$(that).append(_html);$('.yslider-container',that).append(_panels);_panels.wrap('<div class="yslider-panel">');}
function _set_scroll(){$('.yslider-viewer',that).css({"overflow-y":"auto"});}
function _set_height(height){$('.yslider-viewer',that).css("height",height);}
function _set_width(width){$(that).css("width",width+100);$('.yslider-panel,.yslider-viewer',that).css("width",width);}
function _data(key,val){if(val){$(that).data(key,val);return val;}else{return $(that).data(key);}}};YCodaSlider.Utils={css:function(url){$('head').append('<link type="text/css" href="'+url+'" rel="stylesheet" />');}};YCodaSlider.Arrows=function(el,options){var that=el;_arrows();_debug();_bind();function _arrows(){var _viewer=$("div.yslider-viewer",that);_viewer.before('<div class="yslider-navl"><a href="#">Left</a></div>');_viewer.after('<div class="yslider-navr"><a href="#">Right</a></div>');}
function _debug(){if(options.debug){$(".yslider-navl",that).css("left","-50px");}}
function _bind(){$("div.yslider-navl a",that).click(function(){$(that).ycodaslider("left");return false;});$("div.yslider-navr a",that).click(function(){$(that).ycodaslider("right");return false;});}};YCodaSlider.Navigator=function(el,options){var that=el;_navigator();_bind();$(that).bind("go",_go);function _go(ev,nr){$(".yslider-nav",that).find("a").not(nr).removeClass("current");$(".yslider-nav",that).find("a").eq(nr).addClass("current");}
function _navigator(){var _viewer=$("div.yslider-viewer",that);_viewer.before('<div class="yslider-nav"><ul></ul></div>');var _nav=$("div.yslider-nav ul",that);$("div.yslider-panel",that).each(function(n){var _lp=$("div.yslider-panelwrapper",this).attr("title")||(n+1);var _class='';var _prefix='';if(options.tracking_pre)
_prefix=options.tracking_pre+'/';if(options.tracking&&$.fn.janalytics)
_class="tracking {label : '/ycodaslider/"+_prefix+_lp+"'}";if(options.history){$('<li><a class="'+_class+'" href="#'+(n+1)+'">'+_lp+'</a></li>').appendTo(_nav);}else{$('<li><a class="'+_class+'" href="#">'+_lp+'</a></li>').appendTo(_nav).click(function(){return false;});}});if(options.width){_nav.parent().css("width",options.width);}else{_nav.parent().css("width",$(that).ycodaslider("width"));}}
function _bind(){$("div.yslider-nav a",that).each(function(z){$(this).bind("click",function(){$(that).ycodaslider("go",[z]);});});}};YCodaSlider.Gallery=function(){return this.each(function(nr){var that=this;var _img=$('img',that);_img.each(function(z){$(this).wrap('<div style="padding:0px" class="yslider-panelwrapper" title="'+(z+1)+'">');});});};YCodaSlider.Lazy=function(options){var _options=$.extend({selector:'img',placeholder:"",classcss:"placeholder",threshold:1,effect:"fadeIn",effectspeed:"slow"},options);return this.each(function(nr){var that=this;var _target=$(_options.selector,that);var _total=_target.size();var _current=_get_current();var _call=0;_parse(false,_current);$(that).bind("after",_parse);function _parse(ev,current){_call++;if(_call!=2){var _c=ev?($(that).ycodaslider("current")-1):current;_target.each(function(nr){if(!_is_near(nr,_c,_total,_options.threshold)){_disappear(this,ev);}else{_appear(false,nr);}});}}
function _appear(ev,nr){var _img=_target.eq(nr);var _src=_img.attr("original");if(_src){_img.hide().attr("src",_src).attr("original","")
[_options.effect](_options.effectspeed).removeClass(_options.classcss);}}
function _disappear(el,ev){var _src=el.src;if(!ev){$(el).attr("src",_options.placeholder).attr("original",_src).addClass(_options.classcss);}}
function _get_current(){return location.hash&&location.hash.slice(1)<=_total?(location.hash.slice(1)-1):0;}
function _is_near(nr,current,total,threshold){var _tmax=current+threshold;var _tmin=current-threshold;if(_tmin<0)_tmin=0;if(_tmax>total)_tmax=total;var _left=!((current-threshold)>=0);var _right=(current+threshold)>=total;var _flag=false;if(threshold==0){return nr==current;}else{if(_left||_right)
_flag=_expr(nr,total,threshold,_left,_right);return(nr===current||(nr>=_tmin&&nr<=_tmax)||_flag);}}
function _expr(nr,total,threshold,left,right){if(left){return(nr>=(total-threshold)&&nr<=total);}
if(right){return(nr>=0&&nr<=threshold);}}});};YCodaSlider.Code=function(){return this.each(function(nr){var that=this;var _js=$("a",this);var _j=$(this).parent();_js.each(function(nr){var _href=$(this).attr("href");var _that=this;var _css=$(this).attr("class");var _html='<div class="yslider-panelwrapper" title="'+$(_that).text()+'">';$(_that).wrap(_html);var _panel=$(_that).parent();_panel.empty();$.get(_href,function(data){_panel.html('<pre><code class="'+_css+'">'+(_html_encode(data))+'</code></pre>');if($.fn.chili)
$("code",_panel).chili();});});function _html_encode(s){var str=new String(s);str=str.replace(/&/g,"&amp;");str=str.replace(/</g,"&lt;");str=str.replace(/>/g,"&gt;");str=str.replace(/"/g,"&quot;");return str;}});};YCodaSlider.Feeds=function(){return this.each(function(nr){if(!$.fn.gFeed){alert("Include jQuery gFeed plugin");return;}
var that=this;var _feeds=$("a",this);_feeds.each(function(nr){var _that=this;var _href=$(_that).attr("href");var _html='<div class="yslider-panelwrapper" title="'+$(_that).text()+'">';$(_that).wrap(_html);var _panel=$(_that).parent();_panel.empty();$(_that).gFeed({title:_href,target:_panel});});});};$.fn.ycodaslider=YCodaSlider.Init;$.fn.ycodagallery=YCodaSlider.Gallery;$.fn.ycodalazy=YCodaSlider.Lazy;$.fn.ycodacode=YCodaSlider.Code;$.fn.ycodafeeds=YCodaSlider.Feeds;$.fn.ycodacss=YCodaSlider.Utils.css;})(jQuery);