window.Modernizr=function(af,ae,ad){function F(b){W.cssText=b}function E(d,c){return F(T.join(d+";")+(c||""))}function D(d,c){return typeof d===c}function Q(d,c){return !!~(""+d).indexOf(c)}function O(g,c,j){for(var i in g){var h=c[g[i]];if(h!==ad){return j===!1?g[i]:D(h,"function")?h.bind(j||c):h}}return !1}var ac="2.6.0",ab={},aa=!0,Z=ae.documentElement,Y="modernizr",X=ae.createElement(Y),W=X.style,V,U={}.toString,T=" -webkit- -moz- -o- -ms- ".split(" "),S={svg:"http://www.w3.org/2000/svg"},R={},P={},N={},M=[],K=M.slice,J,I=function(t,s,r,q){var p,o,n,h=ae.createElement("div"),g=ae.body,b=g?g:ae.createElement("body");if(parseInt(r,10)){while(r--){n=ae.createElement("div"),n.id=q?q[r]:Y+(r+1),h.appendChild(n)}}return p=["­",'"].join(""),h.id=Y,(g?h:b).innerHTML+=p,b.appendChild(h),g||(b.style.background="",Z.appendChild(b)),o=s(h,t),g?h.parentNode.removeChild(h):b.parentNode.removeChild(b),!!o},H={}.hasOwnProperty,G;!D(H,"undefined")&&!D(H.call,"undefined")?G=function(d,c){return H.call(d,c)}:G=function(d,c){return c in d&&D(d.constructor.prototype[c],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(a){var h=this;if(typeof h!="function"){throw new TypeError}var g=K.call(arguments,1),f=function(){if(this instanceof f){var b=function(){};b.prototype=h.prototype;var d=new b,c=h.apply(d,g.concat(K.call(arguments)));return Object(c)===c?c:d}return h.apply(a,g.concat(K.call(arguments)))};return f}),R.touch=function(){var a;return"ontouchstart" in af||af.DocumentTouch&&ae instanceof DocumentTouch?a=!0:I(["@media (",T.join("touch-enabled),("),Y,")","{#modernizr{top:9px;position:absolute}}"].join(""),function(b){a=b.offsetTop===9}),a},R.svg=function(){return !!ae.createElementNS&&!!ae.createElementNS(S.svg,"svg").createSVGRect},R.inlinesvg=function(){var b=ae.createElement("div");return b.innerHTML="",(b.firstChild&&b.firstChild.namespaceURI)==S.svg},R.svgclippaths=function(){return !!ae.createElementNS&&/SVGClipPath/.test(U.call(ae.createElementNS(S.svg,"clipPath")))};for(var L in R){G(R,L)&&(J=L.toLowerCase(),ab[J]=R[L](),M.push((ab[J]?"":"no-")+J))}return ab.addTest=function(e,c){if(typeof e=="object"){for(var f in e){G(e,f)&&ab.addTest(f,e[f])}}else{e=e.toLowerCase();if(ab[e]!==ad){return ab}c=typeof c=="function"?c():c,aa&&(Z.className+=" "+(c?"":"no-")+e),ab[e]=c}return ab},F(""),X=V=null,function(am,al){function z(f,e){var h=f.createElement("p"),g=f.getElementsByTagName("head")[0]||f.documentElement;return h.innerHTML="x",g.insertBefore(h.lastChild,g.firstChild)}function y(){var b=s.elements;return typeof b=="string"?b.split(" "):b}function x(d){var c=B[d[ag]];return c||(c={},C++,d[ag]=C,B[C]=c),c}function w(b,h,e){h||(h=al);if(A){return h.createElement(b)}e||(e=x(h));var d;return e.cache[b]?d=e.cache[b].cloneNode():ai.test(b)?d=(e.cache[b]=e.createElem(b)).cloneNode():d=e.createElem(b),d.canHaveChildren&&!aj.test(b)?e.frag.appendChild(d):d}function v(b,l){b||(b=al);if(A){return b.createDocumentFragment()}l=l||x(b);var k=l.frag.cloneNode(),j=0,i=y(),h=i.length;for(;j",ah="hidden" in b,A=b.childNodes.length==1||function(){al.createElement("a");var c=al.createDocumentFragment();return typeof c.cloneNode=="undefined"||typeof c.createDocumentFragment=="undefined"||typeof c.createElement=="undefined"}()}catch(d){ah=!0,A=!0}})();var s={elements:ak.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",shivCSS:ak.shivCSS!==!1,supportsUnknownElements:A,shivMethods:ak.shivMethods!==!1,type:"default",shivDocument:t,createElement:w,createDocumentFragment:v};am.html5=s,t(al)}(this,ae),ab._version=ac,ab._prefixes=T,ab.testStyles=I,Z.className=Z.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(aa?" js "+M.join(" "):""),ab}(this,this.document),function(ad,ac,ab){function aa(b){return P.call(b)=="[object Function]"}function Z(b){return typeof b=="string"}function Y(){}function X(b){return !b||b=="loaded"||b=="complete"||b=="uninitialized"}function W(){var b=O.shift();M=1,b?b.t?R(function(){(b.t=="c"?L.injectCss:L.injectJs)(b.s,0,b.a,b.x,b.e,1)},0):(b(),W()):M=0}function V(w,v,t,s,q,p,n){function m(a){if(!g&&X(h.readyState)&&(x.r=g=1,!M&&W(),h.onload=h.onreadystatechange=null,a)){w!="img"&&R(function(){I.removeChild(h)},50);for(var c in D[v]){D[v].hasOwnProperty(c)&&D[v][c].onload()}}}var n=n||L.errorTimeout,h={},g=0,b=0,x={t:t,s:v,e:q,a:p,x:n};D[v]===1&&(b=1,D[v]=[],h=ac.createElement(w)),w=="object"?h.data=v:(h.src=v,h.type=w),h.width=h.height="0",h.onerror=h.onload=h.onreadystatechange=function(){m.call(this,b)},O.splice(s,0,x),w!="img"&&(b||D[v]===2?(I.insertBefore(h,J?null:Q),R(m,n)):D[v].push(h))}function U(g,e,j,i,h){return M=0,e=e||"j",Z(g)?V(e=="c"?G:H,g,e,this.i++,j,i,h):(O.splice(this.i++,0,g),O.length==1&&W()),this}function T(){var b=L;return b.loader={load:U,i:0},b}var S=ac.documentElement,R=ad.setTimeout,Q=ac.getElementsByTagName("script")[0],P={}.toString,O=[],M=0,K="MozAppearance" in S.style,J=K&&!!ac.createRange().compareNode,I=J?S:Q.parentNode,S=ad.opera&&P.call(ad.opera)=="[object Opera]",S=!!ac.attachEvent&&!S,H=K?"object":S?"script":"img",G=S?"script":H,F=Array.isArray||function(b){return P.call(b)=="[object Array]"},E=[],D={},C={timeout:function(d,c){return c.length&&(d.timeout=c[0]),d}},N,L;L=function(f){function d(j){var j=j.split("!"),i=E.length,q=j.pop(),p=j.length,q={url:q,origUrl:q,prefixes:j},o,m,l;for(m=0;m").attr(d.extend(h(this),{type:"text"}))}r.removeAttr("name").data({"placeholder-password":true,"placeholder-id":p}).bind("focus.placeholder",b);q.data({"placeholder-textinput":r,"placeholder-id":p}).before(r)}q=q.removeAttr("id").hide().prev().attr("id",p).show()}q.addClass("placeholder");q[0].value=q.attr("placeholder")}else{q.removeClass("placeholder")}}}(this,document,jQuery));(function(a){a.fn.foundationAlerts=function(b){var c=a.extend({callback:a.noop},b);a(".alert-box",this).delegate("a.close","click",function(d){d.preventDefault();a(this).closest(".alert-box").fadeOut(function(e){a(this).remove();c.callback()})})}})(jQuery);(function(a){a.fn.foundationAccordion=function(b){a(".accordion li",this).on("click.fndtn",function(){var c=a(this).children(".content").first();a(".accordion .content").not(c).hide().parent("li").removeClass("active");c.show(0,function(){c.parent("li").addClass("active")})})}})(jQuery);(function(a){a.fn.foundationButtons=function(d){a(".button.disabled",this).on("click.fndtn",function(g){g.preventDefault()});a(".button.dropdown > ul",this).addClass("no-hover");a(".button.dropdown",this).on("click.fndtn",function(g){g.stopPropagation()});a(".button.dropdown.split span",this).on("click.fndtn",function(g){g.preventDefault();a(".button.dropdown",this).not(a(this).parent()).children("ul").removeClass("show-dropdown");a(this).siblings("ul").toggleClass("show-dropdown")});a(".button.dropdown",this).not(".split").on("click.fndtn",function(g){a(".button.dropdown",this).not(this).children("ul").removeClass("show-dropdown");a(this).children("ul").toggleClass("show-dropdown")});a("body, html").on("click.fndtn",function(){a(".button.dropdown ul").removeClass("show-dropdown")});var b=a(".button.dropdown:not(.large):not(.small):not(.tiny)",this).outerHeight()-1,f=a(".button.large.dropdown",this).outerHeight()-1,e=a(".button.small.dropdown",this).outerHeight()-1,c=a(".button.tiny.dropdown",this).outerHeight()-1;a(".button.dropdown:not(.large):not(.small):not(.tiny) > ul",this).css("top",b);a(".button.dropdown.large > ul",this).css("top",f);a(".button.dropdown.small > ul",this).css("top",e);a(".button.dropdown.tiny > ul",this).css("top",c);a(".button.dropdown.up:not(.large):not(.small):not(.tiny) > ul",this).css("top","auto").css("bottom",b-2);a(".button.dropdown.up.large > ul",this).css("top","auto").css("bottom",f-2);a(".button.dropdown.up.small > ul",this).css("top","auto").css("bottom",e-2);a(".button.dropdown.up.tiny > ul",this).css("top","auto").css("bottom",c-2)}})(jQuery);(function(c){var b={bodyHeight:0,targetClass:".has-tip",tooltipClass:".tooltip",tipTemplate:function(d,e){return''+e+''}},a={init:function(d){return this.each(function(){var e=c("body");if(Modernizr.touch){e.on("click.tooltip touchstart.tooltip touchend.tooltip",b.targetClass,function(f){f.preventDefault();c(b.tooltipClass).hide();a.showOrCreateTip(c(this))});e.on("click.tooltip touchstart.tooltip touchend.tooltip",b.tooltipClass,function(f){f.preventDefault();c(this).fadeOut(150)})}else{e.on("mouseover.tooltip mouseout.tooltip",b.targetClass,function(g){var f=c(this);if(g.type==="mouseover"){a.showOrCreateTip(f)}else{if(g.type==="mouseout"){a.hide(f)}}})}})},showOrCreateTip:function(d){var e=a.getTip(d);if(e&&e.length>0){a.show(d)}else{a.create(d)}},getTip:function(e){var d=a.selector(e),f=null;if(d){f=c("span[data-selector="+d+"]"+b.tooltipClass)}return(f.length>0)?f:false},selector:function(d){var f=d.attr("id"),e=d.data("selector");if(f===undefined&&e===undefined){e="tooltip"+Math.random().toString(36).substring(7);d.attr("data-selector",e)}return(f)?f:e},create:function(d){var f=c(b.tipTemplate(a.selector(d),c("
").text(d.attr("title")).html())),e=a.inheritable_classes(d);f.addClass(e).appendTo("body");if(Modernizr.touch){f.append('tap to close ')}d.removeAttr("title");a.show(d)},reposition:function(h,k,f){var d,l,j,g,e,i;k.css("visibility","hidden").show();d=h.data("width");l=k.children(".nub");j=l.outerHeight();g=l.outerWidth();i=function(r,q,n,m,p,o){return r.css({top:q,bottom:m,left:p,right:n,width:(o)?o:"auto"}).end()};i(k,(h.offset().top+h.outerHeight()+10),"auto","auto",h.offset().left,d);i(l,-j,"auto","auto",10);if(c(window).width()<767){e=h.closest(".columns");if(e.length<0){e=c("body")}k.width(e.outerWidth()-25).css("left",15).addClass("tip-override");i(l,-j,"auto","auto",h.offset().left)}else{if(f.indexOf("tip-top")>-1){i(k,(h.offset().top-k.outerHeight()-j),"auto","auto",h.offset().left,d).removeClass("tip-override");i(l,"auto","auto",-j,"auto")}else{if(f.indexOf("tip-left")>-1){i(k,(h.offset().top+(h.outerHeight()/2)-j),"auto","auto",(h.offset().left-k.outerWidth()-10),d).removeClass("tip-override");i(l,(k.outerHeight()/2)-(j/2),-j,"auto","auto")}else{if(f.indexOf("tip-right")>-1){i(k,(h.offset().top+(h.outerHeight()/2)-j),"auto","auto",(h.offset().left+h.outerWidth()+10),d).removeClass("tip-override");i(l,(k.outerHeight()/2)-(j/2),"auto","auto",-j)}}}}k.css("visibility","visible").hide()},inheritable_classes:function(f){var e=["tip-top","tip-left","tip-bottom","tip-right","noradius"],d=f.attr("class").split(" ").map(function(h,g){if(c.inArray(h,e)!==-1){return h}}).join(" ");return c.trim(d)},show:function(d){var e=a.getTip(d);a.reposition(d,e,d.attr("class"));e.fadeIn(150)},hide:function(d){var e=a.getTip(d);e.fadeOut(150)},reload:function(){var d=c(this);return(d.data("tooltips"))?d.tooltips("destroy").tooltips("init"):d.tooltips("init")},destroy:function(){return this.each(function(){c(window).off(".tooltip");c(b.targetClass).off(".tooltip");c(b.tooltipClass).each(function(d){c(c(b.targetClass).get(d)).attr("title",c(this).text())}).remove()})}};c.fn.tooltips=function(d){if(a[d]){return a[d].apply(this,Array.prototype.slice.call(arguments,1))}else{if(typeof d==="object"||!d){return a.init.apply(this,arguments)}else{c.error("Method "+d+" does not exist on jQuery.tooltips")}}}}(jQuery));(function(d){var c=function(){var f=[],g=null;return{adjust:function(i){var h=this;h.hidden=i.parents().andSelf().filter(":hidden");h.hidden.each(function(){var j=d(this);h.tmp.push(j.attr("style"));j.css({visibility:"hidden",display:"block"})})},reset:function(){var h=this;h.hidden.each(function(k){var j=d(this),l=h.tmp[k];if(l===undefined){j.removeAttr("style")}else{j.attr("style",l)}});h.tmp=[];h.hidden=null}}};jQuery.foundation=jQuery.foundation||{};jQuery.foundation.customForms=jQuery.foundation.customForms||{};d.foundation.customForms.appendCustomMarkup=function(h){var i={disable_class:"js-disable-custom"};h=d.extend(i,h);function g(j,m){var n=d(m).hide(),l=n.attr("type"),k=n.next("span.custom."+l);if(k.length===0){k=d('').insertAfter(n)}k.toggleClass("checked",n.is(":checked"));k.toggleClass("disabled",n.is(":disabled"))}function f(u,l){var x=c();var q=d(l),p=q.next("div.custom.dropdown"),r=p.find("ul"),s=p.find(".current"),w=p.find(".selector"),o=q.find("option"),m=o.filter(":selected"),v=0,t="",k;var j=false;if(q.hasClass("no-custom")){return}if(p.length===0){var n=q.hasClass("small")?"small":q.hasClass("medium")?"medium":q.hasClass("large")?"large":q.hasClass("expand")?"expand":"";p=d('
    "');w=p.find(".selector");r=p.find("ul");t=d.map(o,function(y){return"
  • "+y.value+"
  • "}).join("");r.append(t);j=p.prepend(''+m.html()+"").find(".current");q.after(p).hide()}else{t=d.map(o,function(y){return"
  • "+y.value+"
  • "}).join("");r.html("").append(t)}p.toggleClass("disabled",q.is(":disabled"));k=r.find("li");o.each(function(y){if(this.selected){k.eq(y).addClass("selected");if(j){j.html(this.value)}}});r.css("width","inherit");p.css("width","inherit");if(!p.is(".small, .medium, .large, .expand")){p.addClass("open");x.adjust(r);v=(k.outerWidth()>v)?k.outerWidth():v;x.reset();p.removeClass("open");p.width(v+18);r.width(v+16)}}d("form.custom input:radio[data-customforms!=disabled]").each(g);d("form.custom input:checkbox[data-customforms!=disabled]").each(g);d("form.custom select[data-customforms!=disabled]").each(f)};var b=function(f){var g=0,h=f.next();$options=f.find("option");h.find("ul").html("");$options.each(function(){$li=d("
  • "+d(this).html()+"
  • ");h.find("ul").append($li)});$options.each(function(i){if(this.selected){h.find("li").eq(i).addClass("selected");h.find(".current").html(d(this).html())}});h.removeAttr("style").find("ul").removeAttr("style");h.find("li").each(function(){h.addClass("open");if(d(this).outerWidth()>g){g=d(this).outerWidth()}h.removeClass("open")});h.css("width",g+18+"px");h.find("ul").css("width",g+16+"px")};var a=function(f){var h=f.prev(),g=h[0];if(false==h.is(":disabled")){g.checked=((g.checked)?false:true);f.toggleClass("checked");h.trigger("change")}};var e=function(f){var h=f.prev(),g=h[0];if(false==h.is(":disabled")){d('input:radio[name="'+h.attr("name")+'"]').each(function(){d(this).next().removeClass("checked")});g.checked=((g.checked)?false:true);f.toggleClass("checked");h.trigger("change")}};d("form.custom span.custom.checkbox").on("click",function(f){f.preventDefault();f.stopPropagation();a(d(this))});d("form.custom span.custom.radio").on("click",function(f){f.preventDefault();f.stopPropagation();e(d(this))});d("form.custom select").on("change",function(f){b(d(this))});d("form.custom label").on("click",function(g){var f=d("#"+d(this).attr("for")),i,h;if(f.length!==0){if(f.attr("type")==="checkbox"){g.preventDefault();i=d(this).find("span.custom.checkbox");a(i)}else{if(f.attr("type")==="radio"){g.preventDefault();h=d(this).find("span.custom.radio");e(h)}}}});d("form.custom div.custom.dropdown a.current, form.custom div.custom.dropdown a.selector").live("click",function(g){var i=d(this),h=i.closest("div.custom.dropdown"),f=h.prev();g.preventDefault();d("div.dropdown").removeClass("open");if(false==f.is(":disabled")){h.toggleClass("open");if(h.hasClass("open")){d(document).bind("click.customdropdown",function(j){h.removeClass("open");d(document).unbind(".customdropdown")})}else{d(document).unbind(".customdropdown")}return false}});d("form.custom div.custom.dropdown li").live("click",function(i){var j=d(this),g=j.closest("div.custom.dropdown"),h=g.prev(),f=0;i.preventDefault();i.stopPropagation();d("div.dropdown").removeClass("open");j.closest("ul").find("li").removeClass("selected");j.addClass("selected");g.removeClass("open").find("a.current").html(j.html());j.closest("ul").find("li").each(function(k){if(j[0]==this){f=k}});h[0].selectedIndex=f;h.trigger("change")});d.fn.foundationCustomForms=d.foundation.customForms.appendCustomMarkup})(jQuery);(function(a){a.fn.foundationTabs=function(b){var d=a.extend({callback:a.noop},b);var c=function(g){var f=g.closest("dl").find("dd.active"),e=g.children("a").attr("href")+"Tab";e=e.replace(/^.+#/,"#");f.removeClass("active");g.addClass("active");a(e).closest(".tabs-content").children("li").removeClass("active").hide();a(e).css("display","block").addClass("active")};a("dl.tabs dd a",this).on("click.fndtn",function(e){c(a(this).parent("dd"))});if(window.location.hash){c(a('a[href="'+window.location.hash+'"]').parent("dd"));d.callback()}}})(jQuery);(function(a){a.fn.foundationNavigation=function(c){var b=false;if(Modernizr.touch||navigator.userAgent.match(/Windows Phone/i)){a(".nav-bar a.flyout-toggle",this).on("click.fndtn touchstart.fndtn",function(f){f.preventDefault();var d=a(this).siblings(".flyout").first();if(b===false){a(".nav-bar .flyout").not(d).slideUp(500);d.slideToggle(500,function(){b=false})}b=true});a(".nav-bar>li.has-flyout",this).addClass("is-touch")}else{a(".nav-bar>li.has-flyout",this).hover(function(){a(this).children(".flyout").show()},function(){a(this).children(".flyout").hide()})}}})(jQuery);(function(b){var a=false;b("a[data-reveal-id]").live("click",function(d){d.preventDefault();var c=b(this).attr("data-reveal-id");b("#"+c).reveal(b(this).data())});b.fn.reveal=function(c){var e=b(document),d={animation:"fadeAndPop",animationSpeed:300,closeOnBackgroundClick:true,dismissModalClass:"close-reveal-modal",open:b.noop,opened:b.noop,close:b.noop,closed:b.noop};c=b.extend({},d,c);return this.each(function(){var q=b(this),i=parseInt(q.css("top"),10),l=q.height()+i,k=false,g=b(".reveal-modal-bg"),j={open:{top:0,opacity:0,visibility:"visible",display:"block"},close:{top:i,opacity:1,visibility:"hidden",display:"none"}},f;if(g.length===0){g=b("
    ",{"class":"reveal-modal-bg"}).insertAfter(q);g.fadeTo("fast",0.8)}function m(){k=false}function r(){k=true}function o(){var s=b(".reveal-modal.open");if(s.length===1){a=true;s.trigger("reveal:close")}}function n(){if(!k){r();o();q.addClass("open");if(c.animation==="fadeAndPop"){j.open.top=e.scrollTop()-l;j.open.opacity=0;q.css(j.open);g.fadeIn(c.animationSpeed/2);q.delay(c.animationSpeed/2).animate({top:e.scrollTop()+i+"px",opacity:1},c.animationSpeed,function(){q.trigger("reveal:opened")})}if(c.animation==="fade"){j.open.top=e.scrollTop()+i;j.open.opacity=0;q.css(j.open);g.fadeIn(c.animationSpeed/2);q.delay(c.animationSpeed/2).animate({opacity:1},c.animationSpeed,function(){q.trigger("reveal:opened")})}if(c.animation==="none"){j.open.top=e.scrollTop()+i;j.open.opacity=1;q.css(j.open);g.css({display:"block"});q.trigger("reveal:opened")}}}q.bind("reveal:open.reveal",n);function h(){if(!k){r();q.removeClass("open");if(c.animation==="fadeAndPop"){q.animate({top:e.scrollTop()-l+"px",opacity:0},c.animationSpeed/2,function(){q.css(j.close)});if(!a){g.delay(c.animationSpeed).fadeOut(c.animationSpeed,function(){q.trigger("reveal:closed")})}else{q.trigger("reveal:closed")}a=false}if(c.animation==="fade"){q.animate({opacity:0},c.animationSpeed,function(){q.css(j.close)});if(!a){g.delay(c.animationSpeed).fadeOut(c.animationSpeed,function(){q.trigger("reveal:closed")})}else{q.trigger("reveal:closed")}}if(c.animation==="none"){q.css(j.close);if(!a){g.css({display:"none"})}q.trigger("reveal:closed")}}}function p(){q.unbind(".reveal");g.unbind(".reveal");f.unbind(".reveal");b("body").unbind(".reveal")}q.bind("reveal:close.reveal",h);q.bind("reveal:opened.reveal reveal:closed.reveal",m);q.bind("reveal:closed.reveal",p);q.bind("reveal:open.reveal",c.open);q.bind("reveal:opened.reveal",c.opened);q.bind("reveal:close.reveal",c.close);q.bind("reveal:closed.reveal",c.closed);q.trigger("reveal:open");f=b("."+c.dismissModalClass).bind("click.reveal",function(){q.trigger("reveal:close")});if(c.closeOnBackgroundClick){g.css({cursor:"pointer"});g.bind("click.reveal",function(){q.trigger("reveal:close")})}b("body").bind("keyup.reveal",function(s){if(s.which===27){q.trigger("reveal:close")}})})}}(jQuery));(function(b){b.fn.findFirstImage=function(){return this.first().find("img").andSelf().filter("img").first()};var a={defaults:{animation:"horizontal-push",animationSpeed:600,timer:true,advanceSpeed:4000,pauseOnHover:false,startClockOnMouseOut:false,startClockOnMouseOutAfter:1000,directionalNav:true,directionalNavRightText:"Right",directionalNavLeftText:"Left",captions:true,captionAnimation:"fade",captionAnimationSpeed:600,resetTimerOnClick:false,bullets:false,bulletThumbs:false,bulletThumbLocation:"",afterSlideChange:b.noop,afterLoadComplete:b.noop,fluid:true,centerBullets:true},activeSlide:0,numberSlides:0,orbitWidth:null,orbitHeight:null,locked:null,timerRunning:null,degrees:0,wrapperHTML:'
    ',timerHTML:'
    ',captionHTML:'
    ',directionalNavHTML:'
    ',bulletHTML:'
      ',init:function(f,e){var c,g=0,d=this;this.clickTimer=b.proxy(this.clickTimer,this);this.addBullet=b.proxy(this.addBullet,this);this.resetAndUnlock=b.proxy(this.resetAndUnlock,this);this.stopClock=b.proxy(this.stopClock,this);this.startTimerAfterMouseLeave=b.proxy(this.startTimerAfterMouseLeave,this);this.clearClockMouseLeaveTimer=b.proxy(this.clearClockMouseLeaveTimer,this);this.rotateTimer=b.proxy(this.rotateTimer,this);this.options=b.extend({},this.defaults,e);if(this.options.timer==="false"){this.options.timer=false}if(this.options.captions==="false"){this.options.captions=false}if(this.options.directionalNav==="false"){this.options.directionalNav=false}this.$element=b(f);this.$wrapper=this.$element.wrap(this.wrapperHTML).parent();this.$slides=this.$element.children("img, a, div");this.$element.bind("orbit.next",function(){d.shift("next")});this.$element.bind("orbit.prev",function(){d.shift("prev")});this.$element.bind("orbit.goto",function(i,h){d.shift(h)});this.$element.bind("orbit.start",function(i,h){d.startClock()});this.$element.bind("orbit.stop",function(i,h){d.stopClock()});c=this.$slides.filter("img");if(c.length===0){this.loaded()}else{c.bind("imageready",function(){g+=1;if(g===c.length){d.loaded()}})}},loaded:function(){this.$element.addClass("orbit").css({width:"1px",height:"1px"});this.$slides.addClass("orbit-slide");this.setDimentionsFromLargestSlide();this.updateOptionsIfOnlyOneSlide();this.setupFirstSlide();if(this.options.timer){this.setupTimer();this.startClock()}if(this.options.captions){this.setupCaptions()}if(this.options.directionalNav){this.setupDirectionalNav()}if(this.options.bullets){this.setupBulletNav();this.setActiveBullet()}this.options.afterLoadComplete.call(this)},currentSlide:function(){return this.$slides.eq(this.activeSlide)},setDimentionsFromLargestSlide:function(){var d=this,c;d.$element.add(d.$wrapper).width(this.$slides.first().outerWidth());d.$element.add(d.$wrapper).height(this.$slides.first().height());d.orbitWidth=this.$slides.first().outerWidth();d.orbitHeight=this.$slides.first().height();c=this.$slides.first().findFirstImage().clone();this.$slides.each(function(){var e=b(this),g=e.outerWidth(),f=e.height();if(g>d.$element.outerWidth()){d.$element.add(d.$wrapper).width(g);d.orbitWidth=d.$element.outerWidth()}if(f>d.$element.height()){d.$element.add(d.$wrapper).height(f);d.orbitHeight=d.$element.height();c=b(this).findFirstImage().clone()}d.numberSlides+=1});if(this.options.fluid){if(typeof this.options.fluid==="string"){c=b('')}d.$element.prepend(c);c.addClass("fluid-placeholder");d.$element.add(d.$wrapper).css({width:"inherit"});d.$element.add(d.$wrapper).css({height:"inherit"});b(window).bind("resize",function(){d.orbitWidth=d.$element.outerWidth();d.orbitHeight=d.$element.height()})}},lock:function(){this.locked=true},unlock:function(){this.locked=false},updateOptionsIfOnlyOneSlide:function(){if(this.$slides.length===1){this.options.directionalNav=false;this.options.timer=false;this.options.bullets=false}},setupFirstSlide:function(){var c=this;this.$slides.first().css({"z-index":3}).fadeIn(function(){c.$slides.css({display:"block"})})},startClock:function(){var c=this;if(!this.options.timer){return false}if(this.$timer.is(":hidden")){this.clock=setInterval(function(){c.$element.trigger("orbit.next")},this.options.advanceSpeed)}else{this.timerRunning=true;this.$pause.removeClass("active");this.clock=setInterval(this.rotateTimer,this.options.advanceSpeed/180,false)}},rotateTimer:function(d){var c="rotate("+this.degrees+"deg)";this.degrees+=2;this.$rotator.css({"-webkit-transform":c,"-moz-transform":c,"-o-transform":c});if(this.degrees>180){this.$rotator.addClass("move");this.$mask.addClass("move")}if(this.degrees>360||d){this.$rotator.removeClass("move");this.$mask.removeClass("move");this.degrees=0;this.$element.trigger("orbit.next")}},stopClock:function(){if(!this.options.timer){return false}else{this.timerRunning=false;clearInterval(this.clock);this.$pause.addClass("active")}},setupTimer:function(){this.$timer=b(this.timerHTML);this.$wrapper.append(this.$timer);this.$rotator=this.$timer.find(".rotator");this.$mask=this.$timer.find(".mask");this.$pause=this.$timer.find(".pause");this.$timer.click(this.clickTimer);if(this.options.startClockOnMouseOut){this.$wrapper.mouseleave(this.startTimerAfterMouseLeave);this.$wrapper.mouseenter(this.clearClockMouseLeaveTimer)}if(this.options.pauseOnHover){this.$wrapper.mouseenter(this.stopClock)}},startTimerAfterMouseLeave:function(){var c=this;this.outTimer=setTimeout(function(){if(!c.timerRunning){c.startClock()}},this.options.startClockOnMouseOutAfter)},clearClockMouseLeaveTimer:function(){clearTimeout(this.outTimer)},clickTimer:function(){if(!this.timerRunning){this.startClock()}else{this.stopClock()}},setupCaptions:function(){this.$caption=b(this.captionHTML);this.$wrapper.append(this.$caption);this.setCaption()},setCaption:function(){var d=this.currentSlide().attr("data-caption"),c;if(!this.options.captions){return false}if(d){if(b.trim(b(d).text()).length<1){return false}c=b(d).html();this.$caption.attr("id",d).html(c);switch(this.options.captionAnimation){case"none":this.$caption.show();break;case"fade":this.$caption.fadeIn(this.options.captionAnimationSpeed);break;case"slideOpen":this.$caption.slideDown(this.options.captionAnimationSpeed);break}}else{switch(this.options.captionAnimation){case"none":this.$caption.hide();break;case"fade":this.$caption.fadeOut(this.options.captionAnimationSpeed);break;case"slideOpen":this.$caption.slideUp(this.options.captionAnimationSpeed);break}}},setupDirectionalNav:function(){var c=this,d=b(this.directionalNavHTML);d.find(".right").html(this.options.directionalNavRightText);d.find(".left").html(this.options.directionalNavLeftText);this.$wrapper.append(d);this.$wrapper.find(".left").click(function(){c.stopClock();if(c.options.resetTimerOnClick){c.rotateTimer(true);c.startClock()}c.$element.trigger("orbit.prev")});this.$wrapper.find(".right").click(function(){c.stopClock();if(c.options.resetTimerOnClick){c.rotateTimer(true);c.startClock()}c.$element.trigger("orbit.next")})},setupBulletNav:function(){this.$bullets=b(this.bulletHTML);this.$wrapper.append(this.$bullets);this.$slides.each(this.addBullet);this.$element.addClass("with-bullets");if(this.options.centerBullets){this.$bullets.css("margin-left",-this.$bullets.outerWidth()/2)}},addBullet:function(g,e){var d=g+1,h=b("
    • "+(d)+"
    • "),c,f=this;if(this.options.bulletThumbs){c=b(e).attr("data-thumb");if(c){h.addClass("has-thumb").css({background:"url("+this.options.bulletThumbLocation+c+") no-repeat"})}}this.$bullets.append(h);h.data("index",g);h.click(function(){f.stopClock();if(f.options.resetTimerOnClick){f.rotateTimer(true);f.startClock()}f.$element.trigger("orbit.goto",[h.data("index")])})},setActiveBullet:function(){if(!this.options.bullets){return false}else{this.$bullets.find("li").removeClass("active").eq(this.activeSlide).addClass("active")}},resetAndUnlock:function(){this.$slides.eq(this.prevActiveSlide).css({"z-index":1});this.unlock();this.options.afterSlideChange.call(this,this.$slides.eq(this.prevActiveSlide),this.$slides.eq(this.activeSlide))},shift:function(d){var c=d;this.prevActiveSlide=this.activeSlide;if(this.prevActiveSlide==c){return false}if(this.$slides.length=="1"){return false}if(!this.locked){this.lock();if(d=="next"){this.activeSlide++;if(this.activeSlide==this.numberSlides){this.activeSlide=0}}else{if(d=="prev"){this.activeSlide--;if(this.activeSlide<0){this.activeSlide=this.numberSlides-1}}else{this.activeSlide=d;if(this.prevActiveSlidethis.activeSlide){c="prev"}}}}this.setActiveBullet();this.$slides.eq(this.prevActiveSlide).css({"z-index":2});if(this.options.animation=="fade"){this.$slides.eq(this.activeSlide).css({opacity:0,"z-index":3}).animate({opacity:1},this.options.animationSpeed,this.resetAndUnlock)}if(this.options.animation=="horizontal-slide"){if(c=="next"){this.$slides.eq(this.activeSlide).css({left:this.orbitWidth,"z-index":3}).animate({left:0},this.options.animationSpeed,this.resetAndUnlock)}if(c=="prev"){this.$slides.eq(this.activeSlide).css({left:-this.orbitWidth,"z-index":3}).animate({left:0},this.options.animationSpeed,this.resetAndUnlock)}}if(this.options.animation=="vertical-slide"){if(c=="prev"){this.$slides.eq(this.activeSlide).css({top:this.orbitHeight,"z-index":3}).animate({top:0},this.options.animationSpeed,this.resetAndUnlock)}if(c=="next"){this.$slides.eq(this.activeSlide).css({top:-this.orbitHeight,"z-index":3}).animate({top:0},this.options.animationSpeed,this.resetAndUnlock)}}if(this.options.animation=="horizontal-push"){if(c=="next"){this.$slides.eq(this.activeSlide).css({left:this.orbitWidth,"z-index":3}).animate({left:0},this.options.animationSpeed,this.resetAndUnlock);this.$slides.eq(this.prevActiveSlide).animate({left:-this.orbitWidth},this.options.animationSpeed)}if(c=="prev"){this.$slides.eq(this.activeSlide).css({left:-this.orbitWidth,"z-index":3}).animate({left:0},this.options.animationSpeed,this.resetAndUnlock);this.$slides.eq(this.prevActiveSlide).animate({left:this.orbitWidth},this.options.animationSpeed)}}if(this.options.animation=="vertical-push"){if(c=="next"){this.$slides.eq(this.activeSlide).css({top:-this.orbitHeight,"z-index":3}).animate({top:0},this.options.animationSpeed,this.resetAndUnlock);this.$slides.eq(this.prevActiveSlide).animate({top:this.orbitHeight},this.options.animationSpeed)}if(c=="prev"){this.$slides.eq(this.activeSlide).css({top:this.orbitHeight,"z-index":3}).animate({top:0},this.options.animationSpeed,this.resetAndUnlock);this.$slides.eq(this.prevActiveSlide).animate({top:-this.orbitHeight},this.options.animationSpeed)}}this.setCaption()}}};b.fn.orbit=function(c){return this.each(function(){var d=b.extend({},a);d.init(this,c)})}})(jQuery); /*! * jQuery imageready Plugin * http://www.zurb.com/playground/ * * Copyright 2011, ZURB * Released under the MIT License */ (function(c){var b={};c.event.special.imageready={setup:function(f,e,d){b=f||b},add:function(d){var e=c(this),f;if(this.nodeType===1&&this.tagName.toLowerCase()==="img"&&this.src!==""){if(b.forceLoad){f=e.attr("src");e.attr("src","");a(this,d.handler);e.attr("src",f)}else{if(this.complete||this.readyState===4){d.handler.apply(this,arguments)}else{a(this,d.handler)}}}},teardown:function(d){c(this).unbind(".imageready")}};function a(d,f){var e=c(d);e.bind("load.imageready",function(){f.apply(d,arguments);e.unbind("load.imageready")})}}(jQuery));