(function(n){var t={},r={mode:"horizontal",slideSelector:"",infiniteLoop:!0,hideControlOnEnd:!1,speed:500,easing:null,slideMargin:0,startSlide:0,randomStart:!1,captions:!1,ticker:!1,tickerHover:!1,adaptiveHeight:!1,adaptiveHeightSpeed:500,video:!1,useCSS:!0,preloadImages:"visible",responsive:!0,slideZIndex:50,wrapperClass:"bx-wrapper",touchEnabled:!0,swipeThreshold:50,oneToOneTouch:!0,preventDefaultSwipeX:!0,preventDefaultSwipeY:!1,pager:!0,pagerType:"full",pagerShortSeparator:" / ",pagerSelector:null,buildPager:null,pagerCustom:null,controls:!0,nextText:"Next",prevText:"Prev",nextSelector:null,prevSelector:null,autoControls:!1,startText:"",stopText:"",autoControlsCombine:!1,autoControlsSelector:null,auto:!1,pause:4e3,autoStart:!0,autoDirection:"next",autoHover:!1,autoDelay:0,autoSlideForOnePage:!1,minSlides:1,maxSlides:1,moveSlides:0,slideWidth:0,onSliderLoad:function(){},onSlideBefore:function(){},onSlideAfter:function(){},onSlideNext:function(){},onSlidePrev:function(){},onSliderResize:function(){}};n.fn.bxSlider=function(u){var f,e;if(this.length==0)return this;if(this.length>1)return this.each(function(){n(this).bxSlider(u)}),this;f={};e=this;t.el=this;var w=n(window).width(),b=n(window).height(),k=function(){f.settings=n.extend({},r,u);f.settings.slideWidth=parseInt(f.settings.slideWidth);f.children=e.children(f.settings.slideSelector);f.children.length<f.settings.minSlides&&(f.settings.minSlides=f.children.length);f.children.length<f.settings.maxSlides&&(f.settings.maxSlides=f.children.length);f.settings.randomStart&&(f.settings.startSlide=Math.floor(Math.random()*f.children.length));f.active={index:f.settings.startSlide};f.carousel=f.settings.minSlides>1||f.settings.maxSlides>1;f.carousel&&(f.settings.preloadImages="all");f.minThreshold=f.settings.minSlides*f.settings.slideWidth+(f.settings.minSlides-1)*f.settings.slideMargin;f.maxThreshold=f.settings.maxSlides*f.settings.slideWidth+(f.settings.maxSlides-1)*f.settings.slideMargin;f.working=!1;f.controls={};f.interval=null;f.animProp=f.settings.mode=="vertical"?"top":"left";f.usingCSS=f.settings.useCSS&&f.settings.mode!="fade"&&function(){var i=document.createElement("div"),n=["WebkitPerspective","MozPerspective","OPerspective","msPerspective"];for(var t in n)if(i.style[n[t]]!==undefined)return f.cssPrefix=n[t].replace("Perspective","").toLowerCase(),f.animProp="-"+f.cssPrefix+"-transform",!0;return!1}();f.settings.mode=="vertical"&&(f.settings.maxSlides=f.settings.minSlides);e.data("origStyle",e.attr("style"));e.children(f.settings.slideSelector).each(function(){n(this).data("origStyle",n(this).attr("style"))});ft()},ft=function(){var i,t;e.wrap('<div class="'+f.settings.wrapperClass+'"><div class="bx-viewport"><\/div><\/div>');f.viewport=e.parent();f.loader=n('<div class="bx-loading" />');f.viewport.prepend(f.loader);e.css({width:f.settings.mode=="horizontal"?f.children.length*100+215+"%":"auto",position:"relative"});f.usingCSS&&f.settings.easing?e.css("-"+f.cssPrefix+"-transition-timing-function",f.settings.easing):f.settings.easing||(f.settings.easing="swing");i=h();f.viewport.css({width:"100%",overflow:"hidden",position:"relative"});f.viewport.parent().css({maxWidth:st()});f.settings.pager||f.viewport.parent().css({margin:"0 auto 0px"});f.children.css({float:f.settings.mode=="horizontal"?"left":"none",listStyle:"none",position:"relative"});f.children.css("width",d());f.settings.mode=="horizontal"&&f.settings.slideMargin>0&&f.children.css("marginRight",f.settings.slideMargin);f.settings.mode=="vertical"&&f.settings.slideMargin>0&&f.children.css("marginBottom",f.settings.slideMargin);f.settings.mode=="fade"&&(f.children.css({position:"absolute",zIndex:0,display:"none"}),f.children.eq(f.settings.startSlide).css({zIndex:f.settings.slideZIndex,display:"block"}));f.controls.el=n('<div class="bx-controls" />');f.settings.captions&&vt();f.active.last=f.settings.startSlide==o()-1;f.settings.video&&e.fitVids();t=f.children.eq(f.settings.startSlide);f.settings.preloadImages=="all"&&(t=f.children);f.settings.ticker?f.settings.pager=!1:(f.settings.pager&&ht(),f.settings.controls&&ct(),(f.settings.controls||f.settings.autoControls||f.settings.pager)&&f.viewport.after(f.controls.el));et(t,ot)},et=function(t,i){var r=t.find('img:not([src=""]), iframe').length,u;if(r==0){i();return}u=0;t.find('img:not([src=""]), iframe').each(function(){n(this).one("load",function(){++u==r&&i()}).each(function(){this.complete&&n(this).trigger("load")})})},ot=function(){if(f.settings.infiniteLoop&&f.settings.mode!="fade"&&!f.settings.ticker){var t=f.settings.mode=="vertical"?f.settings.minSlides:f.settings.maxSlides,i=f.children.slice(0,t).clone().addClass("bx-clone"),r=f.children.slice(-t).clone().addClass("bx-clone");i.find("div:first").removeAttr("id");r.find("div:first").removeAttr("id");e.append(i).prepend(r)}f.loader.remove();g();f.settings.mode=="vertical"&&(f.settings.adaptiveHeight=!0);f.viewport.height(l());e.redrawSlider();f.settings.onSliderLoad(f.active.index);f.initialized=!0;f.settings.responsive&&n(window).bind("resize",ut);f.settings.auto&&f.settings.autoStart&&(o()>1||f.settings.autoSlideForOnePage)&&dt();f.settings.ticker&&gt();f.settings.pager&&v(f.settings.startSlide);f.settings.controls&&tt();f.settings.touchEnabled&&!f.settings.ticker&&ni()},l=function(){var r=0,t=n(),u;if(f.settings.mode=="vertical"||f.settings.adaptiveHeight)if(f.carousel)for(u=f.settings.moveSlides==1?f.active.index:f.active.index*c(),t=f.children.eq(u),i=1;i<=f.settings.maxSlides-1;i++)t=u+i>=f.children.length?t.add(f.children.eq(i-1)):t.add(f.children.eq(u+i));else t=f.children.eq(f.active.index);else t=f.children;return f.settings.mode=="vertical"?(t.each(function(){r+=n(this).outerHeight()}),f.settings.slideMargin>0&&(r+=f.settings.slideMargin*(f.settings.minSlides-1))):r=Math.max.apply(Math,t.map(function(){return n(this).outerHeight(!1)}).get()),f.viewport.css("box-sizing")=="border-box"?r+=parseFloat(f.viewport.css("padding-top"))+parseFloat(f.viewport.css("padding-bottom"))+parseFloat(f.viewport.css("border-top-width"))+parseFloat(f.viewport.css("border-bottom-width")):f.viewport.css("box-sizing")=="padding-box"&&(r+=parseFloat(f.viewport.css("padding-top"))+parseFloat(f.viewport.css("padding-bottom"))),r},st=function(){var n="100%";return f.settings.slideWidth>0&&(n=f.settings.mode=="horizontal"?f.settings.maxSlides*f.settings.slideWidth+(f.settings.maxSlides-1)*f.settings.slideMargin:f.settings.slideWidth),n},d=function(){var t=f.settings.slideWidth,n=f.viewport.width();return f.settings.slideWidth==0||f.settings.slideWidth>n&&!f.carousel||f.settings.mode=="vertical"?t=n:f.settings.maxSlides>1&&f.settings.mode=="horizontal"&&(n>f.maxThreshold||n<f.minThreshold&&(t=(n-f.settings.slideMargin*(f.settings.minSlides-1))/f.settings.minSlides)),t},h=function(){var n=1,t;return f.settings.mode=="horizontal"&&f.settings.slideWidth>0?f.viewport.width()<f.minThreshold?n=f.settings.minSlides:f.viewport.width()>f.maxThreshold?n=f.settings.maxSlides:(t=f.children.first().width()+f.settings.slideMargin,n=Math.floor((f.viewport.width()+f.settings.slideMargin)/t)):f.settings.mode=="vertical"&&(n=f.settings.minSlides),n},o=function(){var n=0,t,i;if(f.settings.moveSlides>0)if(f.settings.infiniteLoop)n=Math.ceil(f.children.length/c());else for(t=0,i=0;t<f.children.length;)++n,t=i+h(),i+=f.settings.moveSlides<=h()?f.settings.moveSlides:h();else n=Math.ceil(f.children.length/h());return n},c=function(){return f.settings.moveSlides>0&&f.settings.moveSlides<=h()?f.settings.moveSlides:h()},g=function(){var t,i,n;f.children.length>f.settings.maxSlides&&f.active.last&&!f.settings.infiniteLoop?f.settings.mode=="horizontal"?(t=f.children.last(),n=t.position(),s(-(n.left-(f.viewport.width()-t.outerWidth())),"reset",0)):f.settings.mode=="vertical"&&(i=f.children.length-f.settings.minSlides,n=f.children.eq(i).position(),s(-n.top,"reset",0)):(n=f.children.eq(f.active.index*c()).position(),f.active.index==o()-1&&(f.active.last=!0),n!=undefined&&(f.settings.mode=="horizontal"?s(-n.left,"reset",0):f.settings.mode=="vertical"&&s(-n.top,"reset",0)))},s=function(n,t,i,r){var u,o;f.usingCSS?(u=f.settings.mode=="vertical"?"translate3d(0, "+n+"px, 0)":"translate3d("+n+"px, 0, 0)",e.css("-"+f.cssPrefix+"-transition-duration",i/1e3+"s"),t=="slide"?(e.css(f.animProp,u),e.bind("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd",function(){e.unbind("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd");y()})):t=="reset"?e.css(f.animProp,u):t=="ticker"&&(e.css("-"+f.cssPrefix+"-transition-timing-function","linear"),e.css(f.animProp,u),e.bind("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd",function(){e.unbind("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd");s(r.resetValue,"reset",0);a()}))):(o={},o[f.animProp]=n,t=="slide"?e.animate(o,i,f.settings.easing,function(){y()}):t=="reset"?e.css(f.animProp,n):t=="ticker"&&e.animate(o,speed,"linear",function(){s(r.resetValue,"reset",0);a()}))},nt=function(){for(var i,r="",u=o(),t=0;t<u;t++)i="",f.settings.buildPager&&n.isFunction(f.settings.buildPager)?(i=f.settings.buildPager(t),f.pagerEl.addClass("bx-custom-pager")):(i=t+1,f.pagerEl.addClass("bx-default-pager")),r+='<div class="bx-pager-item"><a href="" aria-label="'+f.settings.slideLinkAria+'" data-slide-index="'+t+'" class="bx-pager-link">'+i+"<\/a><\/div>";f.pagerEl.html(r);at()},ht=function(){f.settings.pagerCustom?f.pagerEl=n(f.settings.pagerCustom):(f.pagerEl=n('<div class="bx-pager" />'),f.settings.pagerSelector?n(f.settings.pagerSelector).html(f.pagerEl):f.controls.el.addClass("bx-has-pager").append(f.pagerEl),nt());f.pagerEl.on("click",".bx-pager-item a",kt)},ct=function(){f.controls.next=n('<a class="bx-next" aria-label="'+f.settings.nextAriaText+'" href="">'+f.settings.nextText+"<\/a>");f.controls.prev=n('<a class="bx-prev" aria-label="'+f.settings.prevAriaText+'"  href="">'+f.settings.prevText+"<\/a>");f.controls.next.bind("click",yt);f.controls.prev.bind("click",pt);f.settings.nextSelector&&n(f.settings.nextSelector).append(f.controls.next);f.settings.prevSelector&&n(f.settings.prevSelector).append(f.controls.prev);f.settings.nextSelector||f.settings.prevSelector||(f.controls.directionEl=n('<div class="bx-controls-direction" />'),f.controls.directionEl.append(f.controls.prev).append(f.controls.next),f.controls.el.addClass("bx-has-controls-direction").append(f.controls.directionEl))},lt=function(t){t.preventDefault();t.stopPropagation();n(this).find("span").click()},at=function(){f.controls.start=n('<div class="bx-controls-auto-item"><a aria-label="'+f.settings.startAriaText+'" href><span class="bx-start play" >'+f.settings.startText+"<\/span><\/a><\/div>");f.controls.stop=n('<div class="bx-controls-auto-item"><a  aria-label="'+f.settings.stopAriaText+'" href><span class="bx-stop pause" >'+f.settings.stopText+"<\/span><\/a><\/div>");f.controls.autoEl=n('<div class="bx-controls-auto" />');f.pagerEl.on("click",".bx-start",wt);f.pagerEl.on("click",".bx-stop",bt);f.pagerEl.on("click",".bx-controls-auto-item a",lt);f.settings.autoControlsCombine?f.controls.autoEl.append(f.controls.start):f.pagerEl.append(f.controls.start).append(f.controls.stop);f.settings.autoControlsSelector&&n(f.settings.autoControlsSelector).html(f.controls.autoEl);p(f.settings.autoStart?"stop":"start")},vt=function(){f.children.each(function(){var t=n(this).find("img:first").attr("title");t!=undefined&&(""+t).length&&n(this).append('<div class="bx-caption"><span>'+t+"<\/span><\/div>")})},yt=function(n){f.settings.auto&&e.stopAuto();e.goToNextSlide();n.preventDefault()},pt=function(n){f.settings.auto&&e.stopAuto();e.goToPrevSlide();n.preventDefault()},wt=function(n){e.startAuto();n.preventDefault();n.stopPropagation()},bt=function(n){e.stopAuto();n.preventDefault();n.stopPropagation()},kt=function(t){var i,r;f.settings.auto&&e.stopAuto();i=n(t.currentTarget);i.attr("data-slide-index")!==undefined&&(r=parseInt(i.attr("data-slide-index")),r!=f.active.index&&e.goToSlide(r),t.preventDefault())},v=function(t){var i=f.children.length;if(f.settings.pagerType=="short"){f.settings.maxSlides>1&&(i=Math.ceil(f.children.length/f.settings.maxSlides));f.pagerEl.html(t+1+f.settings.pagerShortSeparator+i);return}f.pagerEl.find("a").removeClass("active");f.pagerEl.each(function(i,r){n(r).find("a").eq(t).addClass("active")})},y=function(){if(f.settings.infiniteLoop){var n="";f.active.index==0?n=f.children.eq(0).position():f.active.index==o()-1&&f.carousel?n=f.children.eq((o()-1)*c()).position():f.active.index==f.children.length-1&&(n=f.children.eq(f.children.length-1).position());n&&(f.settings.mode=="horizontal"?s(-n.left,"reset",0):f.settings.mode=="vertical"&&s(-n.top,"reset",0))}f.working=!1;f.settings.onSlideAfter(f.children.eq(f.active.index),f.oldIndex,f.active.index)},p=function(n){if(f.settings.autoControlsCombine)f.controls.autoEl.html(f.controls[n]);else{if(!f.pagerEl)return;f.pagerEl.find(".bx-controls-auto-item span").removeClass("active-control").css("display","").parent().removeAttr("tabindex");f.pagerEl.find(".bx-controls-auto-item span:not(.bx-"+n+")").addClass("active-control").css("display","none").parent().attr("tabindex","-1")}},tt=function(){o()==1?(f.controls.prev.addClass("disabled"),f.controls.next.addClass("disabled")):!f.settings.infiniteLoop&&f.settings.hideControlOnEnd&&(f.active.index==0?(f.controls.prev.addClass("disabled"),f.controls.next.removeClass("disabled")):f.active.index==o()-1?(f.controls.next.addClass("disabled"),f.controls.prev.removeClass("disabled")):(f.controls.prev.removeClass("disabled"),f.controls.next.removeClass("disabled")))},dt=function(){if(f.settings.autoDelay>0)var n=setTimeout(e.startAuto,f.settings.autoDelay);else e.startAuto();f.settings.autoHover&&e.hover(function(){f.interval&&(e.stopAuto(!0),f.autoPaused=!0)},function(){f.autoPaused&&(e.startAuto(!0),f.autoPaused=null)})},gt=function(){var i=0,t;f.settings.autoDirection=="next"?e.append(f.children.clone().addClass("bx-clone")):(e.prepend(f.children.clone().addClass("bx-clone")),t=f.children.first().position(),i=f.settings.mode=="horizontal"?-t.left:-t.top);s(i,"reset",0);f.settings.pager=!1;f.settings.controls=!1;f.settings.autoControls=!1;f.settings.tickerHover&&!f.usingCSS&&f.viewport.hover(function(){e.stop()},function(){var t=0;f.children.each(function(){t+=f.settings.mode=="horizontal"?n(this).outerWidth(!0):n(this).outerHeight(!0)});var i=f.settings.speed/t,r=f.settings.mode=="horizontal"?"left":"top",u=i*(t-Math.abs(parseInt(e.css(r))));a(u)});a()},a=function(n){var t,i;speed=n?n:f.settings.speed;t={left:0,top:0};i={left:0,top:0};f.settings.autoDirection=="next"?t=e.find(".bx-clone").first().position():i=f.children.first().position();var r=f.settings.mode=="horizontal"?-t.left:-t.top,u=f.settings.mode=="horizontal"?-i.left:-i.top,o={resetValue:u};s(r,"ticker",speed,o)},ni=function(){f.touch={start:{x:0,y:0},end:{x:0,y:0}};f.viewport.bind("touchstart",ti)},ti=function(n){if(f.working)n.preventDefault();else{f.touch.originalPos=e.position();var t=n.originalEvent;f.touch.start.x=t.changedTouches[0].pageX;f.touch.start.y=t.changedTouches[0].pageY;f.viewport.bind("touchmove",it);f.viewport.bind("touchend",rt)}},it=function(n){var t=n.originalEvent,u=Math.abs(t.changedTouches[0].pageX-f.touch.start.x),e=Math.abs(t.changedTouches[0].pageY-f.touch.start.y),i,r;u*3>e&&f.settings.preventDefaultSwipeX?n.preventDefault():e*3>u&&f.settings.preventDefaultSwipeY&&n.preventDefault();f.settings.mode!="fade"&&f.settings.oneToOneTouch&&(i=0,f.settings.mode=="horizontal"?(r=t.changedTouches[0].pageX-f.touch.start.x,i=f.touch.originalPos.left+r):(r=t.changedTouches[0].pageY-f.touch.start.y,i=f.touch.originalPos.top+r),s(i,"reset",0))},rt=function(n){var r,i,t;f.viewport.unbind("touchmove",it);r=n.originalEvent;i=0;f.touch.end.x=r.changedTouches[0].pageX;f.touch.end.y=r.changedTouches[0].pageY;f.settings.mode=="fade"?(t=Math.abs(f.touch.start.x-f.touch.end.x),t>=f.settings.swipeThreshold&&(f.touch.start.x>f.touch.end.x?e.goToNextSlide():e.goToPrevSlide(),e.stopAuto())):(t=0,f.settings.mode=="horizontal"?(t=f.touch.end.x-f.touch.start.x,i=f.touch.originalPos.left):(t=f.touch.end.y-f.touch.start.y,i=f.touch.originalPos.top),!f.settings.infiniteLoop&&(f.active.index==0&&t>0||f.active.last&&t<0)?s(i,"reset",200):Math.abs(t)>=f.settings.swipeThreshold?(t<0?e.goToNextSlide():e.goToPrevSlide(),e.stopAuto()):s(i,"reset",200));f.viewport.unbind("touchend",rt)},ut=function(){if(f.initialized){var t=n(window).width(),i=n(window).height();(w!=t||b!=i)&&(w=t,b=i,e.redrawSlider(),f.settings.onSliderResize.call(e,f.active.index))}};return e.goToSlide=function(t,i){var h,r,a,p,u,w,b;if(!f.working&&f.active.index!=t){f.working=!0;f.oldIndex=f.active.index;f.active.index=t<0?o()-1:t>=o()?0:t;f.settings.onSlideBefore(f.children.eq(f.active.index),f.oldIndex,f.active.index);if(i=="next")f.settings.onSlideNext(f.children.eq(f.active.index),f.oldIndex,f.active.index);else if(i=="prev")f.settings.onSlidePrev(f.children.eq(f.active.index),f.oldIndex,f.active.index);f.active.last=f.active.index>=o()-1;f.settings.pager&&v(f.active.index);f.settings.controls&&tt();f.settings.mode=="fade"?(f.settings.adaptiveHeight&&f.viewport.height()!=l()&&f.viewport.animate({height:l()},f.settings.adaptiveHeightSpeed),f.children.filter(":visible").fadeOut(f.settings.speed).css({zIndex:0}),f.children.eq(f.active.index).css("zIndex",f.settings.slideZIndex+1).fadeIn(f.settings.speed,function(){n(this).css("zIndex",f.settings.slideZIndex);y()})):(f.settings.adaptiveHeight&&f.viewport.height()!=l()&&f.viewport.animate({height:l()},f.settings.adaptiveHeightSpeed),h=0,r={left:0,top:0},!f.settings.infiniteLoop&&f.carousel&&f.active.last?f.settings.mode=="horizontal"?(u=f.children.eq(f.children.length-1),r=u.position(),h=f.viewport.width()-u.outerWidth()):(a=f.children.length-f.settings.minSlides,r=f.children.eq(a).position()):f.carousel&&f.active.last&&i=="prev"?(p=f.settings.moveSlides==1?f.settings.maxSlides-c():(o()-1)*c()-(f.children.length-f.settings.maxSlides),u=e.children(".bx-clone").eq(p),r=u.position()):i=="next"&&f.active.index==0?(r=e.find("> .bx-clone").eq(f.settings.maxSlides).position(),f.active.last=!1):t>=0&&(w=t*c(),r=f.children.eq(w).position()),"undefined"!=typeof r&&(b=f.settings.mode=="horizontal"?-(r.left-h):-r.top,s(b,"slide",f.settings.speed)))}},e.goToNextSlide=function(){if(f.settings.infiniteLoop||!f.active.last){var n=parseInt(f.active.index)+1;e.goToSlide(n,"next")}},e.goToPrevSlide=function(){if(f.settings.infiniteLoop||f.active.index!=0){var n=parseInt(f.active.index)-1;e.goToSlide(n,"prev")}},e.startAuto=function(n){f.interval||(f.interval=setInterval(function(){f.settings.autoDirection=="next"?e.goToNextSlide():e.goToPrevSlide()},f.settings.pause),n!=!0&&p("stop"))},e.stopAuto=function(n){f.interval&&(clearInterval(f.interval),f.interval=null,n!=!0&&p("start"))},e.getCurrentSlide=function(){return f.active.index},e.getCurrentSlideElement=function(){return f.children.eq(f.active.index)},e.getSlideCount=function(){return f.children.length},e.redrawSlider=function(){f.children.add(e.find(".bx-clone")).width(d());f.viewport.css("height",l());f.settings.ticker||g();f.active.last&&(f.active.index=o()-1);f.active.index>=o()&&(f.active.last=!0);f.settings.pager&&!f.settings.pagerCustom&&(nt(),v(f.active.index))},e.destroySlider=function(){f.initialized&&(f.initialized=!1,n(".bx-clone",this).remove(),f.children.each(function(){n(this).data("origStyle")!=undefined?n(this).attr("style",n(this).data("origStyle")):n(this).removeAttr("style")}),n(this).data("origStyle")!=undefined?this.attr("style",n(this).data("origStyle")):n(this).removeAttr("style"),n(this).unwrap().unwrap(),f.controls.el&&f.controls.el.remove(),f.controls.next&&f.controls.next.remove(),f.controls.prev&&f.controls.prev.remove(),f.pagerEl&&f.settings.controls&&f.pagerEl.remove(),n(".bx-caption",this).remove(),f.controls.autoEl&&f.controls.autoEl.remove(),clearInterval(f.interval),f.settings.responsive&&n(window).unbind("resize",ut))},e.reloadSlider=function(n){n!=undefined&&(u=n);e.destroySlider();k()},k(),this}})(jQuery);
/*!
* FitVids 1.0
*
* Copyright 2011, Chris Coyier - http://css-tricks.com + Dave Rupert - http://daverupert.com
* Credit to Thierry Koblentz - http://www.alistapart.com/articles/creating-intrinsic-ratios-for-video/
* Released under the WTFPL license - http://sam.zoy.org/wtfpl/
*
* Date: Thu Sept 01 18:00:00 2011 -0500
*/
(function(n){"use strict";n.fn.fitVids=function(t){var i={customSelector:null},r=document.createElement("div"),u=document.getElementsByTagName("base")[0]||document.getElementsByTagName("script")[0];return r.className="fit-vids-style",r.innerHTML="&shy;<style> .fluid-width-video-wrapper { width: 100%; position: relative; padding: 0; } .fluid-width-video-wrapper iframe, .fluid-width-video-wrapper object, .fluid-width-video-wrapper embed { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } <\/style>",u.parentNode.insertBefore(r,u),t&&n.extend(i,t),this.each(function(){var t=["iframe[src*='player.vimeo.com']","iframe[src*='www.youtube.com']","iframe[src*='www.kickstarter.com']","object","embed"],r;i.customSelector&&t.push(i.customSelector);r=n(this).find(t.join(","));r.each(function(){var t=n(this),i;if((this.tagName.toLowerCase()!=="embed"||!t.parent("object").length)&&!t.parent(".fluid-width-video-wrapper").length){var r=this.tagName.toLowerCase()==="object"||t.attr("height")&&!isNaN(parseInt(t.attr("height"),10))?parseInt(t.attr("height"),10):t.height(),u=isNaN(parseInt(t.attr("width"),10))?t.width():parseInt(t.attr("width"),10),f=r/u;t.attr("id")||(i="fitvid"+Math.floor(Math.random()*999999),t.attr("id",i));t.wrap('<div class="fluid-width-video-wrapper"><\/div>').parent(".fluid-width-video-wrapper").css("padding-top",f*100+"%");t.removeAttr("height").removeAttr("width")}})})}})(jQuery);
/*!
 * fancyBox - jQuery Plugin
 * version: 2.1.5 (Fri, 14 Jun 2013)
 * requires jQuery v1.6 or later
 *
 * Examples at http://fancyapps.com/fancybox/
 * License: www.fancyapps.com/fancybox/#license
 *
 * Copyright 2012 Janis Skarnelis - janis@fancyapps.com
 *
 */
(function(n,t,i,r){"use strict";var p=i("html"),o=i(n),e=i(t),u=i.fancybox=function(){u.open.apply(this,arguments)},y=navigator.userAgent.match(/msie/i),v=null,s=t.createTouch!==r,a=function(n){return n&&n.hasOwnProperty&&n instanceof i},c=function(n){return n&&i.type(n)==="string"},l=function(n){return c(n)&&n.indexOf("%")>0},w=function(n){return n&&!(n.style.overflow&&n.style.overflow==="hidden")&&(n.clientWidth&&n.scrollWidth>n.clientWidth||n.clientHeight&&n.scrollHeight>n.clientHeight)},f=function(n,t){var i=parseInt(n,10)||0;return t&&l(n)&&(i=u.getViewport()[t]/100*i),Math.ceil(i)},h=function(n,t){return f(n,t)+"px"};i.extend(u,{version:"2.1.5",defaults:{padding:15,margin:20,width:800,height:600,minWidth:100,minHeight:100,maxWidth:9999,maxHeight:9999,pixelRatio:1,autoSize:!0,autoHeight:!1,autoWidth:!1,autoResize:!0,autoCenter:!s,fitToView:!0,aspectRatio:!1,topRatio:.5,leftRatio:.5,scrolling:"auto",wrapCSS:"",arrows:!0,closeBtn:!0,closeClick:!1,nextClick:!1,mouseWheel:!0,autoPlay:!1,playSpeed:3e3,preload:3,modal:!1,loop:!0,ajax:{dataType:"html",headers:{"X-fancyBox":!0}},iframe:{scrolling:"auto",preload:!0},swf:{wmode:"transparent",allowfullscreen:"true",allowscriptaccess:"always"},keys:{next:{13:"left",34:"up",39:"left",40:"up"},prev:{8:"right",33:"down",37:"right",38:"down"},close:[27],play:[32],toggle:[70]},direction:{next:"left",prev:"right"},scrollOutside:!0,index:0,type:null,href:null,content:null,title:null,tpl:{wrap:'<div class="fancybox-wrap" tabIndex="-1"><div class="fancybox-skin"><div class="fancybox-outer"><div class="fancybox-inner"><\/div><\/div><\/div><\/div>',image:'<img class="fancybox-image" src="{href}" alt="" />',iframe:'<iframe id="fancybox-frame{rnd}" name="fancybox-frame{rnd}" class="fancybox-iframe" frameborder="0" vspace="0" hspace="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen'+(y?' allowtransparency="true"':"")+"><\/iframe>",error:'<p class="fancybox-error">The requested content cannot be loaded.<br/>Please try again later.<\/p>',closeBtn:'<a title="Close" aria-label="Luk" class="fancybox-item fancybox-close" href="javascript:;"><\/a>',next:'<a title="Next" aria-label="Forrige" class="fancybox-nav fancybox-next" href="javascript:;"><span><\/span><\/a>',prev:'<a title="Previous" aria-label="N�ste" class="fancybox-nav fancybox-prev" href="javascript:;"><span><\/span><\/a>',loading:'<div id="fancybox-loading"><div><\/div><\/div>'},openEffect:"fade",openSpeed:250,openEasing:"swing",openOpacity:!0,openMethod:"zoomIn",closeEffect:"fade",closeSpeed:250,closeEasing:"swing",closeOpacity:!0,closeMethod:"zoomOut",nextEffect:"elastic",nextSpeed:250,nextEasing:"swing",nextMethod:"changeIn",prevEffect:"elastic",prevSpeed:250,prevEasing:"swing",prevMethod:"changeOut",helpers:{overlay:!0,title:!0},onCancel:i.noop,beforeLoad:i.noop,afterLoad:i.noop,beforeShow:i.noop,afterShow:i.noop,beforeChange:i.noop,beforeClose:i.noop,afterClose:i.noop},group:{},opts:{},previous:null,coming:null,current:null,isActive:!1,isOpen:!1,isOpened:!1,wrap:null,skin:null,outer:null,inner:null,player:{timer:null,isActive:!1},ajaxLoad:null,imgPreload:null,transitions:{},helpers:{},open:function(n,t){if(n)return(i.isPlainObject(t)||(t={}),!1===u.close(!0))?void 0:(i.isArray(n)||(n=a(n)?i(n).get():[n]),i.each(n,function(f,e){var h={},s,p,l,o,v,y,w;i.type(e)==="object"&&(e.nodeType&&(e=i(e)),a(e)?(h={href:e.data("fancybox-href")||e.attr("href"),title:i("<div/>").text(e.data("fancybox-title")||e.attr("title")||"").html(),isDom:!0,element:e},i.metadata&&i.extend(!0,h,e.metadata())):h=e);s=t.href||h.href||(c(e)?e:null);p=t.title!==r?t.title:h.title||"";l=t.content||h.content;o=l?"html":t.type||h.type;!o&&h.isDom&&(o=e.data("fancybox-type"),o||(v=e.prop("class").match(/fancybox\.(\w+)/),o=v?v[1]:null));c(s)&&(o||(u.isImage(s)?o="image":u.isSWF(s)?o="swf":s.charAt(0)==="#"?o="inline":c(e)&&(o="html",l=e)),o==="ajax"&&(y=s.split(/\s+/,2),s=y.shift(),w=y.shift()));l||(o==="inline"?s?l=i(c(s)?s.replace(/.*(?=#[^\s]+$)/,""):s):h.isDom&&(l=e):o==="html"?l=s:o||s||!h.isDom||(o="inline",l=e));i.extend(h,{href:s,type:o,content:l,title:p,selector:w});n[f]=h}),u.opts=i.extend(!0,{},u.defaults,t),t.keys!==r&&(u.opts.keys=t.keys?i.extend({},u.defaults.keys,t.keys):!1),u.group=n,u._start(u.opts.index))},cancel:function(){var n=u.coming;n&&!1===u.trigger("onCancel")||(u.hideLoading(),n)&&(u.ajaxLoad&&u.ajaxLoad.abort(),u.ajaxLoad=null,u.imgPreload&&(u.imgPreload.onload=u.imgPreload.onerror=null),n.wrap&&n.wrap.stop(!0,!0).trigger("onReset").remove(),u.coming=null,u.current||u._afterZoomOut(n))},close:function(n){(u.cancel(),!1!==u.trigger("beforeClose"))&&(u.unbindEvents(),u.isActive)&&(u.isOpen&&n!==!0?(u.isOpen=u.isOpened=!1,u.isClosing=!0,i(".fancybox-item, .fancybox-nav").remove(),u.wrap.stop(!0,!0).removeClass("fancybox-opened"),u.transitions[u.current.closeMethod]()):(i(".fancybox-wrap").stop(!0).trigger("onReset").remove(),u._afterZoomOut()))},play:function(n){var t=function(){clearTimeout(u.player.timer)},i=function(){t();u.current&&u.player.isActive&&(u.player.timer=setTimeout(u.next,u.current.playSpeed))},r=function(){t();e.unbind(".player");u.player.isActive=!1;u.trigger("onPlayEnd")},f=function(){u.current&&(u.current.loop||u.current.index<u.group.length-1)&&(u.player.isActive=!0,e.bind({"onCancel.player beforeClose.player":r,"onUpdate.player":i,"beforeLoad.player":t}),i(),u.trigger("onPlayStart"))};n!==!0&&(u.player.isActive||n===!1)?r():f()},next:function(n){var t=u.current;t&&(c(n)||(n=t.direction.next),u.jumpto(t.index+1,n,"next"))},prev:function(n){var t=u.current;t&&(c(n)||(n=t.direction.prev),u.jumpto(t.index-1,n,"prev"))},jumpto:function(n,t,i){var e=u.current;e&&(n=f(n),u.direction=t||e.direction[n>=e.index?"next":"prev"],u.router=i||"jumpto",e.loop&&(n<0&&(n=e.group.length+n%e.group.length),n=n%e.group.length),e.group[n]!==r&&(u.cancel(),u._start(n)))},reposition:function(n,t){var f=u.current,e=f?f.wrap:null,r;e&&(r=u._getPosition(t),n&&n.type==="scroll"?(delete r.position,e.stop(!0,!0).animate(r,200)):(e.css(r),f.pos=i.extend({},f.dim,r)))},update:function(n){var t=n&&n.originalEvent&&n.originalEvent.type,i=!t||t==="orientationchange";(i&&(clearTimeout(v),v=null),u.isOpen&&!v)&&(v=setTimeout(function(){var r=u.current;r&&!u.isClosing&&(u.wrap.removeClass("fancybox-tmp"),(i||t==="load"||t==="resize"&&r.autoResize)&&u._setDimension(),t==="scroll"&&r.canShrink||u.reposition(n),u.trigger("onUpdate"),v=null)},i&&!s?0:300))},toggle:function(n){u.isOpen&&(u.current.fitToView=i.type(n)==="boolean"?n:!u.current.fitToView,s&&(u.wrap.removeAttr("style").addClass("fancybox-tmp"),u.trigger("onUpdate")),u.update())},hideLoading:function(){e.unbind(".loading");i("#fancybox-loading").remove()},showLoading:function(){var t,n;u.hideLoading();t=i(u.opts.tpl.loading).click(u.cancel).appendTo("body");e.bind("keydown.loading",function(n){(n.which||n.keyCode)===27&&(n.preventDefault(),u.cancel())});u.defaults.fixed||(n=u.getViewport(),t.css({position:"absolute",top:n.h*.5+n.y,left:n.w*.5+n.x}));u.trigger("onLoading")},getViewport:function(){var i=u.current&&u.current.locked||!1,t={x:o.scrollLeft(),y:o.scrollTop()};return i&&i.length?(t.w=i[0].clientWidth,t.h=i[0].clientHeight):(t.w=s&&n.innerWidth?n.innerWidth:o.width(),t.h=s&&n.innerHeight?n.innerHeight:o.height()),t},unbindEvents:function(){u.wrap&&a(u.wrap)&&u.wrap.unbind(".fb");e.unbind(".fb");o.unbind(".fb")},bindEvents:function(){var n=u.current,t;n&&(o.bind("orientationchange.fb"+(s?"":" resize.fb")+(n.autoCenter&&!n.locked?" scroll.fb":""),u.update),t=n.keys,t&&e.bind("keydown.fb",function(f){var e=f.which||f.keyCode,o=f.target||f.srcElement;if(e===27&&u.coming)return!1;f.ctrlKey||f.altKey||f.shiftKey||f.metaKey||o&&(o.type||i(o).is("[contenteditable]"))||i.each(t,function(t,o){return n.group.length>1&&o[e]!==r?(u[t](o[e]),f.preventDefault(),!1):i.inArray(e,o)>-1?(u[t](),f.preventDefault(),!1):void 0})}),i.fn.mousewheel&&n.mouseWheel&&u.wrap.bind("mousewheel.fb",function(t,r,f,e){for(var h=t.target||null,o=i(h),s=!1;o.length;){if(s||o.is(".fancybox-skin")||o.is(".fancybox-wrap"))break;s=w(o[0]);o=i(o).parent()}r===0||s||u.group.length>1&&!n.canShrink&&(e>0||f>0?u.prev(e>0?"down":"left"):(e<0||f<0)&&u.next(e<0?"up":"right"),t.preventDefault())}))},trigger:function(n,t){var f,r=t||u.coming||u.current;if(r){if(i.isFunction(r[n])&&(f=r[n].apply(r,Array.prototype.slice.call(arguments,1))),f===!1)return!1;r.helpers&&i.each(r.helpers,function(t,f){f&&u.helpers[t]&&i.isFunction(u.helpers[t][n])&&u.helpers[t][n](i.extend(!0,{},u.helpers[t].defaults,f),r)})}e.trigger(n)},isImage:function(n){return c(n)&&n.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg)((\?|#).*)?$)/i)},isSWF:function(n){return c(n)&&n.match(/\.(swf)((\?|#).*)?$/i)},_start:function(n){var t={},c,l,r,e,o;if(n=f(n),c=u.group[n]||null,!c)return!1;if(t=i.extend(!0,{},u.opts,c),e=t.margin,o=t.padding,i.type(e)==="number"&&(t.margin=[e,e,e,e]),i.type(o)==="number"&&(t.padding=[o,o,o,o]),t.modal&&i.extend(!0,t,{closeBtn:!1,closeClick:!1,nextClick:!1,arrows:!1,mouseWheel:!1,keys:null,helpers:{overlay:{closeClick:!1}}}),t.autoSize&&(t.autoWidth=t.autoHeight=!0),t.width==="auto"&&(t.autoWidth=!0),t.height==="auto"&&(t.autoHeight=!0),t.group=u.group,t.index=n,u.coming=t,!1===u.trigger("beforeLoad")){u.coming=null;return}if(r=t.type,l=t.href,!r)return(u.coming=null,u.current&&u.router&&u.router!=="jumpto")?(u.current.index=n,u[u.router](u.direction)):!1;if(u.isActive=!0,(r==="image"||r==="swf")&&(t.autoHeight=t.autoWidth=!1,t.scrolling="visible"),r==="image"&&(t.aspectRatio=!0),r==="iframe"&&s&&(t.scrolling="scroll"),t.wrap=i(t.tpl.wrap).addClass("fancybox-"+(s?"mobile":"desktop")+" fancybox-type-"+r+" fancybox-tmp "+t.wrapCSS).appendTo(t.parent||"body"),i.extend(t,{skin:i(".fancybox-skin",t.wrap),outer:i(".fancybox-outer",t.wrap),inner:i(".fancybox-inner",t.wrap)}),i.each(["Top","Right","Bottom","Left"],function(n,i){t.skin.css("padding"+i,h(t.padding[n]))}),u.trigger("onReady"),r==="inline"||r==="html"){if(!t.content||!t.content.length)return u._error("content")}else if(!l)return u._error("href");r==="image"?u._loadImage():r==="ajax"?u._loadAjax():r==="iframe"?u._loadIframe():u._afterLoad()},_error:function(n){i.extend(u.coming,{type:"html",autoWidth:!0,autoHeight:!0,minWidth:0,minHeight:0,scrolling:"no",hasError:n,content:u.coming.tpl.error});u._afterLoad()},_loadImage:function(){var n=u.imgPreload=new Image;n.onload=function(){this.onload=this.onerror=null;u.coming.width=this.width/u.opts.pixelRatio;u.coming.height=this.height/u.opts.pixelRatio;u._afterLoad()};n.onerror=function(){this.onload=this.onerror=null;u._error("image")};n.src=u.coming.href;n.complete!==!0&&u.showLoading()},_loadAjax:function(){var n=u.coming;u.showLoading();u.ajaxLoad=i.ajax(i.extend({},n.ajax,{url:n.href,error:function(n,t){u.coming&&t!=="abort"?u._error("ajax",n):u.hideLoading()},success:function(t,i){i==="success"&&(n.content=t,u._afterLoad())}}))},_loadIframe:function(){var n=u.coming,t=i(n.tpl.iframe.replace(/\{rnd\}/g,(new Date).getTime())).attr("scrolling",s?"auto":n.iframe.scrolling).attr("src",n.href);if(i(n.wrap).bind("onReset",function(){try{i(this).find("iframe").hide().attr("src","//about:blank").end().empty()}catch(n){}}),n.iframe.preload){u.showLoading();t.one("load",function(){i(this).data("ready",1);s||i(this).bind("load.fb",u.update);i(this).parents(".fancybox-wrap").width("100%").removeClass("fancybox-tmp").show();u._afterLoad()})}n.content=t.appendTo(n.inner);n.iframe.preload||u._afterLoad()},_preloadImages:function(){for(var r=u.group,i=u.current,f=r.length,e=i.preload?Math.min(i.preload,f-1):0,n,t=1;t<=e;t+=1)n=r[(i.index+t)%f],n.type==="image"&&n.href&&((new Image).src=n.href)},_afterLoad:function(){var r=u.coming,f=u.current,e="fancybox-placeholder",t,n,c,o,s,h;if(u.hideLoading(),r&&u.isActive!==!1){if(!1===u.trigger("afterLoad",r,f)){r.wrap.stop(!0).trigger("onReset").remove();u.coming=null;return}f&&(u.trigger("beforeChange",f),f.wrap.stop(!0).removeClass("fancybox-opened").find(".fancybox-item, .fancybox-nav").remove());u.unbindEvents();t=r;n=r.content;c=r.type;o=r.scrolling;i.extend(u,{wrap:t.wrap,skin:t.skin,outer:t.outer,inner:t.inner,current:t,previous:f});s=t.href;switch(c){case"inline":case"ajax":case"html":t.selector?n=i("<div>").html(n).find(t.selector):a(n)&&(n.data(e)||n.data(e,i('<div class="'+e+'"><\/div>').insertAfter(n).hide()),n=n.show().detach(),t.wrap.bind("onReset",function(){i(this).find(n).length&&n.hide().replaceAll(n.data(e)).data(e,!1)}));break;case"image":n=t.tpl.image.replace(/\{href\}/g,s);break;case"swf":n='<object id="fancybox-swf" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%"><param name="movie" value="'+s+'"><\/param>';h="";i.each(t.swf,function(t,i){n+='<param name="'+t+'" value="'+i+'"><\/param>';h+=" "+t+'="'+i+'"'});n+='<embed src="'+s+'" type="application/x-shockwave-flash" width="100%" height="100%"'+h+"><\/embed><\/object>"}a(n)&&n.parent().is(t.inner)||t.inner.append(n);u.trigger("beforeShow");t.inner.css("overflow",o==="yes"?"scroll":o==="no"?"hidden":o);u._setDimension();u.reposition();u.isOpen=!1;u.coming=null;u.bindEvents();u.isOpened?f.prevMethod&&u.transitions[f.prevMethod]():i(".fancybox-wrap").not(t.wrap).stop(!0).trigger("onReset").remove();u.transitions[u.isOpened?t.nextMethod:t.openMethod]();u._preloadImages()}},_setDimension:function(){var nt=u.getViewport(),wt=0,vt=!1,st=!1,v=u.wrap,k=u.skin,e=u.inner,r=u.current,n=r.width,t=r.height,o=r.minWidth,s=r.minHeight,c=r.maxWidth,a=r.maxHeight,bt=r.scrolling,ft=r.scrollOutside?r.scrollbarWidth:0,et=r.margin,yt=f(et[1]+et[3]),pt=f(et[0]+et[2]),d,ht,it,rt,p,y,ct,lt,w,g,b,ut,ot,tt,at;if(v.add(k).add(e).width("auto").height("auto").removeClass("fancybox-tmp"),d=f(k.outerWidth(!0)-k.width()),ht=f(k.outerHeight(!0)-k.height()),it=yt+d,rt=pt+ht,p=l(n)?(nt.w-it)*f(n)/100:n,y=l(t)?(nt.h-rt)*f(t)/100:t,r.type==="iframe"){if(tt=r.content,r.autoHeight&&tt&&tt.data("ready")===1)try{tt[0].contentWindow.document.location&&(e.width(p).height(9999),at=tt.contents().find("body"),ft&&at.css("overflow-x","hidden"),y=at.outerHeight(!0))}catch(kt){}}else(r.autoWidth||r.autoHeight)&&(e.addClass("fancybox-tmp"),r.autoWidth||e.width(p),r.autoHeight||e.height(y),r.autoWidth&&(p=e.width()),r.autoHeight&&(y=e.height()),e.removeClass("fancybox-tmp"));if(n=f(p),t=f(y),w=p/y,o=f(l(o)?f(o,"w")-it:o),c=f(l(c)?f(c,"w")-it:c),s=f(l(s)?f(s,"h")-rt:s),a=f(l(a)?f(a,"h")-rt:a),ct=c,lt=a,r.fitToView&&(c=Math.min(nt.w-it,c),a=Math.min(nt.h-rt,a)),ut=nt.w-yt,ot=nt.h-pt,r.aspectRatio?(n>c&&(n=c,t=f(n/w)),t>a&&(t=a,n=f(t*w)),n<o&&(n=o,t=f(n/w)),t<s&&(t=s,n=f(t*w))):(n=Math.max(o,Math.min(n,c)),r.autoHeight&&r.type!=="iframe"&&(e.width(n),t=e.height()),t=Math.max(s,Math.min(t,a))),r.fitToView)if(e.width(n).height(t),v.width(n+d),g=v.width(),b=v.height(),r.aspectRatio)while((g>ut||b>ot)&&n>o&&t>s){if(wt++>19)break;t=Math.max(s,Math.min(a,t-10));n=f(t*w);n<o&&(n=o,t=f(n/w));n>c&&(n=c,t=f(n/w));e.width(n).height(t);v.width(n+d);g=v.width();b=v.height()}else n=Math.max(o,Math.min(n,n-(g-ut))),t=Math.max(s,Math.min(t,t-(b-ot)));ft&&bt==="auto"&&t<y&&n+d+ft<ut&&(n+=ft);e.width(n).height(t);v.width(n+d);g=v.width();b=v.height();vt=(g>ut||b>ot)&&n>o&&t>s;st=r.aspectRatio?n<ct&&t<lt&&n<p&&t<y:(n<ct||t<lt)&&(n<p||t<y);i.extend(r,{dim:{width:h(g),height:h(b)},origWidth:p,origHeight:y,canShrink:vt,canExpand:st,wPadding:d,hPadding:ht,wrapSpace:b-k.outerHeight(!0),skinSpace:k.height()-t});!tt&&r.autoHeight&&t>s&&t<a&&!st&&e.height("auto")},_getPosition:function(n){var i=u.current,r=u.getViewport(),f=i.margin,e=u.wrap.width()+f[1]+f[3],o=u.wrap.height()+f[0]+f[2],t={position:"absolute",top:f[0],left:f[3]};return i.autoCenter&&i.fixed&&!n&&o<=r.h&&e<=r.w?t.position="fixed":i.locked||(t.top+=r.y,t.left+=r.x),t.top=h(Math.max(t.top,t.top+(r.h-o)*i.topRatio)),t.left=h(Math.max(t.left,t.left+(r.w-e)*i.leftRatio)),t},_afterZoomIn:function(){var n=u.current;n&&(u.isOpen=u.isOpened=!0,u.wrap.css("overflow","visible").addClass("fancybox-opened").hide().show(0),u.update(),(n.closeClick||n.nextClick&&u.group.length>1)&&u.inner.css("cursor","pointer").bind("click.fb",function(t){i(t.target).is("a")||i(t.target).parent().is("a")||(t.preventDefault(),u[n.closeClick?"close":"next"]())}),n.closeBtn&&i(n.tpl.closeBtn).appendTo(u.skin).bind("click.fb",function(n){n.preventDefault();u.close()}),n.arrows&&u.group.length>1&&((n.loop||n.index>0)&&i(n.tpl.prev).appendTo(u.outer).bind("click.fb",u.prev),(n.loop||n.index<u.group.length-1)&&i(n.tpl.next).appendTo(u.outer).bind("click.fb",u.next)),u.trigger("afterShow"),n.loop||n.index!==n.group.length-1?u.opts.autoPlay&&!u.player.isActive&&(u.opts.autoPlay=!1,u.play(!0)):u.play(!1))},_afterZoomOut:function(n){n=n||u.current;i(".fancybox-wrap").trigger("onReset").remove();i.extend(u,{group:{},opts:{},router:!1,current:null,isActive:!1,isOpened:!1,isOpen:!1,isClosing:!1,wrap:null,skin:null,outer:null,inner:null});u.trigger("afterClose",n)}});u.transitions={getOrigPosition:function(){var n=u.current,f=n.element,t=n.orig,i={},e=50,o=50,s=n.hPadding,c=n.wPadding,r=u.getViewport();return!t&&n.isDom&&f.is(":visible")&&(t=f.find("img:first"),t.length||(t=f)),a(t)?(i=t.offset(),t.is("img")&&(e=t.outerWidth(),o=t.outerHeight())):(i.top=r.y+(r.h-o)*n.topRatio,i.left=r.x+(r.w-e)*n.leftRatio),(u.wrap.css("position")==="fixed"||n.locked)&&(i.top-=r.y,i.left-=r.x),{top:h(i.top-s*n.topRatio),left:h(i.left-c*n.leftRatio),width:h(e+c),height:h(o+s)}},step:function(n,t){var r,s,e,i=t.prop,o=u.current,h=o.wrapSpace,c=o.skinSpace;(i==="width"||i==="height")&&(r=t.end===t.start?1:(n-t.start)/(t.end-t.start),u.isClosing&&(r=1-r),s=i==="width"?o.wPadding:o.hPadding,e=n-s,u.skin[i](f(i==="width"?e:e-h*r)),u.inner[i](f(i==="width"?e:e-h*r-c*r)))},zoomIn:function(){var n=u.current,t=n.pos,r=n.openEffect,f=r==="elastic",e=i.extend({opacity:1},t);delete e.position;f?(t=this.getOrigPosition(),n.openOpacity&&(t.opacity=.1)):r==="fade"&&(t.opacity=.1);u.wrap.css(t).animate(e,{duration:r==="none"?0:n.openSpeed,easing:n.openEasing,step:f?this.step:null,complete:u._afterZoomIn})},zoomOut:function(){var n=u.current,i=n.closeEffect,r=i==="elastic",t={opacity:.1};r&&(t=this.getOrigPosition(),n.closeOpacity&&(t.opacity=.1));u.wrap.animate(t,{duration:i==="none"?0:n.closeSpeed,easing:n.closeEasing,step:r?this.step:null,complete:u._afterZoomOut})},changeIn:function(){var i=u.current,s=i.nextEffect,t=i.pos,o={opacity:1},r=u.direction,e=200,n;t.opacity=.1;s==="elastic"&&(n=r==="down"||r==="up"?"top":"left",r==="down"||r==="right"?(t[n]=h(f(t[n])-e),o[n]="+="+e+"px"):(t[n]=h(f(t[n])+e),o[n]="-="+e+"px"));s==="none"?u._afterZoomIn():u.wrap.css(t).animate(o,{duration:i.nextSpeed,easing:i.nextEasing,complete:u._afterZoomIn})},changeOut:function(){var n=u.previous,r=n.prevEffect,f={opacity:.1},t=u.direction;r==="elastic"&&(f[t==="down"||t==="up"?"top":"left"]=(t==="up"||t==="left"?"-":"+")+"=200px");n.wrap.animate(f,{duration:r==="none"?0:n.prevSpeed,easing:n.prevEasing,complete:function(){i(this).trigger("onReset").remove()}})}};u.helpers.overlay={defaults:{closeClick:!0,speedOut:200,showEarly:!0,css:{},locked:!s,fixed:!0},overlay:null,fixed:!1,el:i("html"),create:function(n){var t;n=i.extend({},this.defaults,n);this.overlay&&this.close();t=u.coming?u.coming.parent:n.parent;this.overlay=i('<div class="fancybox-overlay"><\/div>').appendTo(t&&t.length?t:"body");this.fixed=!1;n.fixed&&u.defaults.fixed&&(this.overlay.addClass("fancybox-overlay-fixed"),this.fixed=!0)},open:function(n){var t=this;n=i.extend({},this.defaults,n);this.overlay?this.overlay.unbind(".overlay").width("auto").height("auto"):this.create(n);this.fixed||(o.bind("resize.overlay",i.proxy(this.update,this)),this.update());n.closeClick&&this.overlay.bind("click.overlay",function(n){if(i(n.target).hasClass("fancybox-overlay"))return u.isActive?u.close():t.close(),!1});this.overlay.css(n.css).show()},close:function(){o.unbind("resize.overlay");this.el.hasClass("fancybox-lock")&&(i(".fancybox-margin").removeClass("fancybox-margin"),this.el.removeClass("fancybox-lock"),o.scrollTop(this.scrollV).scrollLeft(this.scrollH));i(".fancybox-overlay").remove().hide();i.extend(this,{overlay:null,fixed:!1})},update:function(){var n="100%",i;this.overlay.width(n).height("100%");y?(i=Math.max(t.documentElement.offsetWidth,t.body.offsetWidth),e.width()>i&&(n=e.width())):e.width()>o.width()&&(n=e.width());this.overlay.width(n).height(e.height())},onReady:function(n,t){var r=this.overlay;i(".fancybox-overlay").stop(!0,!0);r||this.create(n);n.locked&&this.fixed&&t.fixed&&(t.locked=this.overlay.append(t.wrap),t.fixed=!1);n.showEarly===!0&&this.beforeShow.apply(this,arguments)},beforeShow:function(n,t){t.locked&&!this.el.hasClass("fancybox-lock")&&(this.fixPosition!==!1&&i("*:not(object)").filter(function(){return i(this).css("position")==="fixed"&&!i(this).hasClass("fancybox-overlay")&&!i(this).hasClass("fancybox-wrap")}).addClass("fancybox-margin"),this.el.addClass("fancybox-margin"),this.scrollV=o.scrollTop(),this.scrollH=o.scrollLeft(),this.el.addClass("fancybox-lock"),o.scrollTop(this.scrollV).scrollLeft(this.scrollH));this.open(n)},onUpdate:function(){this.fixed||this.update()},afterClose:function(n){this.overlay&&!u.coming&&this.overlay.fadeOut(n.speedOut,i.proxy(this.close,this))}};u.helpers.title={defaults:{type:"float",position:"bottom"},beforeShow:function(n){var o=u.current,r=o.title,s=n.type,t,e;if(i.isFunction(r)&&(r=r.call(o.element,o)),c(r)&&i.trim(r)!==""){t=i('<div class="fancybox-title fancybox-title-'+s+'-wrap">'+r+"<\/div>");switch(s){case"inside":e=u.skin;break;case"outside":e=u.wrap;break;case"over":e=u.inner;break;default:e=u.skin;t.appendTo("body");y&&t.width(t.width());t.wrapInner('<span class="child"><\/span>');u.current.margin[2]+=Math.abs(f(t.css("margin-bottom")))}t[n.position==="top"?"prependTo":"appendTo"](e)}}};i.fn.fancybox=function(n){var r,f=i(this),t=this.selector||"",o=function(e){var o=i(this).blur(),c=r,h,s;e.ctrlKey||e.altKey||e.shiftKey||e.metaKey||o.is(".fancybox-wrap")||(h=n.groupAttr||"data-fancybox-group",s=o.attr(h),s||(h="rel",s=o.get(0)[h]),s&&s!==""&&s!=="nofollow"&&(o=t.length?i(t):f,o=o.filter("["+h+'="'+s+'"]'),c=o.index(this)),n.index=c,u.open(o,n)!==!1&&e.preventDefault())};return n=n||{},r=n.index||0,t&&n.live!==!1?e.undelegate(t,"click.fb-start").delegate(t+":not('.fancybox-item, .fancybox-nav')","click.fb-start",o):f.unbind("click.fb-start").bind("click.fb-start",o),this.filter("[data-fancybox-start=1]").trigger("click"),this};e.ready(function(){var t,f;i.scrollbarWidth===r&&(i.scrollbarWidth=function(){var n=i('<div style="width:50px;height:50px;overflow:auto"><div/><\/div>').appendTo("body"),t=n.children(),r=t.innerWidth()-t.height(99).innerWidth();return n.remove(),r});i.support.fixedPosition===r&&(i.support.fixedPosition=function(){var n=i('<div style="position:fixed;top:20px;"><\/div>').appendTo("body"),t=n[0].offsetTop===20||n[0].offsetTop===15;return n.remove(),t}());i.extend(u.defaults,{scrollbarWidth:i.scrollbarWidth(),fixed:i.support.fixedPosition,parent:i("body")});t=i(n).width();p.addClass("fancybox-lock-test");f=i(n).width();p.removeClass("fancybox-lock-test");i("<style type='text/css'>.fancybox-margin{margin-right:"+(f-t)+"px;}<\/style>").appendTo("head")})})(window,document,jQuery);
/*!
 * Buttons helper for fancyBox
 * version: 1.0.5 (Mon, 15 Oct 2012)
 * @requires fancyBox v2.0 or later
 *
 * Usage:
 *     $(".fancybox").fancybox({
 *         helpers : {
 *             buttons: {
 *                 position : 'top'
 *             }
 *         }
 *     });
 *
 */
(function(n){var t=n.fancybox;t.helpers.buttons={defaults:{skipSingle:!1,position:"top",tpl:'<div id="fancybox-buttons"><ul><li><a class="btnPrev" title="Previous" href="javascript:;"><\/a><\/li><li><a class="btnPlay" title="Start slideshow" href="javascript:;"><\/a><\/li><li><a class="btnNext" title="Next" href="javascript:;"><\/a><\/li><li><a class="btnToggle" title="Toggle size" href="javascript:;"><\/a><\/li><li><a class="btnClose" title="Close" href="javascript:;"><\/a><\/li><\/ul><\/div>'},list:null,buttons:null,beforeLoad:function(n,t){if(n.skipSingle&&t.group.length<2){t.helpers.buttons=!1;t.closeBtn=!0;return}t.margin[n.position==="bottom"?2:0]+=30},onPlayStart:function(){this.buttons&&this.buttons.play.attr("title","Pause slideshow").addClass("btnPlayOn")},onPlayEnd:function(){this.buttons&&this.buttons.play.attr("title","Start slideshow").removeClass("btnPlayOn")},afterShow:function(i,r){var u=this.buttons;u||(this.list=n(i.tpl).addClass(i.position).appendTo("body"),u={prev:this.list.find(".btnPrev").click(t.prev),next:this.list.find(".btnNext").click(t.next),play:this.list.find(".btnPlay").click(t.play),toggle:this.list.find(".btnToggle").click(t.toggle),close:this.list.find(".btnClose").click(t.close)});r.index>0||r.loop?u.prev.removeClass("btnDisabled"):u.prev.addClass("btnDisabled");r.loop||r.index<r.group.length-1?(u.next.removeClass("btnDisabled"),u.play.removeClass("btnDisabled")):(u.next.addClass("btnDisabled"),u.play.addClass("btnDisabled"));this.buttons=u;this.onUpdate(i,r)},onUpdate:function(n,t){var i;this.buttons&&(i=this.buttons.toggle.removeClass("btnDisabled btnToggleOn"),t.canShrink?i.addClass("btnToggleOn"):t.canExpand||i.addClass("btnDisabled"))},beforeClose:function(){this.list&&this.list.remove();this.list=null;this.buttons=null}}})(jQuery);
/*!
 * Media helper for fancyBox
 * version: 1.0.6 (Fri, 14 Jun 2013)
 * @requires fancyBox v2.0 or later
 *
 * Usage:
 *     $(".fancybox").fancybox({
 *         helpers : {
 *             media: true
 *         }
 *     });
 *
 * Set custom URL parameters:
 *     $(".fancybox").fancybox({
 *         helpers : {
 *             media: {
 *                 youtube : {
 *                     params : {
 *                         autoplay : 0
 *                     }
 *                 }
 *             }
 *         }
 *     });
 *
 * Or:
 *     $(".fancybox").fancybox({,
 *         helpers : {
 *             media: true
 *         },
 *         youtube : {
 *             autoplay: 0
 *         }
 *     });
 *
 *  Supports:
 *
 *      Youtube
 *          http://www.youtube.com/watch?v=opj24KnzrWo
 *          http://www.youtube.com/embed/opj24KnzrWo
 *          http://youtu.be/opj24KnzrWo
 *			http://www.youtube-nocookie.com/embed/opj24KnzrWo
 *      Vimeo
 *          http://vimeo.com/40648169
 *          http://vimeo.com/channels/staffpicks/38843628
 *          http://vimeo.com/groups/surrealism/videos/36516384
 *          http://player.vimeo.com/video/45074303
 *      Metacafe
 *          http://www.metacafe.com/watch/7635964/dr_seuss_the_lorax_movie_trailer/
 *          http://www.metacafe.com/watch/7635964/
 *      Dailymotion
 *          http://www.dailymotion.com/video/xoytqh_dr-seuss-the-lorax-premiere_people
 *      Twitvid
 *          http://twitvid.com/QY7MD
 *      Twitpic
 *          http://twitpic.com/7p93st
 *      Instagram
 *          http://instagr.am/p/IejkuUGxQn/
 *          http://instagram.com/p/IejkuUGxQn/
 *      Google maps
 *          http://maps.google.com/maps?q=Eiffel+Tower,+Avenue+Gustave+Eiffel,+Paris,+France&t=h&z=17
 *          http://maps.google.com/?ll=48.857995,2.294297&spn=0.007666,0.021136&t=m&z=16
 *          http://maps.google.com/?ll=48.859463,2.292626&spn=0.000965,0.002642&t=m&z=19&layer=c&cbll=48.859524,2.292532&panoid=YJ0lq28OOy3VT2IqIuVY0g&cbp=12,151.58,,0,-15.56
 */
(function(n){"use strict";var t=n.fancybox,i=function(t,i,r){return r=r||"",n.type(r)==="object"&&(r=n.param(r,!0)),n.each(i,function(n,i){t=t.replace("$"+n,i||"")}),r.length&&(t+=(t.indexOf("?")>0?"&":"?")+r),t};t.helpers.media={defaults:{skyfish:{matcher:/(?:player.skyfish.com)\/(?:[^\d]+)?(\d+)(?:.*)/,type:"iframe",url:"//$0"},twentythree:{matcher:/^[^-]*(?:23video(?:pro)?.com)\/(?:[^\d]+)?(\d+)(?:.*)/,type:"iframe",url:"$0"},youtube:{matcher:/(youtube\.com|youtu\.be|youtube-nocookie\.com)\/(watch\?v=|v\/|u\/|embed\/?)?(videoseries\?list=(.*)|[\w-]{11}|\?listType=(.*)&list=(.*)).*/i,params:{autoplay:1,autohide:1,fs:1,rel:0,hd:1,wmode:"opaque",enablejsapi:1},type:"iframe",url:"//www.youtube.com/embed/$3"},vimeo:{matcher:/(?:vimeo(?:pro)?.com)\/(?:[^\d]+)?(\d+)(?:.*)/,params:{autoplay:1,hd:1,show_title:1,show_byline:1,show_portrait:0,fullscreen:1},type:"iframe",url:"//player.vimeo.com/video/$1"},metacafe:{matcher:/metacafe.com\/(?:watch|fplayer)\/([\w\-]{1,10})/,params:{autoPlay:"yes"},type:"swf",url:function(t,i,r){return r.swf.flashVars="playerVars="+n.param(i,!0),"//www.metacafe.com/fplayer/"+t[1]+"/.swf"}},dailymotion:{matcher:/dailymotion.com\/video\/(.*)\/?(.*)/,params:{additionalInfos:0,autoStart:1},type:"swf",url:"//www.dailymotion.com/swf/video/$1"},twitvid:{matcher:/twitvid\.com\/([a-zA-Z0-9_\-\?\=]+)/i,params:{autoplay:0},type:"iframe",url:"//www.twitvid.com/embed.php?guid=$1"},twitpic:{matcher:/twitpic\.com\/(?!(?:place|photos|events)\/)([a-zA-Z0-9\?\=\-]+)/i,type:"image",url:"//twitpic.com/show/full/$1/"},instagram:{matcher:/(instagr\.am|instagram\.com)\/p\/([a-zA-Z0-9_\-]+)\/?/i,type:"image",url:"//$1/p/$2/media/?size=l"},google_maps:{matcher:/maps\.google\.([a-z]{2,3}(\.[a-z]{2})?)\/(\?ll=|maps\?)(.*)/i,type:"iframe",url:function(n){return"//maps.google."+n[1]+"/"+n[3]+""+n[4]+"&output="+(n[4].indexOf("layer=c")>0?"svembed":"embed")}}},beforeLoad:function(t,r){var o=r.href||"",s=!1,f,u,e,h;for(f in t)if(t.hasOwnProperty(f)&&(u=t[f],e=o.match(u.matcher),e)){s=u.type;h=n.extend(!0,{},u.params,r[f]||(n.isPlainObject(t[f])?t[f].params:null));o=n.type(u.url)==="function"?u.url.call(this,e,h,r):i(u.url,e,h);break}s&&(r.href=o,r.type=s,r.autoHeight=!1)}}})(jQuery);
/*!
 * Thumbnail helper for fancyBox
 * version: 1.0.7 (Mon, 01 Oct 2012)
 * @requires fancyBox v2.0 or later
 *
 * Usage:
 *     $(".fancybox").fancybox({
 *         helpers : {
 *             thumbs: {
 *                 width  : 50,
 *                 height : 50
 *             }
 *         }
 *     });
 *
 */
(function(n){var t=n.fancybox;t.helpers.thumbs={defaults:{width:50,height:50,position:"bottom",source:function(t){var i;return t.element&&(i=n(t.element).find("img").attr("src")),!i&&t.type==="image"&&t.href&&(i=t.href),i}},wrap:null,list:null,width:0,init:function(t,i){for(var o=this,r=t.width,u=t.height,s=t.source,e="",f=0;f<i.group.length;f++)e+='<li><a style="width:'+r+"px;height:"+u+'px;" href="javascript:jQuery.fancybox.jumpto('+f+');"><\/a><\/li>';this.wrap=n('<div id="fancybox-thumbs"><\/div>').addClass(t.position).appendTo("body");this.list=n("<ul>"+e+"<\/ul>").appendTo(this.wrap);n.each(i.group,function(t){var f=s(i.group[t]);f&&n("<img />").load(function(){var i=this.width,f=this.height,e,s,h;o.list&&i&&f&&(e=i/r,s=f/u,h=o.list.children().eq(t).find("a"),e>=1&&s>=1&&(e>s?(i=Math.floor(i/s),f=u):(i=r,f=Math.floor(f/e))),n(this).css({width:i,height:f,top:Math.floor(u/2-f/2),left:Math.floor(r/2-i/2)}),h.width(r).height(u),n(this).hide().appendTo(h).fadeIn(300))}).attr("src",f)});this.width=this.list.children().eq(0).outerWidth(!0);this.list.width(this.width*(i.group.length+1)).css("left",Math.floor(n(window).width()*.5-(i.index*this.width+this.width*.5)))},beforeLoad:function(n,t){if(t.group.length<2){t.helpers.thumbs=!1;return}t.margin[n.position==="top"?0:2]+=n.height+15},afterShow:function(n,t){if(this.list)this.onUpdate(n,t);else this.init(n,t);this.list.children().removeClass("active").eq(t.index).addClass("active")},onUpdate:function(t,i){this.list&&this.list.stop(!0).animate({left:Math.floor(n(window).width()*.5-(i.index*this.width+this.width*.5))},150)},beforeClose:function(){this.wrap&&this.wrap.remove();this.wrap=null;this.list=null;this.width=0}}})(jQuery);jQuery.easing.jswing=jQuery.easing.swing;jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(n,t,i,r,u){return jQuery.easing[jQuery.easing.def](n,t,i,r,u)},easeInQuad:function(n,t,i,r,u){return r*(t/=u)*t+i},easeOutQuad:function(n,t,i,r,u){return-r*(t/=u)*(t-2)+i},easeInOutQuad:function(n,t,i,r,u){return(t/=u/2)<1?r/2*t*t+i:-r/2*(--t*(t-2)-1)+i},easeInCubic:function(n,t,i,r,u){return r*(t/=u)*t*t+i},easeOutCubic:function(n,t,i,r,u){return r*((t=t/u-1)*t*t+1)+i},easeInOutCubic:function(n,t,i,r,u){return(t/=u/2)<1?r/2*t*t*t+i:r/2*((t-=2)*t*t+2)+i},easeInQuart:function(n,t,i,r,u){return r*(t/=u)*t*t*t+i},easeOutQuart:function(n,t,i,r,u){return-r*((t=t/u-1)*t*t*t-1)+i},easeInOutQuart:function(n,t,i,r,u){return(t/=u/2)<1?r/2*t*t*t*t+i:-r/2*((t-=2)*t*t*t-2)+i},easeInQuint:function(n,t,i,r,u){return r*(t/=u)*t*t*t*t+i},easeOutQuint:function(n,t,i,r,u){return r*((t=t/u-1)*t*t*t*t+1)+i},easeInOutQuint:function(n,t,i,r,u){return(t/=u/2)<1?r/2*t*t*t*t*t+i:r/2*((t-=2)*t*t*t*t+2)+i},easeInSine:function(n,t,i,r,u){return-r*Math.cos(t/u*(Math.PI/2))+r+i},easeOutSine:function(n,t,i,r,u){return r*Math.sin(t/u*(Math.PI/2))+i},easeInOutSine:function(n,t,i,r,u){return-r/2*(Math.cos(Math.PI*t/u)-1)+i},easeInExpo:function(n,t,i,r,u){return t==0?i:r*Math.pow(2,10*(t/u-1))+i},easeOutExpo:function(n,t,i,r,u){return t==u?i+r:r*(-Math.pow(2,-10*t/u)+1)+i},easeInOutExpo:function(n,t,i,r,u){return t==0?i:t==u?i+r:(t/=u/2)<1?r/2*Math.pow(2,10*(t-1))+i:r/2*(-Math.pow(2,-10*--t)+2)+i},easeInCirc:function(n,t,i,r,u){return-r*(Math.sqrt(1-(t/=u)*t)-1)+i},easeOutCirc:function(n,t,i,r,u){return r*Math.sqrt(1-(t=t/u-1)*t)+i},easeInOutCirc:function(n,t,i,r,u){return(t/=u/2)<1?-r/2*(Math.sqrt(1-t*t)-1)+i:r/2*(Math.sqrt(1-(t-=2)*t)+1)+i},easeInElastic:function(n,t,i,r,u){var o=1.70158,f=0,e=r;return t==0?i:(t/=u)==1?i+r:(f||(f=u*.3),e<Math.abs(r)?(e=r,o=f/4):o=f/(2*Math.PI)*Math.asin(r/e),-(e*Math.pow(2,10*(t-=1))*Math.sin((t*u-o)*2*Math.PI/f))+i)},easeOutElastic:function(n,t,i,r,u){var o=1.70158,f=0,e=r;return t==0?i:(t/=u)==1?i+r:(f||(f=u*.3),e<Math.abs(r)?(e=r,o=f/4):o=f/(2*Math.PI)*Math.asin(r/e),e*Math.pow(2,-10*t)*Math.sin((t*u-o)*2*Math.PI/f)+r+i)},easeInOutElastic:function(n,t,i,r,u){var o=1.70158,f=0,e=r;return t==0?i:(t/=u/2)==2?i+r:(f||(f=u*.3*1.5),e<Math.abs(r)?(e=r,o=f/4):o=f/(2*Math.PI)*Math.asin(r/e),t<1)?-.5*e*Math.pow(2,10*(t-=1))*Math.sin((t*u-o)*2*Math.PI/f)+i:e*Math.pow(2,-10*(t-=1))*Math.sin((t*u-o)*2*Math.PI/f)*.5+r+i},easeInBack:function(n,t,i,r,u,f){return f==undefined&&(f=1.70158),r*(t/=u)*t*((f+1)*t-f)+i},easeOutBack:function(n,t,i,r,u,f){return f==undefined&&(f=1.70158),r*((t=t/u-1)*t*((f+1)*t+f)+1)+i},easeInOutBack:function(n,t,i,r,u,f){return(f==undefined&&(f=1.70158),(t/=u/2)<1)?r/2*t*t*(((f*=1.525)+1)*t-f)+i:r/2*((t-=2)*t*(((f*=1.525)+1)*t+f)+2)+i},easeInBounce:function(n,t,i,r,u){return r-jQuery.easing.easeOutBounce(n,u-t,0,r,u)+i},easeOutBounce:function(n,t,i,r,u){return(t/=u)<1/2.75?r*7.5625*t*t+i:t<2/2.75?r*(7.5625*(t-=1.5/2.75)*t+.75)+i:t<2.5/2.75?r*(7.5625*(t-=2.25/2.75)*t+.9375)+i:r*(7.5625*(t-=2.625/2.75)*t+.984375)+i},easeInOutBounce:function(n,t,i,r,u){return t<u/2?jQuery.easing.easeInBounce(n,t*2,0,r,u)*.5+i:jQuery.easing.easeOutBounce(n,t*2-u,0,r,u)*.5+r*.5+i}}),function(n){"use strict";function i(){return window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop}function r(){var t=window.innerHeight,i;return t?t:(i=document.compatMode,(i||!n.support.boxModel)&&(t=i==="CSS1Compat"?document.documentElement.clientHeight:document.body.clientHeight),t)}function u(n){for(var i=0,t=n;t;t=t.offsetParent)i+=t.offsetTop;return i}function t(){var t=i(),f=t+r();n(".module").each(function(){var i=n(this),r=u(this),v=i.height(),e=r+v,s=i.data("inview")||!1,h=i.data("offset")||0,c=r>=t&&e<=f,l=e+h>=t&&r<=t,a=r-h<=f&&e>=f,y=c||l||a||r<=t&&e>=f,o;y?(o=a?"top":l?"bottom":"both",s&&s===o||(i.data("inview",o),i.trigger("inview",[!0,o]))):!c&&s&&(i.data("inview",!1),i.trigger("inview",[!1]))})}n(window).scroll(t);n(function(){t()})}(jQuery);
/*!
 * jQuery.ScrollTo
 * Copyright (c) 2007-2014 Ariel Flesler - aflesler<a>gmail<d>com | http://flesler.blogspot.com
 * Licensed under MIT
 * http://flesler.blogspot.com/2007/10/jqueryscrollto.html
 * @projectDescription Easy element scrolling using jQuery.
 * @author Ariel Flesler
 * @version 1.4.12
 */
(function(n){typeof define=="function"&&define.amd?define(["jquery"],n):n(jQuery)})(function(n){function i(t){return n.isFunction(t)||typeof t=="object"?t:{top:t,left:t}}var t=n.scrollTo=function(t,i,r){return n(window).scrollTo(t,i,r)};return t.defaults={axis:"xy",duration:parseFloat(n.fn.jquery)>=1.3?0:1,limit:!0},t.window=function(){return n(window)._scrollable()},n.fn._scrollable=function(){return this.map(function(){var t=this,r=!t.nodeName||n.inArray(t.nodeName.toLowerCase(),["iframe","#document","html","body"])!=-1,i;return r?(i=(t.contentWindow||t).document||t.ownerDocument||t,/webkit/i.test(navigator.userAgent)||i.compatMode=="BackCompat"?i.body:i.documentElement):t})},n.fn.scrollTo=function(r,u,f){return typeof u=="object"&&(f=u,u=0),typeof f=="function"&&(f={onAfter:f}),r=="max"&&(r=9e9),f=n.extend({},t.defaults,f),u=u||f.duration,f.queue=f.queue&&f.axis.length>1,f.queue&&(u/=2),f.offset=i(f.offset),f.over=i(f.over),this._scrollable().each(function(){function v(n){h.animate(o,u,f.easing,n&&function(){n.call(this,e,f)})}var a;if(r!=null){var s=this,h=n(s),e=r,c,o={},l=h.is("html,body");switch(typeof e){case"number":case"string":if(/^([+-]=?)?\d+(\.\d+)?(px|%)?$/.test(e)){e=i(e);break}if(e=l?n(e):n(e,this),!e.length)return;case"object":(e.is||e.style)&&(c=(e=n(e)).offset())}a=n.isFunction(f.offset)&&f.offset(s,e)||f.offset;n.each(f.axis.split(""),function(n,i){var p=i=="x"?"Left":"Top",u=p.toLowerCase(),r="scroll"+p,w=s[r],b=t.max(s,i),y;c?(o[r]=c[u]+(l?0:w-h.offset()[u]),f.margin&&(o[r]-=parseInt(e.css("margin"+p))||0,o[r]-=parseInt(e.css("border"+p+"Width"))||0),o[r]+=a[u]||0,f.over[u]&&(o[r]+=e[i=="x"?"width":"height"]()*f.over[u])):(y=e[u],o[r]=y.slice&&y.slice(-1)=="%"?parseFloat(y)/100*b:y);f.limit&&/^\d+$/.test(o[r])&&(o[r]=o[r]<=0?0:Math.min(o[r],b));!n&&f.queue&&(w!=o[r]&&v(f.onAfterFirst),delete o[r])});v(f.onAfter)}}).end()},t.max=function(t,i){var r=i=="x"?"Width":"Height",u="scroll"+r;if(!n(t).is("html,body"))return t[u]-n(t)[r.toLowerCase()]();var f="client"+r,e=t.ownerDocument.documentElement,o=t.ownerDocument.body;return Math.max(e[u],o[u])-Math.min(e[f],o[f])},t});
/*!
 * jQuery throttle / debounce - v1.1 - 3/7/2010
 * http://benalman.com/projects/jquery-throttle-debounce-plugin/
 * 
 * Copyright (c) 2010 "Cowboy" Ben Alman
 * Dual licensed under the MIT and GPL licenses.
 * http://benalman.com/about/license/
 */
(function(n,t){var $=n.jQuery||n.Cowboy||(n.Cowboy={}),i;$.throttle=i=function(n,i,r,u){function o(){function o(){e=+new Date;r.apply(h,c)}function l(){f=t}var h=this,s=+new Date-e,c=arguments;u&&!f&&o();f&&clearTimeout(f);u===t&&s>n?o():i!==!0&&(f=setTimeout(u?l:o,u===t?n-s:n))}var f,e=0;return typeof i!="boolean"&&(u=r,r=i,i=t),$.guid&&(o.guid=r.guid=r.guid||$.guid++),o};$.debounce=function(n,r,u){return u===t?i(n,r,!1):i(n,u,r!==!1)}})(this),function(n,t,i){var u=function(){for(var i,n=/audio(.min)?.js.*/,r=document.getElementsByTagName("script"),t=0,u=r.length;t<u;t++)if(i=r[t].getAttribute("src"),n.test(i))return n=i.split("/"),n.pop(),n.join("/")+"/";return""}(),r;i[n]={instanceCount:0,instances:{},flashSource:'      <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="$1" width="1" height="1" name="$1" style="position: absolute; left: -1px;">         <param name="movie" value="$2?playerInstance='+n+'.instances[\'$1\']&datetime=$3">         <param name="allowscriptaccess" value="always">         <embed name="$1" src="$2?playerInstance='+n+'.instances[\'$1\']&datetime=$3" width="1" height="1" allowscriptaccess="always">       <\/object>',settings:{autoplay:!1,loop:!1,preload:!0,imageLocation:u+"player-graphics.gif",retinaImageLocation:u+"player-graphics@2x.gif",swfLocation:u+"audiojs.swf",useFlash:function(){var n=document.createElement("audio");return!(n.canPlayType&&n.canPlayType("audio/mpeg;").replace(/no/,""))}(),hasFlash:function(){if(navigator.plugins&&navigator.plugins.length&&navigator.plugins["Shockwave Flash"])return!0;if(navigator.mimeTypes&&navigator.mimeTypes.length){var n=navigator.mimeTypes["application/x-shockwave-flash"];return n&&n.enabledPlugin}try{return new ActiveXObject("ShockwaveFlash.ShockwaveFlash"),!0}catch(t){}return!1}(),createPlayer:{markup:'          <div class="play-pause">             <p role="button" tabindex="0" aria-label="play" class="play"><\/p>             <p role="button" tabindex="0" aria-label="pause" class="pause"><\/p>             <p class="loading" aria-label="loading"><\/p>             <p class="error" aria-label="error"><\/p>           <\/div>           <div class="scrubber" role="slider" tabindex="0" aria-valuemin="0" aria-valuenow="0" aria-valuemax="0" aria-label="seek">             <div class="progress"><\/div>             <div class="loaded"><\/div>           <\/div>           <div class="time">             <em class="played">00:00<\/em>/<strong class="duration">00:00<\/strong>           <\/div>           <div class="error-message"><\/div>',playPauseClass:"play-pause",scrubberClass:"scrubber",progressClass:"progress",loaderClass:"loaded",timeClass:"time",durationClass:"duration",playedClass:"played",errorMessageClass:"error-message",playingClass:"playing",loadingClass:"loading",errorClass:"error"},css:'        .audiojs audio { position: absolute; left: -1px; }         .audiojs { width: 460px; height: 36px; background: #404040; overflow: hidden; font-family: monospace; font-size: 12px;           background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #444), color-stop(0.5, #555), color-stop(0.51, #444), color-stop(1, #444));           background-image: -moz-linear-gradient(center top, #444 0%, #555 50%, #444 51%, #444 100%);           -webkit-box-shadow: 1px 1px 8px rgba(0, 0, 0, 0.3); -moz-box-shadow: 1px 1px 8px rgba(0, 0, 0, 0.3);           -o-box-shadow: 1px 1px 8px rgba(0, 0, 0, 0.3); box-shadow: 1px 1px 8px rgba(0, 0, 0, 0.3); }         .audiojs .play-pause { width: 25px; height: 25px; padding: 4px 6px; margin: 0px; float: left; overflow: hidden; border-right: 1px solid #000; }         .audiojs p { display: none; width: 25px; height: 25px; margin: 0px; cursor: pointer; outline: none; }         .audiojs p:focus { outline: 2px solid white; }         .audiojs p:hover:focus { outline: none; }         .audiojs .play { display: block; }         .audiojs .scrubber { position: relative; float: left; width: 280px; background: #5a5a5a; height: 14px; margin: 10px; border-top: 1px solid #3f3f3f; border-left: 0px; border-bottom: 0px; overflow: hidden; outline: none }         .audiojs .scrubber:focus { outline: 2px solid white }         .audiojs .scrubber:hover:focus { outline: none; }         .audiojs .progress { position: absolute; top: 0px; left: 0px; height: 14px; width: 0px; background: #ccc; z-index: 1;           background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #ccc), color-stop(0.5, #ddd), color-stop(0.51, #ccc), color-stop(1, #ccc));           background-image: -moz-linear-gradient(center top, #ccc 0%, #ddd 50%, #ccc 51%, #ccc 100%); }         .audiojs .loaded { position: absolute; top: 0px; left: 0px; height: 14px; width: 0px; background: #000;           background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #222), color-stop(0.5, #333), color-stop(0.51, #222), color-stop(1, #222));           background-image: -moz-linear-gradient(center top, #222 0%, #333 50%, #222 51%, #222 100%); }         .audiojs .time { float: left; height: 36px; line-height: 36px; margin: 0px 0px 0px 6px; padding: 0px 6px 0px 12px; border-left: 1px solid #000; color: #ddd; text-shadow: 1px 1px 0px rgba(0, 0, 0, 0.5); }         .audiojs .time em { padding: 0px 2px 0px 0px; color: #f9f9f9; font-style: normal; }         .audiojs .time strong { padding: 0px 0px 0px 2px; font-weight: normal; }         .audiojs .error-message { float: left; display: none; margin: 0px 10px; height: 36px; width: 400px; overflow: hidden; line-height: 36px; white-space: nowrap; color: #fff;           text-overflow: ellipsis; -o-text-overflow: ellipsis; -icab-text-overflow: ellipsis; -khtml-text-overflow: ellipsis; -moz-text-overflow: ellipsis; -webkit-text-overflow: ellipsis; }         .audiojs .error-message a { color: #eee; text-decoration: none; padding-bottom: 1px; border-bottom: 1px solid #999; white-space: wrap; }                 .audiojs .play { background: url("$1") -2px -1px no-repeat; }         .audiojs .loading { background: url("$1") -2px -31px no-repeat; }         .audiojs .error { background: url("$1") -2px -61px no-repeat; }         .audiojs .pause { background: url("$1") -2px -91px no-repeat; }                 @media only screen and (-webkit-min-device-pixel-ratio: 2),           only screen and (min--moz-device-pixel-ratio: 2),           only screen and (min-moz-device-pixel-ratio: 2),           only screen and (-o-min-device-pixel-ratio: 2/1),           only screen and (min-device-pixel-ratio: 2) {             .audiojs .play, .audiojs .loading, .audiojs .error, .audiojs .pause {               background-image: url("$2");               -webkit-background-size: 30px 120px;               -moz-background-size: 30px 120px;               -o-background-size: 30px 120px;               background-size: 30px 120px;             }         }                 .playing .play, .playing .loading, .playing .error { display: none; }         .playing .pause { display: block; }                 .loading .play, .loading .pause, .loading .error { display: none; }         .loading .loading { display: block; }                 .error .time, .error .play, .error .pause, .error .scrubber, .error .loading { display: none; }         .error .error { display: block; }         .error .play-pause p { cursor: auto; }         .error .error-message { display: block; }',trackEnded:function(){},flashError:function(){var t=this.settings.createPlayer,f=r(t.errorMessageClass,this.wrapper),u='Missing <a href="http://get.adobe.com/flashplayer/">flash player<\/a> plugin.';this.mp3&&(u+=' <a href="'+this.mp3+'">Download audio file<\/a>.');i[n].helpers.removeClass(this.wrapper,t.loadingClass);i[n].helpers.addClass(this.wrapper,t.errorClass);f.innerHTML=u},loadError:function(t){t=this.settings.createPlayer;var u=r(t.errorMessageClass,this.wrapper);i[n].helpers.removeClass(this.wrapper,t.loadingClass);i[n].helpers.addClass(this.wrapper,t.errorClass);u.innerHTML='Error loading: "'+this.mp3+'"'},init:function(){i[n].helpers.addClass(this.wrapper,this.settings.createPlayer.loadingClass)},loadStarted:function(){var t=this.settings.createPlayer,e=r(t.durationClass,this.wrapper),o=r(t.scrubberClass,this.wrapper),u=Math.floor(this.duration/60),f=Math.floor(this.duration%60);i[n].helpers.removeClass(this.wrapper,t.loadingClass);e.innerHTML=(10>u?"0":"")+u+":"+(10>f?"0":"")+f;o.setAttribute("aria-valuemax",Math.round(this.duration))},loadProgress:function(n){r(this.settings.createPlayer.loaderClass,this.wrapper).style.width=Math.round(100*n)+"%"},playPause:function(){this.playing?this.settings.play():this.settings.pause()},play:function(){var t=this.settings.createPlayer;i[n].helpers.removeClass(this.wrapper,t.errorClass);i[n].helpers.addClass(this.wrapper,t.playingClass)},pause:function(){i[n].helpers.removeClass(this.wrapper,this.settings.createPlayer.playingClass)},updatePlayhead:function(n){var t=this.settings.createPlayer,i=r(t.progressClass,this.wrapper),f=r(t.scrubberClass,this.wrapper),u;i.style.width=Math.round(100*n)+"%";t=r(t.playedClass,this.wrapper);n*=this.duration;i=Math.floor(n/60);u=Math.floor(n%60);t.innerHTML=(10>i?"0":"")+i+":"+(10>u?"0":"")+u;t=Math.round(n);0==t%5&&f.setAttribute("aria-valuenow",t)}},create:function(n,t){return t=t||{},n.length?this.createAll(t,n):this.newInstance(n,t)},createAll:function(n,t){var r,i,u;for(t=t||document.getElementsByTagName("audio"),r=[],n=n||{},i=0,u=t.length;i<u;i++)-1<(" "+t[i].parentNode.className+" ").replace(/[\n\t]/g," ").indexOf(" audiojs ")||r.push(this.newInstance(t[i],n));return r},newInstance:function(n,r){var u=this.helpers.clone(this.settings),f="audiojs"+this.instanceCount,e="audiojs_wrapper"+this.instanceCount;return this.instanceCount++,null!=n.getAttribute("autoplay")&&(u.autoplay=!0),null!=n.getAttribute("loop")&&(u.loop=!0),"none"==n.getAttribute("preload")&&(u.preload=!1),r&&this.helpers.merge(u,r),u.createPlayer.markup?n=this.createPlayer(n,u.createPlayer,e):n.parentNode.setAttribute("id",e),n=new i[t](n,u),u.css&&this.helpers.injectCss(n,u.css),u.useFlash&&u.hasFlash?(this.injectFlash(n,f),this.attachFlashEvents(n.wrapper,n)):u.useFlash&&!u.hasFlash&&u.flashError.apply(n),(!u.useFlash||u.useFlash&&u.hasFlash)&&this.attachEvents(n.wrapper,n),this.instances[f]=n},createPlayer:function(n,t,i){var r=document.createElement("div"),u=n.cloneNode(!0);return r.setAttribute("class","audiojs"),r.setAttribute("className","audiojs"),r.setAttribute("id",i),u.outerHTML&&!document.createElement("audio").canPlayType?(u=this.helpers.cloneHtml5Node(n),r.innerHTML=t.markup,r.appendChild(u),n.outerHTML=r.outerHTML,r=document.getElementById(i)):(r.appendChild(u),r.innerHTML+=t.markup,n.parentNode.replaceChild(r,n)),r.getElementsByTagName("audio")[0]},attachEvents:function(t,u){if(u.settings.createPlayer){var e=u.settings.createPlayer,o=r(e.playPauseClass,t),s=r(e.progressClass,t),f=r(e.scrubberClass,t);i[n].events.addListener(o,"click",function(){u.playPause.apply(u)});i[n].events.addListener(o,"keydown",function(n){var t=!1;(32===n.keyCode||13===n.keyCode)&&(u.playPause.apply(u),t=!0);t&&(n.preventDefault(),n.stopPropagation())});i[n].events.addListener(f,"click",function(n){n=n.clientX-this.getBoundingClientRect().left;u.skipTo(n/f.offsetWidth)});i[n].events.addListener(f,"keydown",function(n){var i=s.offsetWidth,t=!1;switch(n.keyCode){case 34:case 37:case 40:u.skipTo((i-5)/f.offsetWidth);t=!0;break;case 33:case 39:case 38:u.skipTo((i+5)/f.offsetWidth);t=!0}t&&(n.preventDefault(),n.stopPropagation())});u.settings.useFlash||(i[n].events.trackLoadProgress(u),i[n].events.addListener(u.element,"timeupdate",function(){u.updatePlayhead.apply(u)}),i[n].events.addListener(u.element,"ended",function(){u.trackEnded.apply(u)}),i[n].events.addListener(u.source,"error",function(){clearInterval(u.readyTimer);clearInterval(u.loadTimer);u.settings.loadError.apply(u)}))}},attachFlashEvents:function(n,t){t.swfReady=!1;t.load=function(n){t.mp3=n;t.swfReady&&t.element.load(n)};t.loadProgress=function(n,i){t.loadedPercent=n;t.duration=i;t.settings.loadStarted.apply(t);t.settings.loadProgress.apply(t,[n])};t.skipTo=function(n){n>t.loadedPercent||(t.updatePlayhead.call(t,[n]),t.element.skipTo(n))};t.updatePlayhead=function(n){t.settings.updatePlayhead.apply(t,[n])};t.play=function(){t.settings.preload||(t.settings.preload=!0,t.element.init(t.mp3));t.playing=!0;t.element.pplay();t.settings.play.apply(t)};t.pause=function(){t.playing=!1;t.element.ppause();t.settings.pause.apply(t)};t.setVolume=function(n){t.element.setVolume(n)};t.loadStarted=function(){t.swfReady=!0;t.settings.preload&&t.element.init(t.mp3);t.settings.autoplay&&t.play.apply(t)}},injectFlash:function(n,t){var i=this.flashSource.replace(/\$1/g,t),u,r;i=i.replace(/\$2/g,n.settings.swfLocation);i=i.replace(/\$3/g,+new Date+Math.random());u=n.wrapper.innerHTML;r=document.createElement("div");r.innerHTML=i+u;n.wrapper.innerHTML=r.innerHTML;n.element=this.helpers.getSwf(t)},helpers:{merge:function(n,t){for(attr in t)(n.hasOwnProperty(attr)||t.hasOwnProperty(attr))&&(n[attr]=t[attr])},clone:function(n){if(null==n||"object"!=typeof n)return n;var t=new n.constructor;for(var i in n)t[i]=arguments.callee(n[i]);return t},addClass:function(n,t){new RegExp("(\\s|^)"+t+"(\\s|$)").test(n.className)||(n.className+=" "+t)},removeClass:function(n,t){n.className=n.className.replace(new RegExp("(\\s|^)"+t+"(\\s|$)")," ")},injectCss:function(n,t){var u="",r=document.getElementsByTagName("style"),i,f;for(t=t.replace(/\$1/g,n.settings.imageLocation),t=t.replace(/\$2/g,n.settings.retinaImageLocation),n=0,i=r.length;n<i;n++)if(f=r[n].getAttribute("title"),f&&~f.indexOf("audiojs")){if(i=r[n],i.innerHTML===t)return;u=i.innerHTML;break}r=document.getElementsByTagName("head")[0];n=r.firstChild;i=document.createElement("style");r&&(i.setAttribute("type","text/css"),i.setAttribute("title","audiojs"),i.styleSheet?i.styleSheet.cssText=u+t:i.appendChild(document.createTextNode(u+t)),n?r.insertBefore(i,n):r.appendChild(i))},cloneHtml5Node:function(n){var i=document.createDocumentFragment(),t=i.createElement?i:document;return t.createElement("audio"),t=t.createElement("div"),i.appendChild(t),t.innerHTML=n.outerHTML,t.firstChild},getSwf:function(n){return n=document[n]||window[n],1<n.length?n[n.length-1]:n}},events:{memoryLeaking:!1,listeners:[],addListener:function(t,r,u){t.addEventListener?t.addEventListener(r,u,!1):t.attachEvent&&(this.listeners.push(t),this.memoryLeaking||(window.attachEvent("onunload",function(){if(this.listeners)for(var t=0,r=this.listeners.length;t<r;t++)i[n].events.purge(this.listeners[t])}),this.memoryLeaking=!0),t.attachEvent("on"+r,function(){u.call(t,window.event)}))},trackLoadProgress:function(n){if(n.settings.preload){var t,r=/(ipod|iphone|ipad)/i.test(navigator.userAgent),i=setInterval(function(){-1<n.element.readyState&&(r||n.init.apply(n));1<n.element.readyState&&(n.settings.autoplay&&n.play.apply(n),clearInterval(i),t=setInterval(function(){n.loadProgress.apply(n);1<=n.loadedPercent&&clearInterval(t)},200));n.loadStartedCalled||n.loadStarted()},20);n.readyTimer=i;n.loadTimer=t}},purge:function(n){var i=n.attributes,t;if(i)for(t=0;t<i.length;t+=1)"function"==typeof n[i[t].name]&&(n[i[t].name]=null);if(i=n.childNodes)for(t=0;t<i.length;t+=1)purge(n.childNodes[t])},ready:function(){return function(n){var i=window,e=!1,o=!0,t=i.document,s=t.documentElement,f=t.addEventListener?"addEventListener":"attachEvent",c=t.addEventListener?"removeEventListener":"detachEvent",u=t.addEventListener?"":"on",r=function(f){("readystatechange"!=f.type||"complete"==t.readyState)&&(("load"==f.type?i:t)[c](u+f.type,r,!1),!e&&(e=!0)&&n.call(i,f.type||f))},h=function(){try{s.doScroll("left")}catch(n){setTimeout(h,50);return}r("poll")};if("complete"==t.readyState)n.call(i,"lazy");else{if(t.createEventObject&&s.doScroll){try{o=!i.frameElement}catch(l){}o&&h()}t[f](u+"DOMContentLoaded",r,!1);t[f](u+"readystatechange",r,!1);i[f](u+"load",r,!1)}}}()}};i[t]=function(n,t){this.element=n;this.wrapper=n.parentNode;this.source=n.getElementsByTagName("source")[0]||n;var i=n.getElementsByTagName("source")[0];this.mp3=n.getAttribute("src")||(i?i.getAttribute("src"):null);this.settings=t;this.loadStartedCalled=!1;this.loadedPercent=0;this.duration=1;this.playing=!1};i[t].prototype={updatePlayhead:function(){this.settings.updatePlayhead.apply(this,[this.element.currentTime/this.duration])},skipTo:function(n){n>this.loadedPercent||(this.element.currentTime=this.duration*n,this.updatePlayhead())},load:function(t){this.loadStartedCalled=!1;this.source.setAttribute("src",t);this.element.load();this.mp3=t;i[n].events.trackLoadProgress(this)},loadError:function(){this.settings.loadError.apply(this)},init:function(){this.settings.init.apply(this)},loadStarted:function(){if(!this.element.duration)return!1;this.duration=this.element.duration;this.updatePlayhead();this.settings.loadStarted.apply(this)},loadProgress:function(){null!=this.element.buffered&&this.element.buffered.length&&(this.loadStartedCalled||(this.loadStartedCalled=this.loadStarted()),this.loadedPercent=this.element.buffered.end(this.element.buffered.length-1)/this.duration,this.settings.loadProgress.apply(this,[this.loadedPercent]))},playPause:function(){this.playing?this.pause():this.play()},play:function(){/(ipod|iphone|ipad)/i.test(navigator.userAgent)&&0==this.element.readyState&&this.init.apply(this);this.settings.preload||(this.settings.preload=!0,this.element.setAttribute("preload","auto"),i[n].events.trackLoadProgress(this));this.playing=!0;this.element.play();this.settings.play.apply(this)},pause:function(){this.playing=!1;this.element.pause();this.settings.pause.apply(this)},setVolume:function(n){this.element.volume=n},trackEnded:function(){this.skipTo.apply(this,[0]);this.settings.loop||this.pause.apply(this);this.settings.trackEnded.apply(this)}};r=function(n,t){var i=[],r,u;if(t=t||document,t.getElementsByClassName)i=t.getElementsByClassName(n);else for(t=t.getElementsByTagName("*"),u=new RegExp("(^|\\s)"+n+"(\\s|$)"),n=0,r=t.length;n<r;n++)u.test(t[n].className)&&i.push(t[n]);return 1<i.length?i:i[0]}}("audiojs","audiojsInstance",this);!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?t():"function"==typeof define&&define.amd?define(t):t()}(0,function(){"use strict";"undefined"!=typeof document&&function(n){function i(){t||(t=!0,n())}var t;["interactive","complete"].indexOf(document.readyState)>=0?n():(t=!1,document.addEventListener("DOMContentLoaded",i,!1),window.addEventListener("load",i,!1))}(function(){function u(n){return!!(n&&n!==document&&"HTML"!==n.nodeName&&"BODY"!==n.nodeName&&"classList"in n&&"contains"in n.classList)}function e(n){n.classList.contains("focus-visible")||(n.classList.add("focus-visible"),n.setAttribute("data-focus-visible-added",""))}function f(){t=!1}function o(){document.addEventListener("mousemove",n);document.addEventListener("mousedown",n);document.addEventListener("mouseup",n);document.addEventListener("pointermove",n);document.addEventListener("pointerdown",n);document.addEventListener("pointerup",n);document.addEventListener("touchmove",n);document.addEventListener("touchstart",n);document.addEventListener("touchend",n)}function n(i){"html"!==i.target.nodeName.toLowerCase()&&(t=!1,document.removeEventListener("mousemove",n),document.removeEventListener("mousedown",n),document.removeEventListener("mouseup",n),document.removeEventListener("pointermove",n),document.removeEventListener("pointerdown",n),document.removeEventListener("pointerup",n),document.removeEventListener("touchmove",n),document.removeEventListener("touchstart",n),document.removeEventListener("touchend",n))}var t=!0,i=!1,r=null,s={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};document.addEventListener("keydown",function(){u(document.activeElement)&&e(document.activeElement);t=!0},!0);document.addEventListener("mousedown",f,!0);document.addEventListener("pointerdown",f,!0);document.addEventListener("touchstart",f,!0);document.addEventListener("focus",function(n){var i,r,f;u(n.target)&&(t||(i=n.target,r=i.type,"INPUT"==(f=i.tagName)&&s[r]&&!i.readOnly||"TEXTAREA"==f&&!i.readOnly||i.isContentEditable))&&e(n.target)},!0);document.addEventListener("blur",function(n){var t;u(n.target)&&(n.target.classList.contains("focus-visible")||n.target.hasAttribute("data-focus-visible-added"))&&(i=!0,window.clearTimeout(r),r=window.setTimeout(function(){i=!1;window.clearTimeout(r)},100),(t=n.target).hasAttribute("data-focus-visible-added")&&(t.classList.remove("focus-visible"),t.removeAttribute("data-focus-visible-added")))},!0);document.addEventListener("visibilitychange",function(){"hidden"==document.visibilityState&&(i&&(t=!0),o())},!0);o();document.body.classList.add("js-focus-visible")})})