;
/*!
* jQuery cycletwo; build: v20131005
* http://jquery.malsup.com/cycletwo/
* Copyright (c) 2013 M. Alsup; Dual licensed: MIT/GPL
*/
/*! core engine; version: 20131003 */
(function($){"use strict";var version='20131003';$.fn.cycletwo=function(options)
{var o;if(this.length===0&&!$.isReady){o={s:this.selector,c:this.context};$.fn.cycletwo.log('requeuing slideshow (dom not ready)');$(function(){$(o.s,o.c).cycletwo(options);});return this;}
return this.each(function(){var data,opts,shortName,val;var container=$(this);var log=$.fn.cycletwo.log;if(container.data('cycletwo.opts'))
return;if(container.data('cycletwo-log')===false||(options&&options.log===false)||(opts&&opts.log===false)){log=$.noop;}
log('--c2 init--');data=container.data();for(var p in data){if(data.hasOwnProperty(p)&&/^cycletwo[A-Z]+/.test(p)){val=data[p];shortName=p.match(/^cycletwo(.*)/)[1].replace(/^[A-Z]/,lowerCase);log(shortName+':',val,'('+typeof val+')');data[shortName]=val;}}
opts=$.extend({},$.fn.cycletwo.defaults,data,options||{});opts.timeoutId=0;opts.paused=opts.paused||false;opts.container=container;opts._maxZ=opts.maxZ;opts.API=$.extend({_container:container},$.fn.cycletwo.API);opts.API.log=log;opts.API.trigger=function(eventName,args){opts.container.trigger(eventName,args);return opts.API;};container.data('cycletwo.opts',opts);container.data('cycletwo.API',opts.API);opts.API.trigger('cycletwo-bootstrap',[opts,opts.API]);opts.API.addInitialSlides();opts.API.preInitSlideshow();if(opts.slides.length)
opts.API.initSlideshow();});};$.fn.cycletwo.API={opts:function(){return this._container.data('cycletwo.opts');},addInitialSlides:function(){var opts=this.opts();var slides=opts.slides;opts.slideCount=0;opts.slides=$();slides=slides.jquery?slides:opts.container.find(slides);if(opts.random){slides.sort(function(){return Math.random()-0.5;});}
opts.API.add(slides);},preInitSlideshow:function(){var opts=this.opts();opts.API.trigger('cycletwo-pre-initialize',[opts]);var tx=$.fn.cycletwo.transitions[opts.fx];if(tx&&$.isFunction(tx.preInit))
tx.preInit(opts);opts._preInitialized=true;},postInitSlideshow:function(){var opts=this.opts();opts.API.trigger('cycletwo-post-initialize',[opts]);var tx=$.fn.cycletwo.transitions[opts.fx];if(tx&&$.isFunction(tx.postInit))
tx.postInit(opts);},initSlideshow:function(){var opts=this.opts();var pauseObj=opts.container;var slideOpts;opts.API.calcFirstSlide();if(opts.container.css('position')=='static')
opts.container.css('position','relative');$(opts.slides[opts.currSlide]).css('opacity',1).show();opts.API.stackSlides(opts.slides[opts.currSlide],opts.slides[opts.nextSlide],!opts.reverse);if(opts.pauseOnHover){if(opts.pauseOnHover!==true)
pauseObj=$(opts.pauseOnHover);pauseObj.hover(function(){opts.API.pause(true);},function(){opts.API.resume(true);});}
if(opts.timeout){slideOpts=opts.API.getSlideOpts(opts.currSlide);opts.API.queueTransition(slideOpts,slideOpts.timeout+opts.delay);}
opts._initialized=true;opts.API.updateView(true);opts.API.trigger('cycletwo-initialized',[opts]);opts.API.postInitSlideshow();},pause:function(hover){var opts=this.opts(),slideOpts=opts.API.getSlideOpts(),alreadyPaused=opts.hoverPaused||opts.paused;if(hover)
opts.hoverPaused=true;else
opts.paused=true;if(!alreadyPaused){opts.container.addClass('cycletwo-paused');opts.API.trigger('cycletwo-paused',[opts]).log('cycletwo-paused');if(slideOpts.timeout){clearTimeout(opts.timeoutId);opts.timeoutId=0;opts._remainingTimeout-=($.now()-opts._lastQueue);if(opts._remainingTimeout<0||isNaN(opts._remainingTimeout))
opts._remainingTimeout=undefined;}}},resume:function(hover){var opts=this.opts(),alreadyResumed=!opts.hoverPaused&&!opts.paused,remaining;if(hover)
opts.hoverPaused=false;else
opts.paused=false;if(!alreadyResumed){opts.container.removeClass('cycletwo-paused');if(opts.slides.filter(':animated').length===0)
opts.API.queueTransition(opts.API.getSlideOpts(),opts._remainingTimeout);opts.API.trigger('cycletwo-resumed',[opts,opts._remainingTimeout]).log('cycletwo-resumed');}},add:function(slides,prepend){var opts=this.opts();var oldSlideCount=opts.slideCount;var startSlideshow=false;var len;if($.type(slides)=='string')
slides=$.trim(slides);$(slides).each(function(i){var slideOpts;var slide=$(this);if(prepend)
opts.container.prepend(slide);else
opts.container.append(slide);opts.slideCount++;slideOpts=opts.API.buildSlideOpts(slide);if(prepend)
opts.slides=$(slide).add(opts.slides);else
opts.slides=opts.slides.add(slide);opts.API.initSlide(slideOpts,slide,--opts._maxZ);slide.data('cycletwo.opts',slideOpts);opts.API.trigger('cycletwo-slide-added',[opts,slideOpts,slide]);});opts.API.updateView(true);startSlideshow=opts._preInitialized&&(oldSlideCount<2&&opts.slideCount>=1);if(startSlideshow){if(!opts._initialized)
opts.API.initSlideshow();else if(opts.timeout){len=opts.slides.length;opts.nextSlide=opts.reverse?len-1:1;if(!opts.timeoutId){opts.API.queueTransition(opts);}}}},calcFirstSlide:function(){var opts=this.opts();var firstSlideIndex;firstSlideIndex=parseInt(opts.startingSlide||0,10);if(firstSlideIndex>=opts.slides.length||firstSlideIndex<0)
firstSlideIndex=0;opts.currSlide=firstSlideIndex;if(opts.reverse){opts.nextSlide=firstSlideIndex-1;if(opts.nextSlide<0)
opts.nextSlide=opts.slides.length-1;}
else{opts.nextSlide=firstSlideIndex+1;if(opts.nextSlide==opts.slides.length)
opts.nextSlide=0;}},calcNextSlide:function(){var opts=this.opts();var roll;if(opts.reverse){roll=(opts.nextSlide-1)<0;opts.nextSlide=roll?opts.slideCount-1:opts.nextSlide-1;opts.currSlide=roll?0:opts.nextSlide+1;}
else{roll=(opts.nextSlide+1)==opts.slides.length;opts.nextSlide=roll?0:opts.nextSlide+1;opts.currSlide=roll?opts.slides.length-1:opts.nextSlide-1;}},calcTx:function(slideOpts,manual){var opts=slideOpts;var tx;if(manual&&opts.manualFx)
tx=$.fn.cycletwo.transitions[opts.manualFx];if(!tx)
tx=$.fn.cycletwo.transitions[opts.fx];if(!tx){tx=$.fn.cycletwo.transitions.fade;opts.API.log('Transition "'+opts.fx+'" not found.  Using fade.');}
return tx;},prepareTx:function(manual,fwd){var opts=this.opts();var after,curr,next,slideOpts,tx;if(opts.slideCount<2){opts.timeoutId=0;return;}
if(manual&&(!opts.busy||opts.manualTrump)){opts.API.stopTransition();opts.busy=false;clearTimeout(opts.timeoutId);opts.timeoutId=0;}
if(opts.busy)
return;if(opts.timeoutId===0&&!manual)
return;curr=opts.slides[opts.currSlide];next=opts.slides[opts.nextSlide];slideOpts=opts.API.getSlideOpts(opts.nextSlide);tx=opts.API.calcTx(slideOpts,manual);opts._tx=tx;if(manual&&slideOpts.manualSpeed!==undefined)
slideOpts.speed=slideOpts.manualSpeed;if(opts.nextSlide!=opts.currSlide&&(manual||(!opts.paused&&!opts.hoverPaused&&opts.timeout))){opts.API.trigger('cycletwo-before',[slideOpts,curr,next,fwd]);if(tx.before)
tx.before(slideOpts,curr,next,fwd);after=function(){opts.busy=false;if(!opts.container.data('cycletwo.opts'))
return;if(tx.after)
tx.after(slideOpts,curr,next,fwd);opts.API.trigger('cycletwo-after',[slideOpts,curr,next,fwd]);opts.API.queueTransition(slideOpts);opts.API.updateView(true);};opts.busy=true;if(tx.transition)
tx.transition(slideOpts,curr,next,fwd,after);else
opts.API.doTransition(slideOpts,curr,next,fwd,after);opts.API.calcNextSlide();opts.API.updateView();}else{opts.API.queueTransition(slideOpts);}},doTransition:function(slideOpts,currEl,nextEl,fwd,callback){var opts=slideOpts;var curr=$(currEl),next=$(nextEl);var fn=function(){next.animate(opts.animIn||{opacity:1},opts.speed,opts.easeIn||opts.easing,callback);};next.css(opts.cssBefore||{});curr.animate(opts.animOut||{},opts.speed,opts.easeOut||opts.easing,function(){curr.css(opts.cssAfter||{});if(!opts.sync){fn();}});if(opts.sync){fn();}},queueTransition:function(slideOpts,specificTimeout){var opts=this.opts();var timeout=specificTimeout!==undefined?specificTimeout:slideOpts.timeout;if(opts.nextSlide===0&&--opts.loop===0){opts.API.log('terminating; loop=0');opts.timeout=0;if(timeout){setTimeout(function(){opts.API.trigger('cycletwo-finished',[opts]);},timeout);}
else{opts.API.trigger('cycletwo-finished',[opts]);}
opts.nextSlide=opts.currSlide;return;}
if(timeout){opts._lastQueue=$.now();if(specificTimeout===undefined)
opts._remainingTimeout=slideOpts.timeout;if(!opts.paused&&!opts.hoverPaused){opts.timeoutId=setTimeout(function(){opts.API.prepareTx(false,!opts.reverse);},timeout);}}},stopTransition:function(){var opts=this.opts();if(opts.slides.filter(':animated').length){opts.slides.stop(false,true);opts.API.trigger('cycletwo-transition-stopped',[opts]);}
if(opts._tx&&opts._tx.stopTransition)
opts._tx.stopTransition(opts);},advanceSlide:function(val){var opts=this.opts();clearTimeout(opts.timeoutId);opts.timeoutId=0;opts.nextSlide=opts.currSlide+val;if(opts.nextSlide<0)
opts.nextSlide=opts.slides.length-1;else if(opts.nextSlide>=opts.slides.length)
opts.nextSlide=0;opts.API.prepareTx(true,val>=0);return false;},buildSlideOpts:function(slide){var opts=this.opts();var val,shortName;var slideOpts=slide.data()||{};for(var p in slideOpts){if(slideOpts.hasOwnProperty(p)&&/^cycletwo[A-Z]+/.test(p)){val=slideOpts[p];shortName=p.match(/^cycletwo(.*)/)[1].replace(/^[A-Z]/,lowerCase);opts.API.log('['+(opts.slideCount-1)+']',shortName+':',val,'('+typeof val+')');slideOpts[shortName]=val;}}
slideOpts=$.extend({},$.fn.cycletwo.defaults,opts,slideOpts);slideOpts.slideNum=opts.slideCount;try{delete slideOpts.API;delete slideOpts.slideCount;delete slideOpts.currSlide;delete slideOpts.nextSlide;delete slideOpts.slides;}catch(e){}
return slideOpts;},getSlideOpts:function(index){var opts=this.opts();if(index===undefined)
index=opts.currSlide;var slide=opts.slides[index];var slideOpts=$(slide).data('cycletwo.opts');return $.extend({},opts,slideOpts);},initSlide:function(slideOpts,slide,suggestedZindex){var opts=this.opts();slide.css(slideOpts.slideCss||{});if(suggestedZindex>0)
slide.css('zIndex',suggestedZindex);if(isNaN(slideOpts.speed))
slideOpts.speed=$.fx.speeds[slideOpts.speed]||$.fx.speeds._default;if(!slideOpts.sync)
slideOpts.speed=slideOpts.speed/2;slide.addClass(opts.slideClass);},updateView:function(isAfter,isDuring){var opts=this.opts();if(!opts._initialized)
return;var slideOpts=opts.API.getSlideOpts();var currSlide=opts.slides[opts.currSlide];if(!isAfter&&isDuring!==true){opts.API.trigger('cycletwo-update-view-before',[opts,slideOpts,currSlide]);if(opts.updateView<0)
return;}
if(opts.slideActiveClass){opts.slides.removeClass(opts.slideActiveClass).eq(opts.currSlide).addClass(opts.slideActiveClass);}
if(isAfter&&opts.hideNonActive)
opts.slides.filter(':not(.'+opts.slideActiveClass+')').hide();opts.API.trigger('cycletwo-update-view',[opts,slideOpts,currSlide,isAfter]);if(isAfter)
opts.API.trigger('cycletwo-update-view-after',[opts,slideOpts,currSlide]);},getComponent:function(name){var opts=this.opts();var selector=opts[name];if(typeof selector==='string'){return(/^\s*[\>|\+|~]/).test(selector)?opts.container.find(selector):$(selector);}
if(selector.jquery)
return selector;return $(selector);},stackSlides:function(curr,next,fwd){var opts=this.opts();if(!curr){curr=opts.slides[opts.currSlide];next=opts.slides[opts.nextSlide];fwd=!opts.reverse;}
$(curr).css('zIndex',opts.maxZ);var i;var z=opts.maxZ-2;var len=opts.slideCount;if(fwd){for(i=opts.currSlide+1;i<len;i++)
$(opts.slides[i]).css('zIndex',z--);for(i=0;i<opts.currSlide;i++)
$(opts.slides[i]).css('zIndex',z--);}
else{for(i=opts.currSlide-1;i>=0;i--)
$(opts.slides[i]).css('zIndex',z--);for(i=len-1;i>opts.currSlide;i--)
$(opts.slides[i]).css('zIndex',z--);}
$(next).css('zIndex',opts.maxZ-1);},getSlideIndex:function(el){return this.opts().slides.index(el);}};$.fn.cycletwo.log=function log(){if(window.console&&console.log)
console.log('[cycletwo] '+Array.prototype.join.call(arguments,' '));};$.fn.cycletwo.version=function(){return'cycletwo: '+version;};function lowerCase(s){return(s||'').toLowerCase();}
$.fn.cycletwo.transitions={custom:{},none:{before:function(opts,curr,next,fwd){opts.API.stackSlides(next,curr,fwd);opts.cssBefore={opacity:1,display:'block'};}},fade:{before:function(opts,curr,next,fwd){var css=opts.API.getSlideOpts(opts.nextSlide).slideCss||{};opts.API.stackSlides(curr,next,fwd);opts.cssBefore=$.extend(css,{opacity:0,display:'block'});opts.animIn={opacity:1};opts.animOut={opacity:0};}},fadeout:{before:function(opts,curr,next,fwd){var css=opts.API.getSlideOpts(opts.nextSlide).slideCss||{};opts.API.stackSlides(curr,next,fwd);opts.cssBefore=$.extend(css,{opacity:1,display:'block'});opts.animOut={opacity:0};}},scrollHorz:{before:function(opts,curr,next,fwd){opts.API.stackSlides(curr,next,fwd);var w=opts.container.css('overflow','hidden').width();opts.cssBefore={left:fwd?w:-w,top:0,opacity:1,display:'block'};opts.cssAfter={zIndex:opts._maxZ-2,left:0};opts.animIn={left:0};opts.animOut={left:fwd?-w:w};}}};$.fn.cycletwo.defaults={allowWrap:true,autoSelector:'.cycletwo-slideshow[data-cycletwo-auto-init!=false]',delay:0,easing:null,fx:'fade',hideNonActive:true,loop:0,manualFx:undefined,manualSpeed:undefined,manualTrump:true,maxZ:100,pauseOnHover:false,reverse:false,slideActiveClass:'cycletwo-slide-active',slideClass:'cycletwo-slide',slideCss:{position:'absolute',top:0,left:0},slides:'> img',speed:500,startingSlide:0,sync:true,timeout:4000,updateView:-1};$(document).ready(function(){$($.fn.cycletwo.defaults.autoSelector).cycletwo();});})(jQuery);
/*! cycletwo autoheight plugin; Copyright (c) M.Alsup, 2012; version: 20130304 */
(function($){"use strict";$.extend($.fn.cycletwo.defaults,{autoHeight:0});$(document).on('cycletwo-initialized',function(e,opts){var autoHeight=opts.autoHeight;var t=$.type(autoHeight);var resizeThrottle=null;var ratio;if(t!=='string'&&t!=='number')
return;opts.container.on('cycletwo-slide-added cycletwo-slide-removed',initAutoHeight);opts.container.on('cycletwo-destroyed',onDestroy);if(autoHeight=='container'){opts.container.on('cycletwo-before',onBefore);}
else if(t==='string'&&/\d+\:\d+/.test(autoHeight)){ratio=autoHeight.match(/(\d+)\:(\d+)/);ratio=ratio[1]/ratio[2];opts._autoHeightRatio=ratio;}
if(t!=='number'){opts._autoHeightOnResize=function(){clearTimeout(resizeThrottle);resizeThrottle=setTimeout(onResize,50);};$(window).on('resize orientationchange',opts._autoHeightOnResize);}
setTimeout(onResize,30);function onResize(){initAutoHeight(e,opts);}});function initAutoHeight(e,opts){var clone,height,sentinelIndex;var autoHeight=opts.autoHeight;if(autoHeight=='container'){height=$(opts.slides[opts.currSlide]).outerHeight();opts.container.height(height);}
else if(opts._autoHeightRatio){opts.container.height(opts.container.width()/opts._autoHeightRatio);}
else if(autoHeight==='calc'||($.type(autoHeight)=='number'&&autoHeight>=0)){if(autoHeight==='calc')
sentinelIndex=calcSentinelIndex(e,opts);else if(autoHeight>=opts.slides.length)
sentinelIndex=0;else
sentinelIndex=autoHeight;if(sentinelIndex==opts._sentinelIndex)
return;opts._sentinelIndex=sentinelIndex;if(opts._sentinel)
opts._sentinel.remove();clone=$(opts.slides[sentinelIndex].cloneNode(true));clone.removeAttr('id name rel').find('[id],[name],[rel]').removeAttr('id name rel');clone.css({position:'static',visibility:'hidden',display:'block'}).prependTo(opts.container).addClass('cycletwo-sentinel cycletwo-slide').removeClass('cycletwo-slide-active');clone.find('*').css('visibility','hidden');opts._sentinel=clone;}}
function calcSentinelIndex(e,opts){var index=0,max=-1;opts.slides.each(function(i){var h=$(this).height();if(h>max){max=h;index=i;}});return index;}
function onBefore(e,opts,outgoing,incoming,forward){var h=$(incoming).outerHeight();var duration=opts.sync?opts.speed/2:opts.speed;opts.container.animate({height:h},duration);}
function onDestroy(e,opts){if(opts._autoHeightOnResize){$(window).off('resize orientationchange',opts._autoHeightOnResize);opts._autoHeightOnResize=null;}
opts.container.off('cycletwo-slide-added cycletwo-slide-removed',initAutoHeight);opts.container.off('cycletwo-destroyed',onDestroy);opts.container.off('cycletwo-before',onBefore);if(opts._sentinel){opts._sentinel.remove();opts._sentinel=null;}}})(jQuery);
/*! caption plugin for cycletwo;  version: 20130306 */
(function($){"use strict";$.extend($.fn.cycletwo.defaults,{caption:'> .cycletwo-caption',captionTemplate:'{{slideNum}} / {{slideCount}}',overlay:'> .cycletwo-overlay',overlayTemplate:'<div>{{title}}</div><div>{{desc}}</div>',captionModule:'caption'});$(document).on('cycletwo-update-view',function(e,opts,slideOpts,currSlide){if(opts.captionModule!=='caption')
return;var el;$.each(['caption','overlay'],function(){var name=this;var template=slideOpts[name+'Template'];var el=opts.API.getComponent(name);if(el.length&&template){el.html(opts.API.tmpl(template,slideOpts,opts,currSlide));el.show();}
else{el.hide();}});});$(document).on('cycletwo-destroyed',function(e,opts){var el;$.each(['caption','overlay'],function(){var name=this,template=opts[name+'Template'];if(opts[name]&&template){el=opts.API.getComponent('caption');el.empty();}});});})(jQuery);
/*! command plugin for cycletwo;  version: 20130707 */
(function($){"use strict";var c2=$.fn.cycletwo;$.fn.cycletwo=function(options){var cmd,cmdFn,opts;var args=$.makeArray(arguments);if($.type(options)=='number'){return this.cycletwo('goto',options);}
if($.type(options)=='string'){return this.each(function(){var cmdArgs;cmd=options;opts=$(this).data('cycletwo.opts');if(opts===undefined){c2.log('slideshow must be initialized before sending commands; "'+cmd+'" ignored');return;}
else{cmd=cmd=='goto'?'jump':cmd;cmdFn=opts.API[cmd];if($.isFunction(cmdFn)){cmdArgs=$.makeArray(args);cmdArgs.shift();return cmdFn.apply(opts.API,cmdArgs);}
else{c2.log('unknown command: ',cmd);}}});}
else{return c2.apply(this,arguments);}};$.extend($.fn.cycletwo,c2);$.extend(c2.API,{next:function(){var opts=this.opts();if(opts.busy&&!opts.manualTrump)
return;var count=opts.reverse?-1:1;if(opts.allowWrap===false&&(opts.currSlide+count)>=opts.slideCount)
return;opts.API.advanceSlide(count);opts.API.trigger('cycletwo-next',[opts]).log('cycletwo-next');},prev:function(){var opts=this.opts();if(opts.busy&&!opts.manualTrump)
return;var count=opts.reverse?1:-1;if(opts.allowWrap===false&&(opts.currSlide+count)<0)
return;opts.API.advanceSlide(count);opts.API.trigger('cycletwo-prev',[opts]).log('cycletwo-prev');},destroy:function(){this.stop();var opts=this.opts();var clean=$.isFunction($._data)?$._data:$.noop;clearTimeout(opts.timeoutId);opts.timeoutId=0;opts.API.stop();opts.API.trigger('cycletwo-destroyed',[opts]).log('cycletwo-destroyed');opts.container.removeData();clean(opts.container[0],'parsedAttrs',false);if(!opts.retainStylesOnDestroy){opts.container.removeAttr('style');opts.slides.removeAttr('style');opts.slides.removeClass(opts.slideActiveClass);}
opts.slides.each(function(){$(this).removeData();clean(this,'parsedAttrs',false);});},jump:function(index){var fwd;var opts=this.opts();if(opts.busy&&!opts.manualTrump)
return;var num=parseInt(index,10);if(isNaN(num)||num<0||num>=opts.slides.length){opts.API.log('goto: invalid slide index: '+num);return;}
if(num==opts.currSlide){opts.API.log('goto: skipping, already on slide',num);return;}
opts.nextSlide=num;clearTimeout(opts.timeoutId);opts.timeoutId=0;opts.API.log('goto: ',num,' (zero-index)');fwd=opts.currSlide<opts.nextSlide;opts.API.prepareTx(true,fwd);},stop:function(){var opts=this.opts();var pauseObj=opts.container;clearTimeout(opts.timeoutId);opts.timeoutId=0;opts.API.stopTransition();if(opts.pauseOnHover){if(opts.pauseOnHover!==true)
pauseObj=$(opts.pauseOnHover);pauseObj.off('mouseenter mouseleave');}
opts.API.trigger('cycletwo-stopped',[opts]).log('cycletwo-stopped');},reinit:function(){var opts=this.opts();opts.API.destroy();opts.container.cycletwo();},remove:function(index){var opts=this.opts();var slide,slideToRemove,slides=[],slideNum=1;for(var i=0;i<opts.slides.length;i++){slide=opts.slides[i];if(i==index){slideToRemove=slide;}
else{slides.push(slide);$(slide).data('cycletwo.opts').slideNum=slideNum;slideNum++;}}
if(slideToRemove){opts.slides=$(slides);opts.slideCount--;$(slideToRemove).remove();if(index==opts.currSlide)
opts.API.advanceSlide(1);else if(index<opts.currSlide)
opts.currSlide--;else
opts.currSlide++;opts.API.trigger('cycletwo-slide-removed',[opts,index,slideToRemove]).log('cycletwo-slide-removed');opts.API.updateView();}}});$(document).on('click.cycletwo','[data-cycle-cmd]',function(e){e.preventDefault();var el=$(this);var command=el.data('cycletwo-cmd');var context=el.data('cycletwo-context')||'.cycletwo-slideshow';$(context).cycletwo(command,el.data('cycletwo-arg'));});})(jQuery);
/*! hash plugin for cycletwo;  version: 20130905 */
(function($){"use strict";$(document).on('cycletwo-pre-initialize',function(e,opts){onHashChange(opts,true);opts._onHashChange=function(){onHashChange(opts,false);};$(window).on('hashchange',opts._onHashChange);});$(document).on('cycletwo-update-view',function(e,opts,slideOpts){if(slideOpts.hash&&('#'+slideOpts.hash)!=window.location.hash){opts._hashFence=true;window.location.hash=slideOpts.hash;}});$(document).on('cycletwo-destroyed',function(e,opts){if(opts._onHashChange){$(window).off('hashchange',opts._onHashChange);}});function onHashChange(opts,setStartingSlide){var hash;if(opts._hashFence){opts._hashFence=false;return;}
hash=window.location.hash.substring(1);opts.slides.each(function(i){if($(this).data('cycletwo-hash')==hash){if(setStartingSlide===true){opts.startingSlide=i;}
else{var fwd=opts.currSlide<i;opts.nextSlide=i;opts.API.prepareTx(true,fwd);}
return false;}});}})(jQuery);
/*! loader plugin for cycletwo;  version: 20130307 */
(function($){"use strict";$.extend($.fn.cycletwo.defaults,{loader:false});$(document).on('cycletwo-bootstrap',function(e,opts){var addFn;if(!opts.loader)
return;addFn=opts.API.add;opts.API.add=add;function add(slides,prepend){var slideArr=[];if($.type(slides)=='string')
slides=$.trim(slides);else if($.type(slides)==='array'){for(var i=0;i<slides.length;i++)
slides[i]=$(slides[i])[0];}
slides=$(slides);var slideCount=slides.length;if(!slideCount)
return;slides.hide().appendTo('body').each(function(i){var count=0;var slide=$(this);var images=slide.is('img')?slide:slide.find('img');slide.data('index',i);images=images.filter(':not(.cycletwo-loader-ignore)').filter(':not([src=""])');if(!images.length){--slideCount;slideArr.push(slide);return;}
count=images.length;images.each(function(){if(this.complete){imageLoaded();}
else{$(this).load(function(){imageLoaded();}).error(function(){if(--count===0){opts.API.log('slide skipped; img not loaded:',this.src);if(--slideCount===0&&opts.loader=='wait'){addFn.apply(opts.API,[slideArr,prepend]);}}});}});function imageLoaded(){if(--count===0){--slideCount;addSlide(slide);}}});if(slideCount)
opts.container.addClass('cycletwo-loading');function addSlide(slide){var curr;if(opts.loader=='wait'){slideArr.push(slide);if(slideCount===0){slideArr.sort(sorter);addFn.apply(opts.API,[slideArr,prepend]);opts.container.removeClass('cycletwo-loading');}}
else{curr=$(opts.slides[opts.currSlide]);addFn.apply(opts.API,[slide,prepend]);curr.show();opts.container.removeClass('cycletwo-loading');}}
function sorter(a,b){return a.data('index')-b.data('index');}}});})(jQuery);
/*! pager plugin for cycletwo;  version: 20130525 */
(function($){"use strict";$.extend($.fn.cycletwo.defaults,{pager:'> .cycletwo-pager',pagerActiveClass:'cycletwo-pager-active',pagerEvent:'click.cycletwo',pagerTemplate:'<span>&bull;</span>'});$(document).on('cycletwo-bootstrap',function(e,opts,API){API.buildPagerLink=buildPagerLink;});$(document).on('cycletwo-slide-added',function(e,opts,slideOpts,slideAdded){if(opts.pager){opts.API.buildPagerLink(opts,slideOpts,slideAdded);opts.API.page=page;}});$(document).on('cycletwo-slide-removed',function(e,opts,index,slideRemoved){if(opts.pager){var pagers=opts.API.getComponent('pager');pagers.each(function(){var pager=$(this);$(pager.children()[index]).remove();});}});$(document).on('cycletwo-update-view',function(e,opts,slideOpts){var pagers;if(opts.pager){pagers=opts.API.getComponent('pager');pagers.each(function(){$(this).children().removeClass(opts.pagerActiveClass).eq(opts.currSlide).addClass(opts.pagerActiveClass);});}});$(document).on('cycletwo-destroyed',function(e,opts){var pager=opts.API.getComponent('pager');if(pager){pager.children().off(opts.pagerEvent);if(opts.pagerTemplate)
pager.empty();}});function buildPagerLink(opts,slideOpts,slide){var pagerLink;var pagers=opts.API.getComponent('pager');pagers.each(function(){var pager=$(this);if(slideOpts.pagerTemplate){var markup=opts.API.tmpl(slideOpts.pagerTemplate,slideOpts,opts,slide[0]);pagerLink=$(markup).appendTo(pager);}
else{pagerLink=pager.children().eq(opts.slideCount-1);}
pagerLink.on(opts.pagerEvent,function(e){e.preventDefault();opts.API.page(pager,e.currentTarget);});});}
function page(pager,target){var opts=this.opts();if(opts.busy&&!opts.manualTrump)
return;var index=pager.children().index(target);var nextSlide=index;var fwd=opts.currSlide<nextSlide;if(opts.currSlide==nextSlide){return;}
opts.nextSlide=nextSlide;opts.API.prepareTx(true,fwd);opts.API.trigger('cycletwo-pager-activated',[opts,pager,target]);}})(jQuery);
/*! prevnext plugin for cycletwo;  version: 20130709 */
(function($){"use strict";$.extend($.fn.cycletwo.defaults,{next:'> .cycletwo-next',nextEvent:'click.cycletwo',disabledClass:'disabled',prev:'> .cycletwo-prev',prevEvent:'click.cycletwo',swipe:false});$(document).on('cycletwo-initialized',function(e,opts){opts.API.getComponent('next').on(opts.nextEvent,function(e){e.preventDefault();opts.API.next();});opts.API.getComponent('prev').on(opts.prevEvent,function(e){e.preventDefault();opts.API.prev();});if(opts.swipe){var nextEvent=opts.swipeVert?'swipeUp.cycletwo':'swipeLeft.cycletwo swipeleft.cycletwo';var prevEvent=opts.swipeVert?'swipeDown.cycletwo':'swipeRight.cycletwo swiperight.cycletwo';opts.container.on(nextEvent,function(e){opts.API.next();});opts.container.on(prevEvent,function(){opts.API.prev();});}});$(document).on('cycletwo-update-view',function(e,opts,slideOpts,currSlide){if(opts.allowWrap)
return;var cls=opts.disabledClass;var next=opts.API.getComponent('next');var prev=opts.API.getComponent('prev');var prevBoundry=opts._prevBoundry||0;var nextBoundry=(opts._nextBoundry!==undefined)?opts._nextBoundry:opts.slideCount-1;if(opts.currSlide==nextBoundry)
next.addClass(cls).prop('disabled',true);else
next.removeClass(cls).prop('disabled',false);if(opts.currSlide===prevBoundry)
prev.addClass(cls).prop('disabled',true);else
prev.removeClass(cls).prop('disabled',false);});$(document).on('cycletwo-destroyed',function(e,opts){opts.API.getComponent('prev').off(opts.nextEvent);opts.API.getComponent('next').off(opts.prevEvent);opts.container.off('swipeleft.cycletwo swiperight.cycletwo swipeLeft.cycletwo swipeRight.cycletwo swipeUp.cycletwo swipeDown.cycletwo');});})(jQuery);
/*! progressive loader plugin for cycletwo;  version: 20130315 */
(function($){"use strict";$.extend($.fn.cycletwo.defaults,{progressive:false});$(document).on('cycletwo-pre-initialize',function(e,opts){if(!opts.progressive)
return;var API=opts.API;var nextFn=API.next;var prevFn=API.prev;var prepareTxFn=API.prepareTx;var type=$.type(opts.progressive);var slides,scriptEl;if(type=='array'){slides=opts.progressive;}
else if($.isFunction(opts.progressive)){slides=opts.progressive(opts);}
else if(type=='string'){scriptEl=$(opts.progressive);slides=$.trim(scriptEl.html());if(!slides)
return;if(/^(\[)/.test(slides)){try{slides=$.parseJSON(slides);}
catch(err){API.log('error parsing progressive slides',err);return;}}
else{slides=slides.split(new RegExp(scriptEl.data('cycletwo-split')||'\n'));if(!slides[slides.length-1])
slides.pop();}}
if(prepareTxFn){API.prepareTx=function(manual,fwd){var index,slide;if(manual||slides.length===0){prepareTxFn.apply(opts.API,[manual,fwd]);return;}
if(fwd&&opts.currSlide==(opts.slideCount-1)){slide=slides[0];slides=slides.slice(1);opts.container.one('cycletwo-slide-added',function(e,opts){setTimeout(function(){opts.API.advanceSlide(1);},50);});opts.API.add(slide);}
else if(!fwd&&opts.currSlide===0){index=slides.length-1;slide=slides[index];slides=slides.slice(0,index);opts.container.one('cycletwo-slide-added',function(e,opts){setTimeout(function(){opts.currSlide=1;opts.API.advanceSlide(-1);},50);});opts.API.add(slide,true);}
else{prepareTxFn.apply(opts.API,[manual,fwd]);}};}
if(nextFn){API.next=function(){var opts=this.opts();if(slides.length&&opts.currSlide==(opts.slideCount-1)){var slide=slides[0];slides=slides.slice(1);opts.container.one('cycletwo-slide-added',function(e,opts){nextFn.apply(opts.API);opts.container.removeClass('cycletwo-loading');});opts.container.addClass('cycletwo-loading');opts.API.add(slide);}
else{nextFn.apply(opts.API);}};}
if(prevFn){API.prev=function(){var opts=this.opts();if(slides.length&&opts.currSlide===0){var index=slides.length-1;var slide=slides[index];slides=slides.slice(0,index);opts.container.one('cycletwo-slide-added',function(e,opts){opts.currSlide=1;opts.API.advanceSlide(-1);opts.container.removeClass('cycletwo-loading');});opts.container.addClass('cycletwo-loading');opts.API.add(slide,true);}
else{prevFn.apply(opts.API);}};}});})(jQuery);
/*! tmpl plugin for cycletwo;  version: 20121227 */
(function($){"use strict";$.extend($.fn.cycletwo.defaults,{tmplRegex:'{{((.)?.*?)}}'});$.extend($.fn.cycletwo.API,{tmpl:function(str,opts){var regex=new RegExp(opts.tmplRegex||$.fn.cycletwo.defaults.tmplRegex,'g');var args=$.makeArray(arguments);args.shift();return str.replace(regex,function(_,str){var i,j,obj,prop,names=str.split('.');for(i=0;i<args.length;i++){obj=args[i];if(!obj)
continue;if(names.length>1){prop=obj;for(j=0;j<names.length;j++){obj=prop;prop=prop[names[j]]||str;}}else{prop=obj[str];}
if($.isFunction(prop))
return prop.apply(obj,args);if(prop!==undefined&&prop!==null&&prop!=str)
return prop;}
return str;});}});})(jQuery);