function attachTimer(){if($("#timerEndDT").length){var n=$("#timerEndDT").val().split(",");launchDt=new Date(Date.UTC(n[0],n[1],n[2],n[3],n[4]));timer();setInterval(timer,1e3)}}function timer(){var u=new Date,n=launchDt.getTime()-u.getTime(),r=Math.floor(n/36e5),t,i;n-=r*36e5;t=Math.floor(n/6e4);n-=t*6e4;i=Math.floor(n/1e3);n-=i*1e3;$("#countDown").text(padNum(r,2)+":"+padNum(t,2)+":"+padNum(i,2))}function padNum(n,t){for(var i=n+"";i.length<t;)i="0"+i;return i}var Main,launchDt;!function(n,t){"use strict";var r,i,u,f,e;(n.uaMatch=function(n){n=n.toLowerCase();var t=/(opr)[\/]([\w.]+)/.exec(n)||/(chrome)[ \/]([\w.]+)/.exec(n)||/(version)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(n)||/(webkit)[ \/]([\w.]+)/.exec(n)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(n)||/(msie) ([\w.]+)/.exec(n)||n.indexOf("trident")>=0&&/(rv)(?::| )([\w.]+)/.exec(n)||n.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(n)||[],i=/(ipad)/.exec(n)||/(iphone)/.exec(n)||/(android)/.exec(n)||/(windows phone)/.exec(n)||/(win)/.exec(n)||/(mac)/.exec(n)||/(linux)/.exec(n)||/(cros)/i.exec(n)||[];return{browser:t[3]||t[1]||"",version:t[2]||"0",platform:i[0]||""}},r=n.uaMatch(t.navigator.userAgent),i={},r.browser&&(i[r.browser]=!0,i.version=r.version,i.versionNumber=parseInt(r.version)),r.platform&&(i[r.platform]=!0),(i.android||i.ipad||i.iphone||i["windows phone"])&&(i.mobile=!0),(i.cros||i.mac||i.linux||i.win)&&(i.desktop=!0),(i.chrome||i.opr||i.safari)&&(i.webkit=!0),i.rv)&&(u="msie",r.browser=u,i[u]=!0);i.opr&&(f="opera",r.browser=f,i[f]=!0);i.safari&&i.android&&(e="android",r.browser=e,i[e]=!0);i.name=r.browser;i.platform=r.platform;n.browser=i}(jQuery,window),function(){var y=this,at=y._,e={},r=Array.prototype,g=Object.prototype,vt=Function.prototype,nt=r.push,i=r.slice,o=r.concat,f=g.toString,yt=g.hasOwnProperty,tt=r.forEach,it=r.map,rt=r.reduce,ut=r.reduceRight,ft=r.filter,et=r.every,ot=r.some,s=r.indexOf,st=r.lastIndexOf,pt=Array.isArray,ht=Object.keys,p=vt.bind,n=function(t){if(t instanceof n)return t;if(!(this instanceof n))return new n(t);this._wrapped=t},t,w,b,h,c,k,l,a,u,ct,lt,v;typeof exports!="undefined"?(typeof module!="undefined"&&module.exports&&(exports=module.exports=n),exports._=n):y._=n;n.VERSION="1.6.0";t=n.each=n.forEach=function(t,i,r){var o,u,f;if(t==null)return t;if(tt&&t.forEach===tt)t.forEach(i,r);else if(t.length===+t.length){for(u=0,f=t.length;u<f;u++)if(i.call(r,t[u],u,t)===e)return}else for(o=n.keys(t),u=0,f=o.length;u<f;u++)if(i.call(r,t[o[u]],o[u],t)===e)return;return t};n.map=n.collect=function(n,i,r){var u=[];return n==null?u:it&&n.map===it?n.map(i,r):(t(n,function(n,t,f){u.push(i.call(r,n,t,f))}),u)};w="Reduce of empty array with no initial value";n.reduce=n.foldl=n.inject=function(i,r,u,f){var e=arguments.length>2;if(i==null&&(i=[]),rt&&i.reduce===rt)return f&&(r=n.bind(r,f)),e?i.reduce(r,u):i.reduce(r);if(t(i,function(n,t,i){e?u=r.call(f,u,n,t,i):(u=n,e=!0)}),!e)throw new TypeError(w);return u};n.reduceRight=n.foldr=function(i,r,u,f){var o=arguments.length>2,e,s;if(i==null&&(i=[]),ut&&i.reduceRight===ut)return f&&(r=n.bind(r,f)),o?i.reduceRight(r,u):i.reduceRight(r);if(e=i.length,e!==+e&&(s=n.keys(i),e=s.length),t(i,function(n,t,h){t=s?s[--e]:--e;o?u=r.call(f,u,i[t],t,h):(u=i[t],o=!0)}),!o)throw new TypeError(w);return u};n.find=n.detect=function(n,t,i){var r;return b(n,function(n,u,f){if(t.call(i,n,u,f))return r=n,!0}),r};n.filter=n.select=function(n,i,r){var u=[];return n==null?u:ft&&n.filter===ft?n.filter(i,r):(t(n,function(n,t,f){i.call(r,n,t,f)&&u.push(n)}),u)};n.reject=function(t,i,r){return n.filter(t,function(n,t,u){return!i.call(r,n,t,u)},r)};n.every=n.all=function(i,r,u){r||(r=n.identity);var f=!0;return i==null?f:et&&i.every===et?i.every(r,u):(t(i,function(n,t,i){if(!(f=f&&r.call(u,n,t,i)))return e}),!!f)};b=n.some=n.any=function(i,r,u){r||(r=n.identity);var f=!1;return i==null?f:ot&&i.some===ot?i.some(r,u):(t(i,function(n,t,i){if(f||(f=r.call(u,n,t,i)))return e}),!!f)};n.contains=n.include=function(n,t){return n==null?!1:s&&n.indexOf===s?n.indexOf(t)!=-1:b(n,function(n){return n===t})};n.invoke=function(t,r){var u=i.call(arguments,2),f=n.isFunction(r);return n.map(t,function(n){return(f?r:n[r]).apply(n,u)})};n.pluck=function(t,i){return n.map(t,n.property(i))};n.where=function(t,i){return n.filter(t,n.matches(i))};n.findWhere=function(t,i){return n.find(t,n.matches(i))};n.max=function(i,r,u){if(!r&&n.isArray(i)&&i[0]===+i[0]&&i.length<65535)return Math.max.apply(Math,i);var f=-Infinity,e=-Infinity;return t(i,function(n,t,i){var o=r?r.call(u,n,t,i):n;o>e&&(f=n,e=o)}),f};n.min=function(i,r,u){if(!r&&n.isArray(i)&&i[0]===+i[0]&&i.length<65535)return Math.min.apply(Math,i);var f=Infinity,e=Infinity;return t(i,function(n,t,i){var o=r?r.call(u,n,t,i):n;o<e&&(f=n,e=o)}),f};n.shuffle=function(i){var u,f=0,r=[];return t(i,function(t){u=n.random(f++);r[f-1]=r[u];r[u]=t}),r};n.sample=function(t,i,r){return i==null||r?(t.length!==+t.length&&(t=n.values(t)),t[n.random(t.length-1)]):n.shuffle(t).slice(0,Math.max(0,i))};h=function(t){return t==null?n.identity:n.isFunction(t)?t:n.property(t)};n.sortBy=function(t,i,r){return i=h(i),n.pluck(n.map(t,function(n,t,u){return{value:n,index:t,criteria:i.call(r,n,t,u)}}).sort(function(n,t){var i=n.criteria,r=t.criteria;if(i!==r){if(i>r||i===void 0)return 1;if(i<r||r===void 0)return-1}return n.index-t.index}),"value")};c=function(n){return function(i,r,u){var f={};return r=h(r),t(i,function(t,e){var o=r.call(u,t,e,i);n(f,o,t)}),f}};n.groupBy=c(function(t,i,r){n.has(t,i)?t[i].push(r):t[i]=[r]});n.indexBy=c(function(n,t,i){n[t]=i});n.countBy=c(function(t,i){n.has(t,i)?t[i]++:t[i]=1});n.sortedIndex=function(n,t,i,r){var f;i=h(i);for(var o=i.call(r,t),u=0,e=n.length;u<e;)f=u+e>>>1,i.call(r,n[f])<o?u=f+1:e=f;return u};n.toArray=function(t){return t?n.isArray(t)?i.call(t):t.length===+t.length?n.map(t,n.identity):n.values(t):[]};n.size=function(t){return t==null?0:t.length===+t.length?t.length:n.keys(t).length};n.first=n.head=n.take=function(n,t,r){if(n!=null)return t==null||r?n[0]:t<0?[]:i.call(n,0,t)};n.initial=function(n,t,r){return i.call(n,0,n.length-(t==null||r?1:t))};n.last=function(n,t,r){if(n!=null)return t==null||r?n[n.length-1]:i.call(n,Math.max(n.length-t,0))};n.rest=n.tail=n.drop=function(n,t,r){return i.call(n,t==null||r?1:t)};n.compact=function(t){return n.filter(t,n.identity)};k=function(i,r,u){return r&&n.every(i,n.isArray)?o.apply(u,i):(t(i,function(t){n.isArray(t)||n.isArguments(t)?r?nt.apply(u,t):k(t,r,u):u.push(t)}),u)};n.flatten=function(n,t){return k(n,t,[])};n.without=function(t){return n.difference(t,i.call(arguments,1))};n.partition=function(n,i){var r=[],u=[];return t(n,function(n){(i(n)?r:u).push(n)}),[r,u]};n.uniq=n.unique=function(i,r,u,f){n.isFunction(r)&&(f=u,u=r,r=!1);var s=u?n.map(i,u,f):i,o=[],e=[];return t(s,function(t,u){(r?u&&e[e.length-1]===t:n.contains(e,t))||(e.push(t),o.push(i[u]))}),o};n.union=function(){return n.uniq(n.flatten(arguments,!0))};n.intersection=function(t){var r=i.call(arguments,1);return n.filter(n.uniq(t),function(t){return n.every(r,function(i){return n.contains(i,t)})})};n.difference=function(t){var u=o.apply(r,i.call(arguments,1));return n.filter(t,function(t){return!n.contains(u,t)})};n.zip=function(){for(var i=n.max(n.pluck(arguments,"length").concat(0)),r=new Array(i),t=0;t<i;t++)r[t]=n.pluck(arguments,""+t);return r};n.object=function(n,t){var r,i,u;if(n==null)return{};for(r={},i=0,u=n.length;i<u;i++)t?r[n[i]]=t[i]:r[n[i][0]]=n[i][1];return r};n.indexOf=function(t,i,r){if(t==null)return-1;var u=0,f=t.length;if(r)if(typeof r=="number")u=r<0?Math.max(0,f+r):r;else return u=n.sortedIndex(t,i),t[u]===i?u:-1;if(s&&t.indexOf===s)return t.indexOf(i,r);for(;u<f;u++)if(t[u]===i)return u;return-1};n.lastIndexOf=function(n,t,i){var u,r;if(n==null)return-1;if(u=i!=null,st&&n.lastIndexOf===st)return u?n.lastIndexOf(t,i):n.lastIndexOf(t);for(r=u?i:n.length;r--;)if(n[r]===t)return r;return-1};n.range=function(n,t,i){arguments.length<=1&&(t=n||0,n=0);i=arguments[2]||1;for(var r=Math.max(Math.ceil((t-n)/i),0),u=0,f=new Array(r);u<r;)f[u++]=n,n+=i;return f};l=function(){};n.bind=function(t,r){var u,f;if(p&&t.bind===p)return p.apply(t,i.call(arguments,1));if(!n.isFunction(t))throw new TypeError;return u=i.call(arguments,2),f=function(){var e,n;return(this instanceof f)?(l.prototype=t.prototype,e=new l,l.prototype=null,n=t.apply(e,u.concat(i.call(arguments))),Object(n)===n)?n:e:t.apply(r,u.concat(i.call(arguments)))}};n.partial=function(t){var r=i.call(arguments,1);return function(){for(var f=0,i=r.slice(),u=0,e=i.length;u<e;u++)i[u]===n&&(i[u]=arguments[f++]);while(f<arguments.length)i.push(arguments[f++]);return t.apply(this,i)}};n.bindAll=function(r){var u=i.call(arguments,1);if(u.length===0)throw new Error("bindAll must be passed function names");return t(u,function(t){r[t]=n.bind(r[t],r)}),r};n.memoize=function(t,i){var r={};return i||(i=n.identity),function(){var u=i.apply(this,arguments);return n.has(r,u)?r[u]:r[u]=t.apply(this,arguments)}};n.delay=function(n,t){var r=i.call(arguments,2);return setTimeout(function(){return n.apply(null,r)},t)};n.defer=function(t){return n.delay.apply(n,[t,1].concat(i.call(arguments,1)))};n.throttle=function(t,i,r){var u,f,s,e=null,o=0,h;return r||(r={}),h=function(){o=r.leading===!1?0:n.now();e=null;s=t.apply(u,f);u=f=null},function(){var c=n.now(),l;return o||r.leading!==!1||(o=c),l=i-(c-o),u=this,f=arguments,l<=0?(clearTimeout(e),e=null,o=c,s=t.apply(u,f),u=f=null):e||r.trailing===!1||(e=setTimeout(h,l)),s}};n.debounce=function(t,i,r){var u,f,e,s,o,h=function(){var c=n.now()-s;c<i?u=setTimeout(h,i-c):(u=null,r||(o=t.apply(e,f),e=f=null))};return function(){e=this;f=arguments;s=n.now();var c=r&&!u;return u||(u=setTimeout(h,i)),c&&(o=t.apply(e,f),e=f=null),o}};n.once=function(n){var i=!1,t;return function(){return i?t:(i=!0,t=n.apply(this,arguments),n=null,t)}};n.wrap=function(t,i){return n.partial(i,t)};n.compose=function(){var n=arguments;return function(){for(var t=arguments,i=n.length-1;i>=0;i--)t=[n[i].apply(this,t)];return t[0]}};n.after=function(n,t){return function(){if(--n<1)return t.apply(this,arguments)}};n.keys=function(t){var i,r;if(!n.isObject(t))return[];if(ht)return ht(t);i=[];for(r in t)n.has(t,r)&&i.push(r);return i};n.values=function(t){for(var r=n.keys(t),u=r.length,f=new Array(u),i=0;i<u;i++)f[i]=t[r[i]];return f};n.pairs=function(t){for(var r=n.keys(t),u=r.length,f=new Array(u),i=0;i<u;i++)f[i]=[r[i],t[r[i]]];return f};n.invert=function(t){for(var u={},r=n.keys(t),i=0,f=r.length;i<f;i++)u[t[r[i]]]=r[i];return u};n.functions=n.methods=function(t){var i=[];for(var r in t)n.isFunction(t[r])&&i.push(r);return i.sort()};n.extend=function(n){return t(i.call(arguments,1),function(t){if(t)for(var i in t)n[i]=t[i]}),n};n.pick=function(n){var u={},f=o.apply(r,i.call(arguments,1));return t(f,function(t){t in n&&(u[t]=n[t])}),u};n.omit=function(t){var f={},e=o.apply(r,i.call(arguments,1));for(var u in t)n.contains(e,u)||(f[u]=t[u]);return f};n.defaults=function(n){return t(i.call(arguments,1),function(t){if(t)for(var i in t)n[i]===void 0&&(n[i]=t[i])}),n};n.clone=function(t){return n.isObject(t)?n.isArray(t)?t.slice():n.extend({},t):t};n.tap=function(n,t){return t(n),n};a=function(t,i,r,u){var l,v,h,c,e,o,s;if(t===i)return t!==0||1/t==1/i;if(t==null||i==null)return t===i;if(t instanceof n&&(t=t._wrapped),i instanceof n&&(i=i._wrapped),l=f.call(t),l!=f.call(i))return!1;switch(l){case"[object String]":return t==String(i);case"[object Number]":return t!=+t?i!=+i:t==0?1/t==1/i:t==+i;case"[object Date]":case"[object Boolean]":return+t==+i;case"[object RegExp]":return t.source==i.source&&t.global==i.global&&t.multiline==i.multiline&&t.ignoreCase==i.ignoreCase}if(typeof t!="object"||typeof i!="object")return!1;for(v=r.length;v--;)if(r[v]==t)return u[v]==i;if(h=t.constructor,c=i.constructor,h!==c&&!(n.isFunction(h)&&h instanceof h&&n.isFunction(c)&&c instanceof c)&&"constructor"in t&&"constructor"in i)return!1;if(r.push(t),u.push(i),e=0,o=!0,l=="[object Array]"){if(e=t.length,o=e==i.length,o)while(e--)if(!(o=a(t[e],i[e],r,u)))break}else{for(s in t)if(n.has(t,s)&&(e++,!(o=n.has(i,s)&&a(t[s],i[s],r,u))))break;if(o){for(s in i)if(n.has(i,s)&&!e--)break;o=!e}}return r.pop(),u.pop(),o};n.isEqual=function(n,t){return a(n,t,[],[])};n.isEmpty=function(t){if(t==null)return!0;if(n.isArray(t)||n.isString(t))return t.length===0;for(var i in t)if(n.has(t,i))return!1;return!0};n.isElement=function(n){return!!(n&&n.nodeType===1)};n.isArray=pt||function(n){return f.call(n)=="[object Array]"};n.isObject=function(n){return n===Object(n)};t(["Arguments","Function","String","Number","Date","RegExp"],function(t){n["is"+t]=function(n){return f.call(n)=="[object "+t+"]"}});n.isArguments(arguments)||(n.isArguments=function(t){return!!(t&&n.has(t,"callee"))});typeof/./!="function"&&(n.isFunction=function(n){return typeof n=="function"});n.isFinite=function(n){return isFinite(n)&&!isNaN(parseFloat(n))};n.isNaN=function(t){return n.isNumber(t)&&t!=+t};n.isBoolean=function(n){return n===!0||n===!1||f.call(n)=="[object Boolean]"};n.isNull=function(n){return n===null};n.isUndefined=function(n){return n===void 0};n.has=function(n,t){return yt.call(n,t)};n.noConflict=function(){return y._=at,this};n.identity=function(n){return n};n.constant=function(n){return function(){return n}};n.property=function(n){return function(t){return t[n]}};n.matches=function(n){return function(t){if(t===n)return!0;for(var i in n)if(n[i]!==t[i])return!1;return!0}};n.times=function(n,t,i){for(var u=Array(Math.max(0,n)),r=0;r<n;r++)u[r]=t.call(i,r);return u};n.random=function(n,t){return t==null&&(t=n,n=0),n+Math.floor(Math.random()*(t-n+1))};n.now=Date.now||function(){return(new Date).getTime()};u={escape:{"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;"}};u.unescape=n.invert(u.escape);ct={escape:new RegExp("["+n.keys(u.escape).join("")+"]","g"),unescape:new RegExp("("+n.keys(u.unescape).join("|")+")","g")};n.each(["escape","unescape"],function(t){n[t]=function(n){return n==null?"":(""+n).replace(ct[t],function(n){return u[t][n]})}});n.result=function(t,i){if(t==null)return void 0;var r=t[i];return n.isFunction(r)?r.call(t):r};n.mixin=function(i){t(n.functions(i),function(t){var r=n[t]=i[t];n.prototype[t]=function(){var t=[this._wrapped];return nt.apply(t,arguments),v.call(this,r.apply(n,t))}})};lt=0;n.uniqueId=function(n){var t=++lt+"";return n?n+t:t};n.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var d=/(.)^/,wt={"'":"'","\\":"\\","\r":"r","\n":"n","\t":"t","\u2028":"u2028","\u2029":"u2029"},bt=/\\|'|\r|\n|\t|\u2028|\u2029/g;n.template=function(t,i,r){var f,e;r=n.defaults({},r,n.templateSettings);var h=new RegExp([(r.escape||d).source,(r.interpolate||d).source,(r.evaluate||d).source].join("|")+"|$","g"),o=0,u="__p+='";t.replace(h,function(n,i,r,f,e){return u+=t.slice(o,e).replace(bt,function(n){return"\\"+wt[n]}),i&&(u+="'+\n((__t=("+i+"))==null?'':_.escape(__t))+\n'"),r&&(u+="'+\n((__t=("+r+"))==null?'':__t)+\n'"),f&&(u+="';\n"+f+"\n__p+='"),o=e+n.length,n});u+="';\n";r.variable||(u="with(obj||{}){\n"+u+"}\n");u="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+u+"return __p;\n";try{f=new Function(r.variable||"obj","_",u)}catch(s){s.source=u;throw s;}return i?f(i,n):(e=function(t){return f.call(this,t,n)},e.source="function("+(r.variable||"obj")+"){\n"+u+"}",e)};n.chain=function(t){return n(t).chain()};v=function(t){return this._chain?n(t).chain():t};n.mixin(n);t(["pop","push","reverse","shift","sort","splice","unshift"],function(t){var i=r[t];n.prototype[t]=function(){var n=this._wrapped;return i.apply(n,arguments),(t=="shift"||t=="splice")&&n.length===0&&delete n[0],v.call(this,n)}});t(["concat","join","slice"],function(t){var i=r[t];n.prototype[t]=function(){return v.call(this,i.apply(this._wrapped,arguments))}});n.extend(n.prototype,{chain:function(){return this._chain=!0,this},value:function(){return this._wrapped}});typeof define=="function"&&define.amd&&define("underscore",[],function(){return n})}.call(this);!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,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:"Start",stopText:"Stop",autoControlsCombine:!1,autoControlsSelector:null,auto:!1,pause:4e3,autoStart:!0,autoDirection:"next",autoHover:!1,autoDelay:0,minSlides:1,maxSlides:1,moveSlides:0,slideWidth:0,onSliderLoad:function(){},onSlideBefore:function(){},onSlideAfter:function(){},onSlideNext:function(){},onSlidePrev:function(){}};n.fn.bxSlider=function(u){var f,e;if(0==this.length)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="vertical"==f.settings.mode?"top":"left";f.usingCSS=f.settings.useCSS&&"fade"!=f.settings.mode&&function(){var i=document.createElement("div"),n=["WebkitPerspective","MozPerspective","OPerspective","msPerspective"];for(var t in n)if(void 0!==i.style[n[t]])return f.cssPrefix=n[t].replace("Perspective","").toLowerCase(),f.animProp="-"+f.cssPrefix+"-transform",!0;return!1}();"vertical"==f.settings.mode&&(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(){e.wrap('<div class="bx-wrapper"><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:"horizontal"==f.settings.mode?100*f.children.length+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");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:"horizontal"==f.settings.mode?"left":"none",listStyle:"none",position:"relative"});f.children.css("width",d());"horizontal"==f.settings.mode&&f.settings.slideMargin>0&&f.children.css("marginRight",f.settings.slideMargin);"vertical"==f.settings.mode&&f.settings.slideMargin>0&&f.children.css("marginBottom",f.settings.slideMargin);"fade"==f.settings.mode&&(f.children.css({position:"absolute",zIndex:0,display:"none"}),f.children.eq(f.settings.startSlide).css({zIndex:50,display:"block"}));f.controls.el=n('<div class="bx-controls" />');f.settings.captions&&at();f.active.last=f.settings.startSlide==s()-1;f.settings.video&&e.fitVids();var t=f.children.eq(f.settings.startSlide);"all"==f.settings.preloadImages&&(t=f.children);f.settings.ticker?f.settings.pager=!1:(f.settings.pager&&ht(),f.settings.controls&&ct(),f.settings.auto&&f.settings.autoControls&&lt(),(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, iframe").length,u;if(0==r)return i(),void 0;u=0;t.find("img, iframe").each(function(){n(this).one("load",function(){++u==r&&i()}).each(function(){this.complete&&n(this).load()})})},ot=function(){if(f.settings.infiniteLoop&&"fade"!=f.settings.mode&&!f.settings.ticker){var t="vertical"==f.settings.mode?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");e.append(i).prepend(r)}f.loader.remove();g();"vertical"==f.settings.mode&&(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&&kt();f.settings.ticker&&dt();f.settings.pager&&v(f.settings.startSlide);f.settings.controls&&tt();f.settings.touchEnabled&&!f.settings.ticker&&gt()},l=function(){var r=0,t=n(),u;if("vertical"==f.settings.mode||f.settings.adaptiveHeight)if(f.carousel)for(u=1==f.settings.moveSlides?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"vertical"==f.settings.mode?(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()),r},st=function(){var n="100%";return f.settings.slideWidth>0&&(n="horizontal"==f.settings.mode?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 0==f.settings.slideWidth||f.settings.slideWidth>n&&!f.carousel||"vertical"==f.settings.mode?t=n:f.settings.maxSlides>1&&"horizontal"==f.settings.mode&&(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"horizontal"==f.settings.mode&&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(),n=Math.floor(f.viewport.width()/t)):"vertical"==f.settings.mode&&(n=f.settings.minSlides),n},s=function(){var n=0,t,i;if(f.settings.moveSlides>0)if(f.settings.infiniteLoop)n=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?"horizontal"==f.settings.mode?(t=f.children.last(),n=t.position(),o(-(n.left-(f.viewport.width()-t.width())),"reset",0)):"vertical"==f.settings.mode&&(i=f.children.length-f.settings.minSlides,n=f.children.eq(i).position(),o(-n.top,"reset",0)):(n=f.children.eq(f.active.index*c()).position(),f.active.index==s()-1&&(f.active.last=!0),void 0!=n&&("horizontal"==f.settings.mode?o(-n.left,"reset",0):"vertical"==f.settings.mode&&o(-n.top,"reset",0)))},o=function(n,t,i,r){var u,s;f.usingCSS?(u="vertical"==f.settings.mode?"translate3d(0, "+n+"px, 0)":"translate3d("+n+"px, 0, 0)",e.css("-"+f.cssPrefix+"-transition-duration",i/1e3+"s"),"slide"==t?(e.css(f.animProp,u),e.bind("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd",function(){e.unbind("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd");y()})):"reset"==t?e.css(f.animProp,u):"ticker"==t&&(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");o(r.resetValue,"reset",0);a()}))):(s={},s[f.animProp]=n,"slide"==t?e.animate(s,i,f.settings.easing,function(){y()}):"reset"==t?e.css(f.animProp,n):"ticker"==t&&e.animate(s,speed,"linear",function(){o(r.resetValue,"reset",0);a()}))},nt=function(){for(var i,r="",u=s(),t=0;u>t;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="" data-slide-index="'+t+'" class="bx-pager-link">'+i+"<\/a><\/div>";f.pagerEl.html(r)},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.delegate("a","click",bt)},ct=function(){f.controls.next=n('<a class="bx-next" href="">'+f.settings.nextText+"<\/a>");f.controls.prev=n('<a class="bx-prev" href="">'+f.settings.prevText+"<\/a>");f.controls.next.bind("click",vt);f.controls.prev.bind("click",yt);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(){f.controls.start=n('<div class="bx-controls-auto-item"><a class="bx-start" href="">'+f.settings.startText+"<\/a><\/div>");f.controls.stop=n('<div class="bx-controls-auto-item"><a class="bx-stop" href="">'+f.settings.stopText+"<\/a><\/div>");f.controls.autoEl=n('<div class="bx-controls-auto" />');f.controls.autoEl.delegate(".bx-start","click",pt);f.controls.autoEl.delegate(".bx-stop","click",wt);f.settings.autoControlsCombine?f.controls.autoEl.append(f.controls.start):f.controls.autoEl.append(f.controls.start).append(f.controls.stop);f.settings.autoControlsSelector?n(f.settings.autoControlsSelector).html(f.controls.autoEl):f.controls.el.addClass("bx-has-controls-auto").append(f.controls.autoEl);p(f.settings.autoStart?"stop":"start")},at=function(){f.children.each(function(){var t=n(this).find("img:first").attr("title");void 0!=t&&(""+t).length&&n(this).append('<div class="bx-caption"><span>'+t+"<\/span><\/div>")})},vt=function(n){f.settings.auto&&e.stopAuto();e.goToNextSlide();n.preventDefault()},yt=function(n){f.settings.auto&&e.stopAuto();e.goToPrevSlide();n.preventDefault()},pt=function(n){e.startAuto();n.preventDefault()},wt=function(n){e.stopAuto();n.preventDefault()},bt=function(t){f.settings.auto&&e.stopAuto();var r=n(t.currentTarget),i=parseInt(r.attr("data-slide-index"));i!=f.active.index&&e.goToSlide(i);t.preventDefault()},v=function(t){var i=f.children.length;return"short"==f.settings.pagerType?(f.settings.maxSlides>1&&(i=Math.ceil(f.children.length/f.settings.maxSlides)),f.pagerEl.html(t+1+f.settings.pagerShortSeparator+i),void 0):(f.pagerEl.find("a").removeClass("active"),f.pagerEl.each(function(i,r){n(r).find("a").eq(t).addClass("active")}),void 0)},y=function(){if(f.settings.infiniteLoop){var n="";0==f.active.index?n=f.children.eq(0).position():f.active.index==s()-1&&f.carousel?n=f.children.eq((s()-1)*c()).position():f.active.index==f.children.length-1&&(n=f.children.eq(f.children.length-1).position());"horizontal"==f.settings.mode?o(-n.left,"reset",0):"vertical"==f.settings.mode&&o(-n.top,"reset",0)}f.working=!1;f.settings.onSlideAfter(f.children.eq(f.active.index),f.oldIndex,f.active.index)},p=function(n){f.settings.autoControlsCombine?f.controls.autoEl.html(f.controls[n]):(f.controls.autoEl.find("a").removeClass("active"),f.controls.autoEl.find("a:not(.bx-"+n+")").addClass("active"))},tt=function(){1==s()?(f.controls.prev.addClass("disabled"),f.controls.next.addClass("disabled")):!f.settings.infiniteLoop&&f.settings.hideControlOnEnd&&(0==f.active.index?(f.controls.prev.addClass("disabled"),f.controls.next.removeClass("disabled")):f.active.index==s()-1?(f.controls.next.addClass("disabled"),f.controls.prev.removeClass("disabled")):(f.controls.prev.removeClass("disabled"),f.controls.next.removeClass("disabled")))},kt=function(){f.settings.autoDelay>0?setTimeout(e.startAuto,f.settings.autoDelay):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)})},dt=function(){var i=0,t;"next"==f.settings.autoDirection?e.append(f.children.clone().addClass("bx-clone")):(e.prepend(f.children.clone().addClass("bx-clone")),t=f.children.first().position(),i="horizontal"==f.settings.mode?-t.left:-t.top);o(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+="horizontal"==f.settings.mode?n(this).outerWidth(!0):n(this).outerHeight(!0)});var i=f.settings.speed/t,r="horizontal"==f.settings.mode?"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};"next"==f.settings.autoDirection?t=e.find(".bx-clone").first().position():i=f.children.first().position();var r="horizontal"==f.settings.mode?-t.left:-t.top,u="horizontal"==f.settings.mode?-i.left:-i.top,s={resetValue:u};o(r,"ticker",speed,s)},gt=function(){f.touch={start:{x:0,y:0},end:{x:0,y:0}};f.viewport.bind("touchstart",ni)},ni=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;(3*u>e&&f.settings.preventDefaultSwipeX?n.preventDefault():3*e>u&&f.settings.preventDefaultSwipeY&&n.preventDefault(),"fade"!=f.settings.mode&&f.settings.oneToOneTouch)&&(i=0,"horizontal"==f.settings.mode?(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),o(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,"fade"==f.settings.mode)?(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,"horizontal"==f.settings.mode?(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&&(0==f.active.index&&t>0||f.active.last&&0>t)?o(i,"reset",200):Math.abs(t)>=f.settings.swipeThreshold?(0>t?e.goToNextSlide():e.goToPrevSlide(),e.stopAuto()):o(i,"reset",200));f.viewport.unbind("touchend",rt)},ut=function(){var t=n(window).width(),i=n(window).height();(w!=t||b!=i)&&(w=t,b=i,e.redrawSlider())};return e.goToSlide=function(t,i){var h,r,a,p,u,w,b;f.working||f.active.index==t||((f.working=!0,f.oldIndex=f.active.index,f.active.index=0>t?s()-1:t>=s()?0:t,f.settings.onSlideBefore(f.children.eq(f.active.index),f.oldIndex,f.active.index),"next"==i?f.settings.onSlideNext(f.children.eq(f.active.index),f.oldIndex,f.active.index):"prev"==i&&f.settings.onSlidePrev(f.children.eq(f.active.index),f.oldIndex,f.active.index),f.active.last=f.active.index>=s()-1,f.settings.pager&&v(f.active.index),f.settings.controls&&tt(),"fade"==f.settings.mode)?(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",51).fadeIn(f.settings.speed,function(){n(this).css("zIndex",50);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?"horizontal"==f.settings.mode?(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&&"prev"==i?(p=1==f.settings.moveSlides?f.settings.maxSlides-c():(s()-1)*c()-(f.children.length-f.settings.maxSlides),u=e.children(".bx-clone").eq(p),r=u.position()):"next"==i&&0==f.active.index?(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="horizontal"==f.settings.mode?-(r.left-h):-r.top,o(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||0!=f.active.index){var n=parseInt(f.active.index)-1;e.goToSlide(n,"prev")}},e.startAuto=function(n){f.interval||(f.interval=setInterval(function(){"next"==f.settings.autoDirection?e.goToNextSlide():e.goToPrevSlide()},f.settings.pause),f.settings.autoControls&&1!=n&&p("stop"))},e.stopAuto=function(n){f.interval&&(clearInterval(f.interval),f.interval=null,f.settings.autoControls&&1!=n&&p("start"))},e.getCurrentSlide=function(){return f.active.index},e.getSlideCount=function(){return f.children.length},e.redrawSlider=function(){f.children.add(e.find(".bx-clone")).outerWidth(d());f.viewport.css("height",l());f.settings.ticker||g();f.active.last&&(f.active.index=s()-1);f.active.index>=s()&&(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(){void 0!=n(this).data("origStyle")?n(this).attr("style",n(this).data("origStyle")):n(this).removeAttr("style")}),void 0!=n(this).data("origStyle")?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.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){void 0!=n&&(u=n);e.destroySlider();k()},k(),this}}(jQuery);define("slider",["jquery"],function(n){"use strict";n.fn.ftdnaSlider=function(t){var i;if(this.length==0)return this;if(this.length>1)return this.each(function(){n(this).ftdnaSlider(t)}),this;i={};i.childSlider={};var f=this,e={auto:!0,onSlideBefore:function(n,t,f){i.childSlider.index==f&&(u(i.childSlider),r(i.mainSlider))}},r=function(n){var t=n.parents(".ftdna-slider").first();t.hide();n.destroySlider();n.addClass("hidden");n.remove().insertAfter(t.children().last());t.show();n===i.childSlider&&i.childSlider.siblings(".child-pager").hide()},u=function(t,f){t.removeClass("hidden");t===i.mainSlider?i.mainSlider.bxSlider(n.extend({},i.settings,{startSlide:f||0})):(i.childSlider.siblings(".child-pager").show(),i.childSlider.bxSlider({auto:!0,mode:"fade",controls:!1,startSlide:f||0,pager:!1,pause:i.settings.pause,onSlideBefore:function(n,t,f){!i.childSlider.navigating&&t>f&&(u(i.mainSlider,i.childSlider.index<i.mainSlider.getSlideCount()-1?i.childSlider.index+1:0),r(i.childSlider));i.childSlider.navigating=!1}}))},o=function(){i.settings=n.extend({},e,t);n(f).removeClass("hidden");i.mainSlider=n(f).bxSlider(i.settings);i.settings.child&&(i.childSlider=n(i.settings.child.selector),i.childSlider.index=i.settings.child.index)};return o(),this.goToSlide=function(n,t){var f=n==i.childSlider?i.mainSlider:i.childSlider;n.hasClass("hidden")?(r(f),u(n,t)):(n.navigating=!0,n.goToSlide(t));n.stopAuto()},this.mainSlider=i.mainSlider,this.childSlider=i.childSlider,this}}),function(n,t,i){"use strict";function c(i){var u,e;if(f=t.documentElement,v=t.body,dr(),r=this,i=i||{},gt=i.constants||{},i.easing)for(u in i.easing)ot[u]=i.easing[u];return ti=i.edgeStrategy||"set",p={beforerender:i.beforerender,render:i.render},nt=i.forceHeight!==!1,nt&&(ii=i.scale||1),ht=i.mobileDeceleration||cr,ni=i.smoothScrolling!==!1,ct=i.smoothScrollingDuration||lr,w={targetTop:r.getScrollTop()},a=(i.mobileCheck||function(){return/Android|iPhone|iPad|iPod|BlackBerry|Windows Phone/i.test(navigator.userAgent||navigator.vendor||n.opera)})(),a?(l=t.getElementById("skrollr-body"),l&&hu(),tu(),b(f,[d,vi],[dt])):b(f,[d,ai],[dt]),r.refresh(),er(n,"resize orientationchange",function(){var n=f.clientWidth,t=f.clientHeight;(t!==fi||n!==ui)&&(fi=t,ui=n,vt=!0)}),e=gr(),function o(){uu();fr=e(o)}(),r}var f,v,y=n.skrollr={get:function(){return r},init:function(n){return r||new c(n)},VERSION:"0.6.17"},pt=Object.prototype.hasOwnProperty,e=n.Math,wt=n.getComputedStyle,oi="touchstart",si="touchmove",hi="touchcancel",ci="touchend",rt="skrollable",bt=rt+"-before",li=rt+"-between",kt=rt+"-after",d="skrollr",dt="no-"+d,ai=d+"-desktop",vi=d+"-mobile",yi="linear",pi=1e3,cr=.004,lr=200,ar="start",wi="end",bi="center",ki="bottom",ut="___skrollable_id",di=/^(?:input|textarea|button|select)$/i,vr=/^\s+|\s+$/g,yr=/^data(?:-(_\w+))?(?:-?(-?\d*\.?\d+p?))?(?:-?(start|end|top|center|bottom))?(?:-?(top|center|bottom))?$/,pr=/\s*([\w\-\[\]]+)\s*:\s*(.+?)\s*(?:;|$)/gi,wr=/^([a-z\-]+)\[(\w+)\]$/,br=/-([a-z])/g,kr=function(n,t){return t.toUpperCase()},gi=/[\-+]?[\d]*\.?[\d]+/g,nr=/\{\?\}/g,tr=/rgba?\(\s*-?\d+\s*,\s*-?\d+\s*,\s*-?\d+/g,ir=/[a-z\-]+-gradient/g,s="",g="",dr=function(){var r=/^(?:O|Moz|webkit|ms)|(?:-(?:o|moz|webkit|ms)-)/,t,n;if(wt){t=wt(v,null);for(n in t)if(s=n.match(r)||+n==n&&t[n].match(r))break;if(!s)return s=g="",i;s=s[0];"-"===s.slice(0,1)?(g=s,s={"-webkit-":"webkit","-moz-":"Moz","-ms-":"ms","-o-":"O"}[s]):g="-"+s.toLowerCase()+"-"}},gr=function(){var t=n.requestAnimationFrame||n[s.toLowerCase()+"RequestAnimationFrame"],i=it();return(a||!t)&&(t=function(t){var r=it()-i,u=e.max(0,1e3/60-r);return n.setTimeout(function(){i=it();t()},u)}),t},nu=function(){var t=n.cancelAnimationFrame||n[s.toLowerCase()+"CancelAnimationFrame"];return(a||!t)&&(t=function(t){return n.clearTimeout(t)}),t},ot={begin:function(){return 0},end:function(){return 1},linear:function(n){return n},quadratic:function(n){return n*n},cubic:function(n){return n*n*n},swing:function(n){return-e.cos(n*e.PI)/2+.5},sqrt:function(n){return e.sqrt(n)},outCubic:function(n){return e.pow(n-1,3)+1},bounce:function(n){var t;if(.5083>=n)t=3;else if(.8489>=n)t=9;else if(.96208>=n)t=27;else{if(!(.99981>=n))return 1;t=91}return 1-e.abs(3*e.cos(1.028*n*t)/t)}};c.prototype.refresh=function(n){var o,v,tt=!1,y,et,e,c,u,l,p,s,ot,g,nt,a,w;for(n===i?(tt=!0,h=[],ei=0,n=t.getElementsByTagName("*")):n=[].concat(n),o=0,v=n.length;v>o;o++){var f=n[o],k=f,d=[],it=ni,ft=ti;if(f.attributes){for(y=0,et=f.attributes.length;et>y;y++)if(e=f.attributes[y],"data-anchor-target"!==e.name)"data-smooth-scrolling"!==e.name?"data-edge-strategy"!==e.name?(c=e.name.match(yr),null!==c&&(u={props:e.value,element:f},d.push(u),l=c[1],l=l&&gt[l.substr(1)]||0,p=c[2],/p$/.test(p)?(u.isPercentage=!0,u.offset=((0|p.slice(0,-1))+l)/100):u.offset=(0|p)+l,s=c[3],ot=c[4]||s,s&&s!==ar&&s!==wi?(u.mode="relative",u.anchors=[s,ot]):(u.mode="absolute",s===wi?u.isEnd=!0:u.isPercentage||(u.frame=u.offset*ii,delete u.offset)))):ft=e.value:it="off"!==e.value;else if(k=t.querySelector(e.value),null===k)throw'Unable to find anchor target "'+e.value+'"';d.length&&(!tt&&ut in f?(a=f[ut],g=h[a].styleAttr,nt=h[a].classAttr):(a=f[ut]=ei++,g=f.style.cssText,nt=sr(f)),h[a]={element:f,styleAttr:g,classAttr:nt,anchorTarget:k,keyFrames:d,smoothScrolling:it,edgeStrategy:ft},b(f,[rt],[]))}}for(or(),o=0,v=n.length;v>o;o++)w=h[n[o][ut]],w!==i&&(fu(w),ou(w));return r};c.prototype.relativeToAbsolute=function(n,t,i){var o=f.clientHeight,e=n.getBoundingClientRect(),u=e.top,s=e.bottom-e.top;return t===ki?u-=o:t===bi&&(u-=o/2),i===ki?u+=s:i===bi&&(u+=s/2),u+=r.getScrollTop(),0|u+.5};c.prototype.animateTo=function(n,t){t=t||{};var f=it(),e=r.getScrollTop();return u={startTop:e,topDiff:n-e,targetTop:n,duration:t.duration||pi,startTime:f,endTime:f+(t.duration||pi),easing:ot[t.easing||yi],done:t.done},u.topDiff||(u.done&&u.done.call(r,!1),u=i),r};c.prototype.stopAnimateTo=function(){u&&u.done&&u.done.call(r,!0);u=i};c.prototype.isAnimatingTo=function(){return!!u};c.prototype.setScrollTop=function(t,i){return tt=i===!0,a?et=e.min(e.max(t,0),o):n.scrollTo(0,t),r};c.prototype.getScrollTop=function(){return a?et:n.pageYOffset||f.scrollTop||v.scrollTop||0};c.prototype.getMaxScrollTop=function(){return o};c.prototype.on=function(n,t){return p[n]=t,r};c.prototype.off=function(n){return delete p[n],r};c.prototype.destroy=function(){var e=nu(),n,t;for(e(fr),lu(),b(f,[dt],[d,ai,vi]),n=0,t=h.length;t>n;n++)st(h[n].element);f.style.overflow=v.style.overflow="auto";f.style.height=v.style.height="auto";l&&y.setStyle(l,"transform","none");r=i;l=i;p=i;nt=i;o=0;ii=1;gt=i;ht=i;at="down";k=-1;ui=0;fi=0;vt=!1;u=i;ni=i;ct=i;w=i;tt=i;ei=0;ti=i;a=!1;et=0;ft=i};var tu=function(){var u,p,w,s,h,l,a,y,d,c,b,k;er(f,[oi,si,hi,ci].join(" "),function(n){var v=n.changedTouches[0],tt,g;for(s=n.target;3===s.nodeType;)s=s.parentNode;switch(h=v.clientY,l=v.clientX,c=n.timeStamp,di.test(s.tagName)||n.preventDefault(),n.type){case oi:u&&u.blur();r.stopAnimateTo();u=s;p=a=h;w=l;d=c;break;case si:y=h-a;k=c-b;r.setScrollTop(et-y,!0);a=h;b=c;break;default:case hi:case ci:var ut=p-h,ft=w-l,ot=ft*ft+ut*ut;if(49>ot){di.test(u.tagName)||(u.focus(),tt=t.createEvent("MouseEvents"),tt.initMouseEvent("click",!0,!0,n.view,1,v.screenX,v.screenY,v.clientX,v.clientY,n.ctrlKey,n.altKey,n.shiftKey,n.metaKey,0,null),u.dispatchEvent(tt));return}u=i;g=y/k;g=e.max(e.min(g,3),-3);var nt=e.abs(g/ht),it=g*nt+.5*ht*nt*nt,f=r.getScrollTop()-it,rt=0;f>o?(rt=(o-f)/it,f=o):0>f&&(rt=-f/it,f=0);nt*=1-rt;r.animateTo(0|f+.5,{easing:"outCubic",duration:nt})}});n.scrollTo(0,0);f.style.overflow=v.style.overflow="hidden"},iu=function(){for(var u,v,y,s,t,c,n,a,i=0,l=h.length;l>i;i++)for(u=h[i],v=u.element,y=u.anchorTarget,s=u.keyFrames,t=0,c=s.length;c>t;t++)n=s[t],a=n.offset,n.isPercentage&&(a*=f.clientHeight,n.frame=a),"relative"===n.mode&&(st(v),n.frame=r.relativeToAbsolute(y,n.anchors[0],n.anchors[1])-a,st(v,!0)),nt&&!n.isEnd&&n.frame>o&&(o=n.frame);for(o=e.max(o,au()),i=0,l=h.length;l>i;i++){for(u=h[i],s=u.keyFrames,t=0,c=s.length;c>t;t++)n=s[t],n.isEnd&&(n.frame=o-n.offset);u.keyFrames.sort(vu)}},ru=function(n,t){for(var v,f,nt,e,w,p,a=0,k=h.length;k>a;a++){var i,o,u=h[a],c=u.element,s=u.smoothScrolling?n:t,r=u.keyFrames,tt=r[0].frame,it=r[r.length-1].frame,l=tt>s,d=s>it,g=r[l?0:r.length-1];if(l||d){if(l&&-1===u.edge||d&&1===u.edge)continue;switch(b(c,[l?bt:kt],[bt,li,kt]),u.edge=l?-1:1,u.edgeStrategy){case"reset":st(c);continue;case"ease":s=g.frame;break;default:case"set":v=g.props;for(i in v)pt.call(v,i)&&(o=ur(v[i].value),y.setStyle(c,i,o));continue}}else 0!==u.edge&&(b(c,[rt,li],[bt,kt]),u.edge=0);for(f=0,nt=r.length-1;nt>f;f++)if(s>=r[f].frame&&r[f+1].frame>=s){e=r[f];w=r[f+1];for(i in e.props)pt.call(e.props,i)&&(p=(s-e.frame)/(w.frame-e.frame),p=e.props[i].easing(p),o=su(e.props[i].value,w.props[i].value,p),o=ur(o),y.setStyle(c,i,o));break}}},uu=function(){var e,f,n,t,h,s,c;vt&&(vt=!1,or());n=r.getScrollTop();t=it();u?(t>=u.endTime?(n=u.targetTop,e=u.done,u=i):(f=u.easing((t-u.startTime)/u.duration),n=0|u.startTop+f*u.topDiff),r.setScrollTop(n,!0)):tt||(h=w.targetTop-n,h&&(w={startTop:k,topDiff:n-k,targetTop:n,startTime:ri,endTime:ri+ct}),w.endTime>=t&&(f=ot.sqrt((t-w.startTime)/ct),n=0|w.startTop+f*w.topDiff));(a&&l&&y.setStyle(l,"transform","translate(0, "+-et+"px) "+ft),tt||k!==n)&&(at=n>k?"down":k>n?"up":at,tt=!1,s={curTop:n,lastTop:k,maxTop:o,direction:at},c=p.beforerender&&p.beforerender.call(r,s),c!==!1&&(ru(n,r.getScrollTop()),k=n,p.render&&p.render.call(r,s)),e&&e.call(r,!1));ri=t},fu=function(n){for(var t,i,u,f,e,o,r=0,s=n.keyFrames.length;s>r;r++){for(e=n.keyFrames[r],o={};null!==(f=pr.exec(e.props));)u=f[1],i=f[2],t=u.match(wr),null!==t?(u=t[1],t=t[2]):t=yi,i=i.indexOf("!")?eu(i):[i.slice(1)],o[u]={value:i,easing:ot[t]};e.props=o}},eu=function(n){var t=[];return tr.lastIndex=0,n=n.replace(tr,function(n){return n.replace(gi,function(n){return 100*(n/255)+"%"})}),g&&(ir.lastIndex=0,n=n.replace(ir,function(n){return g+n})),n=n.replace(gi,function(n){return t.push(+n),"{?}"}),t.unshift(n),t},ou=function(n){for(var i={},t=0,r=n.keyFrames.length;r>t;t++)rr(n.keyFrames[t],i);for(i={},t=n.keyFrames.length-1;t>=0;t--)rr(n.keyFrames[t],i)},rr=function(n,t){for(var i in t)pt.call(n.props,i)||(n.props[i]=t[i]);for(i in n.props)t[i]=n.props[i]},su=function(n,t,i){var r,f=n.length,u;if(f!==t.length)throw"Can't interpolate between \""+n[0]+'" and "'+t[0]+'"';for(u=[n[0]],r=1;f>r;r++)u[r]=n[r]+(t[r]-n[r])*i;return u},ur=function(n){var t=1;return nr.lastIndex=0,n[0].replace(nr,function(){return n[t++]})},st=function(n,t){n=[].concat(n);for(var i,r,u=0,f=n.length;f>u;u++)r=n[u],i=h[r[ut]],i&&(t?(r.style.cssText=i.dirtyStyleAttr,b(r,i.dirtyClassAttr)):(i.dirtyStyleAttr=r.style.cssText,i.dirtyClassAttr=sr(r),r.style.cssText=i.styleAttr,b(r,i.classAttr)))},hu=function(){ft="translateZ(0)";y.setStyle(l,"transform",ft);var n=wt(l),t=n.getPropertyValue("transform"),i=n.getPropertyValue(g+"transform"),r=t&&"none"!==t||i&&"none"!==i;r||(ft="")};y.setStyle=function(n,t,i){var r=n.style;if(t=t.replace(br,kr).replace("-",""),"zIndex"===t)r[t]=isNaN(i)?i:""+(0|i);else if("float"===t)r.styleFloat=r.cssFloat=i;else try{s&&(r[s+t.slice(0,1).toUpperCase()+t.slice(1)]=i);r[t]=i}catch(u){}};var r,h,l,p,nt,gt,ht,u,ni,ct,w,tt,ti,ft,fr,er=y.addEvent=function(t,i,r){var o=function(t){return t=t||n.event,t.target||(t.target=t.srcElement),t.preventDefault||(t.preventDefault=function(){t.returnValue=!1}),r.call(this,t)},u,f,e;for(i=i.split(" "),f=0,e=i.length;e>f;f++)u=i[f],t.addEventListener?t.addEventListener(u,r,!1):t.attachEvent("on"+u,o),yt.push({element:t,name:u,listener:r})},cu=y.removeEvent=function(n,t,i){t=t.split(" ");for(var r=0,u=t.length;u>r;r++)n.removeEventListener?n.removeEventListener(t[r],i,!1):n.detachEvent("on"+t[r],i)},lu=function(){for(var n,t=0,i=yt.length;i>t;t++)n=yt[t],cu(n.element,n.name,n.listener);yt=[]},or=function(){var n=r.getScrollTop();o=0;nt&&!a&&(v.style.height="auto");iu();nt&&!a&&(v.style.height=o+f.clientHeight+"px");a?r.setScrollTop(e.min(r.getScrollTop(),o)):r.setScrollTop(n,!0);tt=!0},au=function(){var n=l&&l.offsetHeight||0,t=e.max(n,v.scrollHeight,v.offsetHeight,f.scrollHeight,f.offsetHeight,f.clientHeight);return t-f.clientHeight},sr=function(t){var i="className";return n.SVGElement&&t instanceof n.SVGElement&&(t=t[i],i="baseVal"),t[i]},b=function(t,r,u){var e="className",o,h;if(n.SVGElement&&t instanceof n.SVGElement&&(t=t[e],e="baseVal"),u===i)return t[e]=r,i;for(var f=t[e],s=0,c=u.length;c>s;s++)f=lt(f).replace(lt(u[s])," ");for(f=hr(f),o=0,h=r.length;h>o;o++)-1===lt(f).indexOf(lt(r[o]))&&(f+=" "+r[o]);t[e]=hr(f)},hr=function(n){return n.replace(vr,"")},lt=function(n){return" "+n+" "},it=Date.now||function(){return+new Date},vu=function(n,t){return n.frame-t.frame},o=0,ii=1,at="down",k=-1,ri=it(),ui=0,fi=0,vt=!1,ei=0,a=!1,et=0,yt=[]}(window,document),function(n,t,i){function y(n){var t={},r=/^jQuery\d+$/;return i.each(n.attributes,function(n,i){i.specified&&!r.test(i.name)&&(t[i.name]=i.value)}),t}function e(n,t){var u=this,r=i(u);if(u.value==r.attr("placeholder")&&r.hasClass("placeholder"))if(r.data("placeholder-password")){if(r=r.hide().next().show().attr("id",r.removeAttr("id").data("placeholder-id")),n===!0)return r[0].value=t;r.focus()}else u.value="",r.removeClass("placeholder"),u==v()&&u.select()}function s(){var t,r=this,n=i(r),u=this.id;if(r.value==""){if(r.type=="password"){if(!n.data("placeholder-textinput")){try{t=n.clone().attr({type:"text"})}catch(f){t=i("<input>").attr(i.extend(y(this),{type:"text"}))}t.removeAttr("name").data({"placeholder-password":n,"placeholder-id":u}).bind("focus.placeholder",e);n.data({"placeholder-textinput":t,"placeholder-id":u}).before(t)}n=n.removeAttr("id").hide().prev().attr("id",u).show()}n.addClass("placeholder");n[0].value=n.attr("placeholder")}else n.removeClass("placeholder")}function v(){try{return t.activeElement}catch(n){}}var h=Object.prototype.toString.call(n.operamini)=="[object OperaMini]",f="placeholder"in t.createElement("input")&&!h,o="placeholder"in t.createElement("textarea")&&!h,c=i.fn,l=i.valHooks,a=i.propHooks,u,r;f&&o?(r=c.placeholder=function(){return this},r.input=r.textarea=!0):(r=c.placeholder=function(){var n=this;return n.filter((f?"textarea":":input")+"[placeholder]").not(".placeholder").bind({"focus.placeholder":e,"blur.placeholder":s}).data("placeholder-enabled",!0).trigger("blur.placeholder"),n},r.input=f,r.textarea=o,u={get:function(n){var t=i(n),r=t.data("placeholder-password");return r?r[0].value:t.data("placeholder-enabled")&&t.hasClass("placeholder")?"":n.value},set:function(n,t){var r=i(n),u=r.data("placeholder-password");return u?u[0].value=t:r.data("placeholder-enabled")?(t==""?(n.value=t,n!=v()&&s.call(n)):r.hasClass("placeholder")?e.call(n,!0,t)||(n.value=t):n.value=t,r):n.value=t}},f||(l.input=u,a.value=u),o||(l.textarea=u,a.value=u),i(function(){i(t).delegate("form","submit.placeholder",function(){var n=i(".placeholder",this).each(e);setTimeout(function(){n.each(s)},10)})}),i(n).bind("beforeunload.placeholder",function(){i(".placeholder").each(function(){this.value=""})}))}(this,document,jQuery);angular.module("monospaced.elastic",[]).constant("msdElasticConfig",{append:""}).directive("msdElastic",["$timeout","$window","msdElasticConfig",function(n,t,i){"use strict";return{require:"ngModel",restrict:"A, C",link:function(r,u,f,e){function st(){it=o;s=getComputedStyle(o);angular.forEach(ot,function(n){p+=n+":"+s.getPropertyValue(n)+";"});h.setAttribute("style",p)}function v(){var u,i,t,f,e;it!==o&&st();a||(a=!0,h.value=o.value+rt,h.style.overflowY=o.style.overflowY,u=o.style.height===""?"auto":parseInt(o.style.height,10),i=getComputedStyle(o).getPropertyValue("width"),i.substr(i.length-2,2)==="px"&&(f=parseInt(i,10)-w.width,h.style.width=f+"px"),t=h.scrollHeight,t>c?(t=c,e="scroll"):t<tt&&(t=tt),t+=w.height,o.style.overflowY=e||"hidden",u!==t&&(o.style.height=t+"px",r.$emit("elastic:resize",l)),n(function(){a=!1},1))}function y(){a=!1;v()}var o=u[0],l=u,b;if(o.nodeName==="TEXTAREA"&&t.getComputedStyle){l.css({overflow:"hidden","overflow-y":"hidden","word-wrap":"break-word"});b=o.value;o.value="";o.value=b;var k=f.msdElastic||i.append,rt=k==="\\n"?"\n":k,d=angular.element(t),p="position: absolute; top: -999px; right: auto; bottom: auto; left: 0 ;overflow: hidden; -webkit-box-sizing: content-box;-moz-box-sizing: content-box; box-sizing: content-box;min-height: 0 !important; height: 0 !important; padding: 0;word-wrap: break-word; border: 0;",g=angular.element('<textarea tabindex="-1" style="'+p+'"/>').data("elastic",!0),h=g[0],s=getComputedStyle(o),nt=s.getPropertyValue("resize"),ut=s.getPropertyValue("box-sizing")==="border-box"||s.getPropertyValue("-moz-box-sizing")==="border-box"||s.getPropertyValue("-webkit-box-sizing")==="border-box",w=ut?{width:parseInt(s.getPropertyValue("border-right-width"),10)+parseInt(s.getPropertyValue("padding-right"),10)+parseInt(s.getPropertyValue("padding-left"),10)+parseInt(s.getPropertyValue("border-left-width"),10),height:parseInt(s.getPropertyValue("border-top-width"),10)+parseInt(s.getPropertyValue("padding-top"),10)+parseInt(s.getPropertyValue("padding-bottom"),10)+parseInt(s.getPropertyValue("border-bottom-width"),10)}:{width:0,height:0},ft=parseInt(s.getPropertyValue("min-height"),10),et=parseInt(s.getPropertyValue("height"),10),tt=Math.max(ft,et)-w.height,c=parseInt(s.getPropertyValue("max-height"),10),it,a,ot=["font-family","font-size","font-weight","font-style","letter-spacing","line-height","text-transform","word-spacing","text-indent"];l.data("elastic")||(c=c&&c>0?c:9e4,h.parentNode!==document.body&&angular.element(document.body).append(h),l.css({resize:nt==="none"||nt==="vertical"?"none":"horizontal"}).data("elastic",!0),o.oninput="onpropertychange"in o&&"oninput"in o?o.onkeyup=v:v,d.bind("resize",y),r.$watch(function(){return e.$modelValue},function(){y()}),r.$on("elastic:adjust",function(){y()}),n(v),r.$on("$destroy",function(){g.remove();d.unbind("resize",y)}))}}}}]),function(n){var u={className:"autosizejs",id:"autosizejs",append:"\n",callback:!1,resizeDelay:10,placeholder:!0},r=["fontFamily","fontSize","fontWeight","fontStyle","letterSpacing","textTransform","wordSpacing","textIndent"],i,t=n('<textarea tabindex="-1" style="position:absolute; top:-999px; left:0; right:auto; bottom:auto; border:0; padding: 0; -moz-box-sizing:content-box; -webkit-box-sizing:content-box; box-sizing:content-box; word-wrap:break-word; height:0 !important; min-height:0 !important; overflow:hidden; transition:none; -webkit-transition:none; -moz-transition:none;"/>').data("autosize",!0)[0];t.style.lineHeight="99px";n(t).css("lineHeight")==="99px"&&r.push("lineHeight");t.style.lineHeight="";n.fn.autosize=function(f){return this.length?(f=n.extend({},u,f||{}),t.parentNode!==document.body&&n(document.body).append(t),this.each(function(){function y(){var i,r=window.getComputedStyle?window.getComputedStyle(e,null):!1;r?(i=e.getBoundingClientRect().width,(i===0||typeof i!="number")&&(i=parseInt(r.width,10)),n.each(["paddingLeft","paddingRight","borderLeftWidth","borderRightWidth"],function(n,t){i-=parseInt(r[t],10)})):i=u.width();t.style.width=Math.max(i,0)+"px"}function k(){var o={},h,c;i=e;t.className=f.className;t.id=f.id;s=parseInt(u.css("maxHeight"),10);n.each(r,function(n,t){o[t]=u.css(t)});n(t).css(o).attr("wrap",u.attr("wrap"));y();window.chrome&&(h=e.style.width,e.style.width="0px",c=e.offsetWidth,e.style.width=h)}function o(){var n,r;i!==e?k():y();t.value=!e.value&&f.placeholder?(u.attr("placeholder")||"")+f.append:e.value+f.append;t.style.overflowY=e.style.overflowY;r=parseInt(e.style.height,10);t.scrollTop=0;t.scrollTop=9e4;n=t.scrollTop;s&&n>s?(e.style.overflowY="scroll",n=s):(e.style.overflowY="hidden",n<h&&(n=h));n+=c;r!==n&&(e.style.height=n+"px",w&&f.callback.call(e,e))}function p(){clearTimeout(l);l=setTimeout(function(){var n=u.width();n!==a&&(a=n,o())},parseInt(f.resizeDelay,10))}var e=this,u=n(e),s,h,c=0,w=n.isFunction(f.callback),b={height:e.style.height,overflow:e.style.overflow,overflowY:e.style.overflowY,wordWrap:e.style.wordWrap,resize:e.style.resize},l,a=u.width(),v=u.css("resize");if(!u.data("autosize")){if(u.data("autosize",!0),(u.css("box-sizing")==="border-box"||u.css("-moz-box-sizing")==="border-box"||u.css("-webkit-box-sizing")==="border-box")&&(c=u.outerHeight()-u.height()),h=Math.max(parseInt(u.css("minHeight"),10)-c||0,u.height()),u.css({overflow:"hidden",overflowY:"hidden",wordWrap:"break-word"}),v==="vertical"?u.css("resize","none"):v==="both"&&u.css("resize","horizontal"),"onpropertychange"in e)if("oninput"in e)u.on("input.autosize keyup.autosize",o);else u.on("propertychange.autosize",function(){event.propertyName==="value"&&o()});else u.on("input.autosize",o);if(f.resizeDelay!==!1)n(window).on("resize.autosize",p);u.on("autosize.resize",o);u.on("autosize.resizeIncludeStyle",function(){i=null;o()});u.on("autosize.destroy",function(){i=null;clearTimeout(l);n(window).off("resize",p);u.off("autosize").off(".autosize").css(b).removeData("autosize")});o()}})):this}}(window.jQuery||window.$),function(n){typeof define=="function"&&define.amd?define("purl",n):window.purl=n()}(function(){function c(n,t){for(var u=decodeURI(n),e=h[t||!1?"strict":"loose"].exec(u),i={attr:{},param:{},seg:{}},r=14;r--;)i.attr[o[r]]=e[r]||"";return i.param.query=f(i.attr.query),i.param.fragment=f(i.attr.fragment),i.seg.path=i.attr.path.replace(/^\/+|\/+$/g,"").split("/"),i.seg.fragment=i.attr.fragment.replace(/^\/+|\/+$/g,"").split("/"),i.attr.base=i.attr.host?(i.attr.protocol?i.attr.protocol+"://"+i.attr.host:i.attr.host)+(i.attr.port?":"+i.attr.port:""):"",i}function l(n){var t=n.tagName;return typeof t!="undefined"?e[t.toLowerCase()]:t}function u(n,t){var i,r;if(n[t].length===0)return n[t]={};i={};for(r in n[t])i[r]=n[t][r];return n[t]=i,i}function r(t,f,e,o){var h=t.shift(),s;h?(s=f[e]=f[e]||[],"]"==h?n(s)?""!==o&&s.push(o):"object"==typeof s?s[w(s).length]=o:s=f[e]=[f[e],o]:~h.indexOf("]")?(h=h.substr(0,h.length-1),!i.test(h)&&n(s)&&(s=u(f,e)),r(t,s,h,o)):(!i.test(h)&&n(s)&&(s=u(f,e)),r(t,s,h,o))):n(f[e])?f[e].push(o):f[e]="object"==typeof f[e]?o:"undefined"==typeof f[e]?o:[f[e],o]}function a(t,u,f){var s,e,o;if(~u.indexOf("]"))s=u.split("["),r(s,t,"base",f);else{if(!i.test(u)&&n(t.base)){e={};for(o in t.base)e[o]=t.base[o];t.base=e}u!==""&&v(t.base,u,f)}return t}function f(n){return p(String(n).split(/&|;/),function(n,t){try{t=decodeURIComponent(t.replace(/\+/g," "))}catch(e){}var u=t.indexOf("="),f=y(t),r=t.substr(0,f||u),i=t.substr(f||u,t.length);return i=i.substr(i.indexOf("=")+1,i.length),r===""&&(r=t,i=""),a(n,r,i)},{base:{}}).base}function v(t,i,r){var u=t[i];typeof u=="undefined"?t[i]=r:n(u)?u.push(r):t[i]=[u,r]}function y(n){for(var u=n.length,r,t,i=0;i<u;++i)if(t=n[i],"]"==t&&(r=!1),"["==t&&(r=!0),"="==t&&!r)return i}function p(n,t){for(var i=0,u=n.length>>0,r=arguments[2];i<u;)i in n&&(r=t.call(undefined,r,n[i],i,n)),++i;return r}function n(n){return Object.prototype.toString.call(n)==="[object Array]"}function w(n){var t=[];for(var i in n)n.hasOwnProperty(i)&&t.push(i);return t}function t(n,t){return arguments.length===1&&n===!0&&(t=!0,n=undefined),t=t||!1,n=n||window.location.toString(),{data:c(n,t),attr:function(n){return n=s[n]||n,typeof n!="undefined"?this.data.attr[n]:this.data.attr},param:function(n){return typeof n!="undefined"?this.data.param.query[n]:this.data.param.query},fparam:function(n){return typeof n!="undefined"?this.data.param.fragment[n]:this.data.param.fragment},segment:function(n){return typeof n=="undefined"?this.data.seg.path:(n=n<0?this.data.seg.path.length+n:n-1,this.data.seg.path[n])},fsegment:function(n){return typeof n=="undefined"?this.data.seg.fragment:(n=n<0?this.data.seg.fragment.length+n:n-1,this.data.seg.fragment[n])}}}var e={a:"href",img:"src",form:"action",base:"href",script:"src",iframe:"src",link:"href",embed:"src",object:"data"},o=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","fragment"],s={anchor:"fragment"},h={strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/},i=/^[0-9]+$/;return t.jQuery=function(n){n!=null&&(n.fn.url=function(i){var r="";return this.length&&(r=n(this).attr(l(this[0]))||""),t(r,i)},n.url=t)},t.jQuery(window.jQuery),t}),function(n){jQuery.fn.extend({slimScroll:function(i){var r=n.extend({width:"auto",height:"250px",size:"7px",color:"#000",position:"right",distance:"1px",start:"top",opacity:.4,alwaysVisible:!1,disableFadeOut:!1,railVisible:!1,railColor:"#333",railOpacity:.2,railDraggable:!0,railClass:"slimScrollRail",barClass:"slimScrollBar",wrapperClass:"slimScrollDiv",allowPageScroll:!1,wheelStep:20,touchScrollStep:200,borderRadius:"7px",railBorderRadius:"7px"},i);return this.each(function(){function ft(t){var t,i,f;l&&(t=t||window.event,i=0,t.wheelDelta&&(i=-t.wheelDelta/120),t.detail&&(i=t.detail/3),f=t.target||t.srcTarget||t.srcElement,n(f).closest("."+r.wrapperClass).is(u.parent())&&h(i,!0),t.preventDefault&&!o&&t.preventDefault(),o||(t.returnValue=!1))}function h(n,t,i,s){var h,a,l;o=!1;h=n;a=u.outerHeight()-f.outerHeight();t&&(h=parseInt(f.css("top"))+n*parseInt(r.wheelStep)/100*f.outerHeight(),h=Math.min(Math.max(h,0),a),h=n>0?Math.ceil(h):Math.floor(h),f.css({top:h+"px"}));e=parseInt(f.css("top"))/(u.outerHeight()-f.outerHeight());h=e*(u[0].scrollHeight-u.outerHeight());i&&(h=n,l=h/u[0].scrollHeight*u.outerHeight(),l=Math.min(Math.max(l,0),a),f.css({top:l+"px"}));s?u.animate({scrollTop:h},400):u.scrollTop(h);u.trigger("slimscrolling",~~h);g();c()}function et(){u.bind("DOMMouseScroll mousewheel onmousewheel",function(n){ft(n.originalEvent)})}function d(){a=Math.max(u.outerHeight()/u[0].scrollHeight*u.outerHeight(),ut);f.css({height:a+"px"});var n=a==u.outerHeight()?"none":"block";f.css({display:n})}function g(){if(d(),clearTimeout(nt),e==~~e){if(o=r.allowPageScroll,tt!=e){var n=~~e==0?"top":"bottom";u.trigger("slimscroll",n)}}else o=!1;if(tt=e,a>=u.outerHeight()){o=!0;return}f.stop(!0,!0).fadeIn("fast");r.railVisible&&s.stop(!0,!0).fadeIn("fast")}function c(){r.alwaysVisible||(nt=setTimeout(function(){r.disableFadeOut&&l||y||p||(f.fadeOut("slow"),s.fadeOut("slow"))},1e3))}var l,y,p,nt,w,a,e,tt,b="<div><\/div>",ut=30,o=!1,u=n(this),v,k,it;if(u.parent().hasClass(r.wrapperClass)){if(v=u.scrollTop(),f=u.parent().find("."+r.barClass),s=u.parent().find("."+r.railClass),d(),n.isPlainObject(i)){if("height"in i&&i.height=="auto"&&(u.parent().css("height","auto"),u.css("height","auto"),k=u.parent().parent().height(),u.parent().css("height",k),u.css("height",k)),"scrollTo"in i)v=parseInt(r.scrollTo);else if("scrollBy"in i)v+=parseInt(r.scrollBy);else if("destroy"in i){f.remove();s.remove();u.unwrap();return}h(v,!1,!0)}return}r.height=i.height=="auto"?u.parent().height():i.height;it=n(b).addClass(r.wrapperClass).css({position:"relative",overflow:"hidden",width:r.width,height:r.height});u.css({overflow:"hidden",width:r.width,height:r.height});var s=n(b).addClass(r.railClass).css({width:r.size,height:"100%",position:"absolute",top:0,display:r.alwaysVisible&&r.railVisible?"block":"none","border-radius":r.railBorderRadius,background:r.railColor,opacity:r.railOpacity,zIndex:90}),f=n(b).addClass(r.barClass).css({background:r.color,width:r.size,position:"absolute",top:0,opacity:r.opacity,display:r.alwaysVisible?"block":"none","border-radius":r.borderRadius,BorderRadius:r.borderRadius,MozBorderRadius:r.borderRadius,WebkitBorderRadius:r.borderRadius,zIndex:99}),rt=r.position=="right"?{right:r.distance}:{left:r.distance};s.css(rt);f.css(rt);u.wrap(it);u.parent().append(f);u.parent().append(s);r.railDraggable&&f.bind("mousedown",function(i){var r=n(document);return p=!0,t=parseFloat(f.css("top")),pageY=i.pageY,r.bind("mousemove.slimscroll",function(n){currTop=t+n.pageY-pageY;f.css("top",currTop);h(0,f.position().top,!1)}),r.bind("mouseup.slimscroll",function(){p=!1;c();r.unbind(".slimscroll")}),!1}).bind("selectstart.slimscroll",function(n){return n.stopPropagation(),n.preventDefault(),!1});s.hover(function(){g()},function(){c()});f.hover(function(){y=!0},function(){y=!1});u.hover(function(){l=!0;g();c()},function(){l=!1;c()});u.bind("touchstart",function(n){n.originalEvent.touches.length&&(w=n.originalEvent.touches[0].pageY)});u.bind("touchmove",function(n){if(o||n.originalEvent.preventDefault(),n.originalEvent.touches.length){var t=(w-n.originalEvent.touches[0].pageY)/r.touchScrollStep;h(t,!0);w=n.originalEvent.touches[0].pageY}});d();r.start==="bottom"?(f.css({top:u.outerHeight()-f.outerHeight()}),h(0,!0)):r.start!=="top"&&(h(n(r.start).position().top,null,!0),r.alwaysVisible||f.hide());et();n(this).init.prototype.scroll=function(n,t,i,r){h(n,t,i,r)}}),this}});jQuery.fn.extend({slimscroll:jQuery.fn.slimScroll})}(jQuery);define("common/address",["jquery","class"],function(n){"use strict";var t=function(t,i){return n.map(i,function(n){return n||null}).join(t)};return Object.subClass({init:function(n,t,i){var r=this;n=n||{};r.emailAddress=n.emailAddress;r.confirmEmailAddress=n.confirmEmailAddress;r.firstName=n.firstName;r.lastName=n.lastName;r.middleName=n.middleName;r.phoneNum=n.phoneNum;r.isPhoneNumRequired=i===undefined?!1:i;r.streetAddress=n.streetAddress;r.streetAddress2=n.streetAddress2;r.city=n.city;r.state=n.state;r.IsPhoneRequiredForInternational=!0;r.country=t?"United States":n.country;r.country||n&&n.country||(r.country="United States");r.zipCode=n.zipCode},equals:function(n){return n?this.streetAddress===n.streetAddress&&this.streetAddress2===n.streetAddress2&&this.city===n.city&&this.state===n.state&&this.country===n.country&&this.zipCode===n.zipCode:null},setStreetAddressComponents:function(n){this.streetAddress=t(" ",[n.streetNumber,n.streetAddress]);this.streetAddress2=n.streetAddress2||null},getAddressComponents:function(n){var i=[];if(!n&&(this.firstName||this.lastName||this.middleName)&&i.push(t(" ",[this.firstName,this.middleName,this.lastName])),this.phoneNum&&i.push(this.phoneNum),(this.streetAddress||this.streetAddress2)&&i.push(t(" ",[this.streetAddress,this.streetAddress2])),this.city&&i.push(this.city),this.state||this.zipCode){if(window.cart.states){const n=window.cart.states.find(n=>n.text===this.state);if(!n){const n=window.cart.states.find(n=>n.value===this.state);n&&(this.state=n.text)}}i.push(t(" ",[this.state,this.zipCode]))}return this.country&&i.push(this.country==="United States"?"USA":this.country),i},getAddressComponents_deprecated:function(n){var i=[null,null,null,null,null,null];return!n&&(this.firstName||this.lastName||this.middleName)&&i.splice(0,1,t(" ",[this.firstName,this.middleName,this.lastName])),this.phoneNum&&i.splice(1,1,this.phoneNum),(this.streetAddress||this.streetAddress2)&&i.splice(2,1,t(" ",[this.streetAddress,this.streetAddress2])),this.city&&i.splice(3,1,this.city),(this.state||this.zipCode)&&i.splice(4,1,t(" ",[this.state,this.zipCode])),this.country&&i.splice(5,1,this.country==="United States"?"USA":this.country),i},formatted:function(n){return t(", ",this.getAddressComponents(n))},copyTo:function(n){return n.emailAddress=this.emailAddress,n.firstName=this.firstName,n.lastName=this.lastName,n.middleName=this.middleName,n.phoneNum=this.phoneNum,n.phoneNumRequired=this.phoneNumRequired,n.streetAddress=this.streetAddress,n.streetAddress2=this.streetAddress2,n.city=this.city,n.state=this.state,n.country=this.country,n.zipCode=this.zipCode,n}})}),function(n){"use strict";n(jQuery)}(function(n){"use strict";var t={wheelSpeed:10,wheelPropagation:!1,minScrollbarLength:null,maxScrollbarLength:null,useBothWheelAxes:!1,useKeyboard:!0,suppressScrollX:!1,suppressScrollY:!1,scrollXMarginOffset:0,scrollYMarginOffset:0,includePadding:!1},i=function(){var n=0;return function(){var t=n;return n+=1,".perfect-scrollbar-"+t}}();n.fn.perfectScrollbar=function(r,u){return this.each(function(){var o=n.extend(!0,{},t),f=n(this);if(typeof r=="object"?n.extend(!0,o,r):u=r,u==="update")return f.data("perfect-scrollbar-update")&&f.data("perfect-scrollbar-update")(),f;if(u==="destroy")return f.data("perfect-scrollbar-destroy")&&f.data("perfect-scrollbar-destroy")(),f;if(f.data("perfect-scrollbar"))return f.data("perfect-scrollbar");f.addClass("ps-container");var s=n("<div class='ps-scrollbar-x-rail'><\/div>").appendTo(f),l=n("<div class='ps-scrollbar-y-rail'><\/div>").appendTo(f),k=n("<div class='ps-scrollbar-x'><\/div>").appendTo(s),y=n("<div class='ps-scrollbar-y'><\/div>").appendTo(l),d,g,h,c,p,nt,a,w,it=parseInt(s.css("bottom"),10),rt=it===it,ot=rt?null:parseInt(s.css("top"),10),v,b,tt=parseInt(l.css("right"),10),ut=tt===tt,ft=ut?null:parseInt(l.css("left"),10),st=f.css("direction")==="rtl",e=i(),at=parseInt(s.css("borderLeftWidth"),10)+parseInt(s.css("borderRightWidth"),10),vt=parseInt(s.css("borderTopWidth"),10)+parseInt(s.css("borderBottomWidth"),10),yt=function(n,t){var r=n+t,u=c-v,i;b=r<0?0:r>u?u:r;i=parseInt(b*(nt-c)/(c-v),10);f.scrollTop(i);rt?s.css({bottom:it-i}):s.css({top:ot+i})},pt=function(n,t){var r=n+t,u=h-a,i;w=r<0?0:r>u?u:r;i=parseInt(w*(p-h)/(h-a),10);f.scrollLeft(i);ut?l.css({right:tt-i}):l.css({left:ft+i})},ht=function(n){return o.minScrollbarLength&&(n=Math.max(n,o.minScrollbarLength)),o.maxScrollbarLength&&(n=Math.min(n,o.maxScrollbarLength)),n},ct=function(){var n={width:h,display:d?"inherit":"none"},t;n.left=st?f.scrollLeft()+h-p:f.scrollLeft();rt?n.bottom=it-f.scrollTop():n.top=ot+f.scrollTop();s.css(n);t={top:f.scrollTop(),height:c,display:g?"inherit":"none"};ut?t.right=st?p-f.scrollLeft()-tt-y.outerWidth():tt-f.scrollLeft():t.left=st?f.scrollLeft()+h*2-p-ft-y.outerWidth():ft+f.scrollLeft();l.css(t);k.css({left:w,width:a-at});y.css({top:b,height:v-vt});d?f.addClass("ps-active-x"):f.removeClass("ps-active-x");g?f.addClass("ps-active-y"):f.removeClass("ps-active-y")},et=function(){h=o.includePadding?f.innerWidth():f.width();c=o.includePadding?f.innerHeight():f.height();p=f.prop("scrollWidth");nt=f.prop("scrollHeight");!o.suppressScrollX&&h+o.scrollXMarginOffset<p?(d=!0,a=ht(parseInt(h*h/p,10)),w=parseInt(f.scrollLeft()*(h-a)/(p-h),10)):(d=!1,a=0,w=0,f.scrollLeft(0));!o.suppressScrollY&&c+o.scrollYMarginOffset<nt?(g=!0,v=ht(parseInt(c*c/nt,10)),b=parseInt(f.scrollTop()*(c-v)/(nt-c),10)):(g=!1,v=0,b=0,f.scrollTop(0));b>=c-v&&(b=c-v);w>=h-a&&(w=h-a);ct()},wt=function(){var t,i;k.bind("mousedown"+e,function(n){i=n.pageX;t=k.position().left;s.addClass("in-scrolling");n.stopPropagation();n.preventDefault()});n(document).bind("mousemove"+e,function(n){s.hasClass("in-scrolling")&&(pt(t,n.pageX-i),n.stopPropagation(),n.preventDefault())});n(document).bind("mouseup"+e,function(){s.hasClass("in-scrolling")&&s.removeClass("in-scrolling")});t=i=null},bt=function(){var t,i;y.bind("mousedown"+e,function(n){i=n.pageY;t=y.position().top;l.addClass("in-scrolling");n.stopPropagation();n.preventDefault()});n(document).bind("mousemove"+e,function(n){l.hasClass("in-scrolling")&&(yt(t,n.pageY-i),n.stopPropagation(),n.preventDefault())});n(document).bind("mouseup"+e,function(){l.hasClass("in-scrolling")&&l.removeClass("in-scrolling")});t=i=null},lt=function(n,t){var r=f.scrollTop(),i;if(n===0){if(!g)return!1;if(r===0&&t>0||r>=nt-c&&t<0)return!o.wheelPropagation}if(i=f.scrollLeft(),t===0){if(!d)return!1;if(i===0&&n<0||i>=p-h&&n>0)return!o.wheelPropagation}return!0},kt=function(){o.wheelSpeed/=10;var n=!1;f.bind("mousewheel"+e,function(t,i,r,u){var e=t.deltaX*t.deltaFactor||r,s=t.deltaY*t.deltaFactor||u;n=!1;o.useBothWheelAxes?g&&!d?(s?f.scrollTop(f.scrollTop()-s*o.wheelSpeed):f.scrollTop(f.scrollTop()+e*o.wheelSpeed),n=!0):d&&!g&&(e?f.scrollLeft(f.scrollLeft()+e*o.wheelSpeed):f.scrollLeft(f.scrollLeft()-s*o.wheelSpeed),n=!0):(f.scrollTop(f.scrollTop()-s*o.wheelSpeed),f.scrollLeft(f.scrollLeft()+e*o.wheelSpeed));et();n=n||lt(e,s);n&&(t.stopPropagation(),t.preventDefault())});f.bind("MozMousePixelScroll"+e,function(t){n&&t.preventDefault()})},dt=function(){var t=!1,i;f.bind("mouseenter"+e,function(){t=!0});f.bind("mouseleave"+e,function(){t=!1});i=!1;n(document).bind("keydown"+e,function(r){if((!r.isDefaultPrevented||!r.isDefaultPrevented())&&t&&!n(document.activeElement).is(":input,[contenteditable]")){var e=0,u=0;switch(r.which){case 37:e=-30;break;case 38:u=30;break;case 39:e=30;break;case 40:u=-30;break;case 33:u=90;break;case 32:case 34:u=-90;break;case 35:u=-c;break;case 36:u=c;break;default:return}f.scrollTop(f.scrollTop()-u);f.scrollLeft(f.scrollLeft()+e);i=lt(e,u);i&&r.preventDefault()}})},gt=function(){var n=function(n){n.stopPropagation()};y.bind("click"+e,n);l.bind("click"+e,function(n){var i=parseInt(v/2,10),r=n.pageY-l.offset().top-i,u=c-v,t=r/u;t<0?t=0:t>1&&(t=1);f.scrollTop((nt-c)*t)});k.bind("click"+e,n);s.bind("click"+e,function(n){var i=parseInt(a/2,10),r=n.pageX-s.offset().left-i,u=h-a,t=r/u;t<0?t=0:t>1&&(t=1);f.scrollLeft((p-h)*t)})},ni=function(){var s=function(n,t){f.scrollTop(f.scrollTop()-t);f.scrollLeft(f.scrollLeft()-n);et()},i={},u=0,t={},r=null,o=!1;n(window).bind("touchstart"+e,function(){o=!0});n(window).bind("touchend"+e,function(){o=!1});f.bind("touchstart"+e,function(n){var t=n.originalEvent.targetTouches[0];i.pageX=t.pageX;i.pageY=t.pageY;u=(new Date).getTime();r!==null&&clearInterval(r);n.stopPropagation()});f.bind("touchmove"+e,function(n){var e,r,h,c,l,f;o||n.originalEvent.targetTouches.length!==1||(e=n.originalEvent.targetTouches[0],r={},r.pageX=e.pageX,r.pageY=e.pageY,h=r.pageX-i.pageX,c=r.pageY-i.pageY,s(h,c),i=r,l=(new Date).getTime(),f=l-u,f>0&&(t.x=h/f,t.y=c/f,u=l),n.preventDefault())});f.bind("touchend"+e,function(){clearInterval(r);r=setInterval(function(){if(Math.abs(t.x)<.01&&Math.abs(t.y)<.01){clearInterval(r);return}s(t.x*30,t.y*30);t.x*=.8;t.y*=.8},10)})},ti=function(){f.bind("scroll"+e,function(){et()})},ii=function(){f.unbind(e);n(window).unbind(e);n(document).unbind(e);f.data("perfect-scrollbar",null);f.data("perfect-scrollbar-update",null);f.data("perfect-scrollbar-destroy",null);k.remove();y.remove();s.remove();l.remove();s=l=k=y=d=g=h=c=p=nt=a=w=it=rt=ot=v=b=tt=ut=ft=st=e=null},ri=function(t){f.addClass("ie").addClass("ie"+t);var i=function(){var t=function(){n(this).addClass("hover")},i=function(){n(this).removeClass("hover")};f.bind("mouseenter"+e,t).bind("mouseleave"+e,i);s.bind("mouseenter"+e,t).bind("mouseleave"+e,i);l.bind("mouseenter"+e,t).bind("mouseleave"+e,i);k.bind("mouseenter"+e,t).bind("mouseleave"+e,i);y.bind("mouseenter"+e,t).bind("mouseleave"+e,i)},r=function(){ct=function(){var t={left:w+f.scrollLeft(),width:a},n;rt?t.bottom=it:t.top=ot;k.css(t);n={top:b+f.scrollTop(),height:v};ut?n.right=tt:n.left=ft;y.css(n);k.hide().show();y.hide().show()}};t===6&&(i(),r())},ui="ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch,fi=function(){var n=navigator.userAgent.toLowerCase().match(/(msie) ([\w.]+)/);n&&n[1]==="msie"&&ri(parseInt(n[2],10));et();ti();wt();bt();gt();ui&&ni();f.mousewheel&&kt();o.useKeyboard&&dt();f.data("perfect-scrollbar",f);f.data("perfect-scrollbar-update",et);f.data("perfect-scrollbar-destroy",ii)};return fi(),f})}}),function(n,t){if(!("ontouchstart"in document)){var i=n();n.fn.dropdownHover=function(r){return i=i.add(this.parent()),this.each(function(){var e=n(this),u=e.parent(),s={delay:n(this).data("delay"),instantlyCloseOthers:n(this).data("close-others")},f=n.extend(!0,{},{delay:500,instantlyCloseOthers:!0},r,s),o;u.hover(function(r){if(!u.hasClass("open")&&!e.is(r.target))return!0;f.instantlyCloseOthers===!0&&i.removeClass("open");t.clearTimeout(o);u.addClass("open");u.trigger(n.Event("show.bs.dropdown"))},function(){o=t.setTimeout(function(){u.removeClass("open");u.trigger("hide.bs.dropdown")},f.delay)});e.hover(function(){f.instantlyCloseOthers===!0&&i.removeClass("open");t.clearTimeout(o);u.addClass("open");u.trigger(n.Event("show.bs.dropdown"))});u.find(".dropdown-submenu").each(function(){var i=n(this),r;i.hover(function(){t.clearTimeout(r);i.children(".dropdown-menu").show();i.siblings().children(".dropdown-menu").hide()},function(){var n=i.children(".dropdown-menu");r=t.setTimeout(function(){n.hide()},f.delay)})})})};n(document).ready(function(){n('[data-hover="dropdown"]').dropdownHover()})}}(jQuery,this);var isIE8=!1,isIE9=!1,$windowWidth,$windowHeight,$pageArea,isMobile=!1;(function(n,t){var i=function(n,t,i){var r;return function(){function e(){i||n.apply(u,f);r=null}var u=this,f=arguments;r?clearTimeout(r):i&&n.apply(u,f);r=setTimeout(e,t||100)}};jQuery.fn[t]=function(n){return n?this.on("resize",i(n)):this.trigger(t)}})(jQuery,"clipresize");$(function(){$("button[data-click]").each(function(){var n=$(this);n.on("click",function(){window.location=n.data("click")})})});Main=function(){function rt(n){var t=document.cookie.match("(^|;)\\s*"+n+"\\s*=\\s*([^;]+)");return t?t.pop():""}function ut(n,t,i){var u="",r;i&&(r=new Date,r.setTime(r.getTime()+i*864e5),u="; expires="+r.toUTCString());document.cookie=n+"="+(t||"")+u+"; path=/"}function r(){$("#requestedEmailAddressMessage").text("");$("#requestedEmailAddressConfirmMessage").text("");$.ajax({type:"POST",url:"/EmailRequest/Update",data:{requestedEmailAddress:$("#requestedEmailAddress").val(),requestedEmailAddressConfirm:$("#requestedEmailAddressConfirm").val()}}).done(function(n){at(n)&&$("#emailRequestModal").modal("hide")})}function at(n){var t=!0;return _.each(n,function(i){i.Key==="RequestedEmailAddress"?i.Value.Errors[0]!=null&&(t=!1,$("#requestedEmailAddressMessage").text(n[0].Value.Errors[0].ErrorMessage)):i.Key==="RequestedEmailAddressConfirm"&&i.Value.Errors[0]!=null&&(t=!1,$("#requestedEmailAddressConfirmMessage").text(n[0].Value.Errors[0].ErrorMessage))}),t}var u=function(){if(/MSIE (\d+\.\d+);/.test(navigator.userAgent)){var n=new Number(RegExp.$1);n==8?isIE8=!0:n==9&&(isIE9=!0)}/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)&&(isMobile=!0,$("body").addClass("isMobile"))},t=function(){$windowWidth=$(window).width();$windowHeight=$(window).height();$pageArea=$windowHeight-$("body > .navbar").outerHeight()-$("body > .footer").outerHeight();isMobile||$(".sidebar-search input").removeAttr("style").removeClass("open");n()},n=function(){mainContainer=$(".main-content > .container");mainNavigation=$(".main-navigation");$pageArea<760&&($pageArea=760);mainContainer.outerHeight()<mainNavigation.outerHeight()&&mainNavigation.outerHeight()>$pageArea?mainContainer.css("min-height",mainNavigation.outerHeight()):mainContainer.css("min-height",$pageArea);$windowWidth<768&&mainNavigation.css("min-height",$windowHeight-$("body > .navbar").outerHeight());$("#page-sidebar .sidebar-wrapper").css("height",$windowHeight-$("body > .navbar").outerHeight()).scrollTop(0).perfectScrollbar("update")},f=function(){$(".todo-actions").length&&$(".todo-actions").click(function(){return $(this).find("i").hasClass("fa-square-o")||$(this).find("i").hasClass("icon-check-empty")?($(this).find("i").hasClass("fa")?$(this).find("i").removeClass("fa-square-o").addClass("fa-check-square-o"):$(this).find("i").removeClass("icon-check-empty").addClass("fa fa-check-square-o"),$(this).parent().find("span").css({opacity:.25}),$(this).parent().find(".desc").css("text-decoration","line-through")):($(this).find("i").removeClass("fa-check-square-o").addClass("fa-square-o"),$(this).parent().find("span").css({opacity:1}),$(this).parent().find(".desc").css("text-decoration","none")),!1})},e=function(){$(".tooltips").length&&$(".tooltips").tooltip()},o=function(){$(".popovers").length&&$(".popovers").popover()};$(document).ready(function(){$('[data-toggle="tooltip"]').tooltip({placement:"top"});$('[data-toggle="popover"]').popover({trigger:"hover",placement:"bottom"})});var s=function(){if($(".show-tab").length)$(".show-tab").on("click",function(n){n.preventDefault();var t=$(this).attr("href");$(t).length&&$('a[href="'+t+'"]').tab("show")});i("tabId").length&&$('a[href="#'+i("tabId")+'"]').tab("show")},h=function(){$(".panel-scroll").length&&$(".panel-scroll").perfectScrollbar({wheelSpeed:50,minScrollbarLength:20,suppressScrollX:!0})},c=function(){$(".accordion").length&&$(".accordion .panel-collapse").each(function(){$(this).hasClass("in")||$(this).prev(".panel-heading").find(".accordion-toggle").addClass("collapsed")});$(".accordion").collapse().height("auto");$(".accordion .accordion-toggle").on("click",function(){currentTab=$(this);$("html,body").animate({scrollTop:currentTab.offset().top-100},1e3)})},l=function(){$(".navigation-toggler").on("click",function(){return $("body").hasClass("navigation-small")?$("body").removeClass("navigation-small"):$("body").addClass("navigation-small"),!1});$("body").click(function(){$(this).addClass("navigation-small")})},a=function(){$(".panel-tools .panel-expand").on("click",function(){$(".panel-tools a").not(this).hide();$("body").append('<div class="full-white-backdrop"><\/div>');$(".main-container").removeAttr("style");backdrop=$(".full-white-backdrop");wbox=$(this).parents(".panel");wbox.removeAttr("style");wbox.hasClass("panel-full-screen")?backdrop.fadeIn(200,function(){$(".panel-tools a").show();wbox.removeClass("panel-full-screen");backdrop.fadeOut(200,function(){backdrop.remove()})}):($("body").append('<div class="full-white-backdrop"><\/div>'),backdrop.fadeIn(200,function(){$(".main-container").css({"max-height":$(window).outerHeight()-$("header").outerHeight()-$(".footer").outerHeight()-100,overflow:"hidden"});backdrop.fadeOut(200);backdrop.remove();wbox.addClass("panel-full-screen").css({"max-height":$(window).height(),overflow:"auto"})}))});$(".panel-tools .panel-close").on("click",function(n){$(this).parents(".panel").remove();n.preventDefault()});$(".panel-tools .panel-refresh").on("click",function(n){var t=$(this).parents(".panel");t.block({overlayCSS:{backgroundColor:"#fff"},message:'<img src="/images/loading.gif" /> Just a moment...',css:{border:"none",color:"#333",background:"none"}});window.setTimeout(function(){t.unblock()},1e3);n.preventDefault()});$(".panel-tools .panel-collapse").on("click",function(n){n.preventDefault();var t=jQuery(this).parent().closest(".panel").children(".panel-body");$(this).hasClass("collapses")?($(this).addClass("expand").removeClass("collapses"),t.slideUp(200)):($(this).addClass("collapses").removeClass("expand"),t.slideDown(200))})},v=function(){$(".main-navigation-menu").click(function(n){n.stopPropagation()});$(".main-navigation-menu li.active").addClass("open");$(".main-navigation-menu > li a").on("click",function(){$(this).parent().children("ul").hasClass("sub-menu")&&(!$("body").hasClass("navigation-small")||$windowWidth<767||!$(this).parent().parent().hasClass("main-navigation-menu"))&&($(this).parent().hasClass("open")?$(this).parent().hasClass("active")?$(this).parent().parent().children("li.open").removeClass("open").children("ul").slideUp(200,function(){n()}):$(this).parent().parent().children("li.open").not($(".main-navigation-menu > li.active")).removeClass("open").children("ul").slideUp(200,function(){n()}):($(this).parent().addClass("open"),$(this).parent().parent().children("li.open").not($(this).parent()).not($(".main-navigation-menu > li.active")).removeClass("open").children("ul").slideUp(200),$(this).parent().children("ul").slideDown(200,function(){n()})))})},y=function(){$(".go-top").on("click",function(n){$("html, body").animate({scrollTop:0},"slow");n.preventDefault()})},p=function(){$(".dropdown-menu.dropdown-enduring").length&&$(".dropdown-menu.dropdown-enduring").click(function(n){n.stopPropagation()})},i=function(n){n=n.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var i=new RegExp("[\\?&]"+n+"=([^&#]*)"),t=i.exec(location.search);return t==null?"":decodeURIComponent(t[1].replace(/\+/g," "))},w=function(){var n=$(".sidebar-search input"),t=$(".sidebar-search button"),i=$(".sidebar-search");n.attr("data-default",$(n).outerWidth()).focus(function(){$(this).animate({width:200},200)}).blur(function(){$(this).val()==""&&($(this).hasClass("open")?$(this).animate({width:0,opacity:0},200,function(){$(this).hide()}):$(this).animate({width:$(this).attr("data-default")},200))});t.on("click",function(){if($(n).is(":hidden"))$(n).addClass("open").css({width:0,opacity:0}).show().animate({width:200,opacity:1},200).focus();else if($(n).hasClass("open")&&$(n).val()=="")$(n).removeClass("open").animate({width:0,opacity:0},200,function(){$(this).hide()});else{if($(n).val()!="")return;$(n).focus()}return!1})},b=function(){$(".style-toggle").on("click",function(){$(this).hasClass("open")?($(this).removeClass("open").addClass("close"),$("#style_selector_container").hide()):($(this).removeClass("close").addClass("open"),$("#style_selector_container").show())});k();g();nt();tt();d()};$(".drop-down-wrapper").perfectScrollbar({wheelSpeed:50,minScrollbarLength:20,suppressScrollX:!0});$(".navbar-tools .dropdown").on("shown.bs.dropdown",function(){$(this).find(".drop-down-wrapper").scrollTop(0).perfectScrollbar("update")});var k=function(){$(".icons-color a").on("click",function(){$(".icons-color img").each(function(){$(this).removeClass("active")});$(this).find("img").addClass("active");$("#skin_color").attr("rel")=="stylesheet/less"&&($("#skin_color").next("style").remove(),$("#skin_color").attr("rel","stylesheet"));$("#skin_color").attr("href","css/theme_"+$(this).attr("id")+".css")})},d=function(){$(".boxed-patterns a").on("click",function(){if($("body").hasClass("layout-boxed")){var n=$("body").attr("class").split(" ").filter(function(n){return n.indexOf("bg_style_")===-1?n:""});$("body").attr("class",n.join(" "));$(".boxed-patterns img").each(function(){$(this).removeClass("active")});$(this).find("img").addClass("active");$("body").addClass($(this).attr("id"))}else alert("Select boxed layout")})},g=function(){$('select[name="layout"]').change(function(){$('select[name="layout"] option:selected').val()=="boxed"?$("body").addClass("layout-boxed"):$("body").removeClass("layout-boxed")})},nt=function(){$('select[name="header"]').change(function(){$('select[name="header"] option:selected').val()=="default"?$("body").addClass("header-default"):$("body").removeClass("header-default")})},tt=function(){$('select[name="footer"]').change(function(){$('select[name="footer"] option:selected').val()=="fixed"?$("body").addClass("footer-fixed"):$("body").removeClass("footer-fixed")})},it=function(){if($(".colorpalette").length)$(".colorpalette").colorPalette().on("selectColor",function(n){$(this).closest("ul").prev("a").children("i").css("background-color",n.color).end().closest("div").prev("input").val(n.color)})};var ft=function(){$(window).clipresize(function(){t()})},et=function(){$(".ripple").on("click",function(n){var t;n.preventDefault();var i=$("<div/>"),r=$(this).offset(),u=n.pageX-r.left,f=n.pageY-r.top;i.addClass("ripple-effect");t=$(".ripple-effect");t.css("height",$(this).height());t.css("width",$(this).height());i.css({top:f-t.height()/2,left:u-t.width()/2,background:$(this).data("ripple-color")}).appendTo($(this));window.setTimeout(function(){i.remove()},2e3)})},ot=function(){$(".save_style").on("click",function(){var n={},t;n.rtl=$("body").hasClass("rtl")?!0:!1;$("body").hasClass("layout-boxed")?(n.layoutBoxed=!0,$("body[class]").filter(function(){for(var i=this.className.split(/\s+/),t=0;t<i.length;++t)i[t].substr(0,9)==="bg_style_"&&(n.bgStyle=i[t])})):n.layoutBoxed=!1;n.headerDefault=$("body").hasClass("header-default")?!0:!1;n.footerDefault=$("body").hasClass("footer-fixed")?!1:!0;$("#skin_color").attr("rel")=="stylesheet"?n.useLess=!1:$("#skin_color").attr("rel")=="stylesheet/less"&&(n.useLess=!0,n.baseColor=$(".color-base").val(),n.textColor=$(".color-text").val(),n.badgeColor=$(".color-badge").val());n.skinClass=$("#skin_color").attr("href");t=$("#style_selector_container");t.block({overlayCSS:{backgroundColor:"#fff"},message:'<img src="assets/images/loading.gif" /> Just a moment...',css:{border:"none",color:"#333",background:"none"}});window.setTimeout(function(){t.unblock()},1e3)})},st=function(){$(".clear_style").on("click",function(){$.removeCookie("clip-setting");$("body").removeClass("layout-boxed header-default footer-fixed");$("body")[0].className=$("body")[0].className.replace(/\bbg_style_.*?\b/g,"");$("#skin_color").attr("rel")=="stylesheet/less"&&($("#skin_color").next("style").remove(),$("#skin_color").attr("rel","stylesheet"));$(".icons-color img").first().trigger("click");ht()})},ht=function(){$('#style_selector select[name="layout"]').val("default");$('#style_selector select[name="header"]').val("fixed");$('#style_selector select[name="footer"]').val("default");$("\t\t.boxed-patterns img").removeClass("active");$(".color-base").val("#FFFFFF").next(".dropdown").find("i").css("background-color","#FFFFFF");$(".color-text").val("#555555").next(".dropdown").find("i").css("background-color","#555555");$(".color-badge").val("#007AFF").next(".dropdown").find("i").css("background-color","#007AFF")},ct=function(){$("#countdownTimer").length&&(dataLayer.push({event:"promoImpression",ecommerce:{promoView:{promotions:[{position:"header"}]}}}),$("#countdownTimer").click(function(){dataLayer.push({event:"promotionClick",ecommerce:{promoClick:{promotions:[{position:"header"}]}}})}))},lt=function(){if(rt("em-req-modal-hide")!=="yes"&&$("#showEmailRequestModal").length&&$("#showEmailRequestModal").val()!=="None"){$("#dismissEmailRequestModal").click(function(){$.ajax({type:"POST",url:"/EmailRequest/NoUpdate"}).done(function(){$("#emailRequestModal").modal("hide")})});$("#updateEmailRequest").click(function(){r()});$("#emailRequestModal").on("hidden.bs.modal",function(){ut("em-req-modal-hide","yes")});$("#emailRequestForm input").keypress(function(n){n.which==13&&(n.preventDefault(),r())});$("#emailRequestModal").modal()}};return{init:function(){ft();u();b();w();t();f();l();v();y();et();a();p();e();o();h();s();c();it();ot();st();lt();window.addEventListener("CookiebotOnTagsExecuted",ct)}}}(),function(n){n(jQuery)}(function(n){function e(i){var r=i||window.event,y=h.call(arguments,1),o=0,e=0,f=0,l=0,a,v;if(i=n.event.fix(r),i.type="mousewheel","detail"in r&&(f=r.detail*-1),"wheelDelta"in r&&(f=r.wheelDelta),"wheelDeltaY"in r&&(f=r.wheelDeltaY),"wheelDeltaX"in r&&(e=r.wheelDeltaX*-1),"axis"in r&&r.axis===r.HORIZONTAL_AXIS&&(e=f*-1,f=0),o=f===0?e:f,"deltaY"in r&&(f=r.deltaY*-1,o=f),"deltaX"in r&&(e=r.deltaX,f===0&&(o=e*-1)),f!==0||e!==0)return r.deltaMode===1?(a=n.data(this,"mousewheel-line-height"),o*=a,f*=a,e*=a):r.deltaMode===2&&(v=n.data(this,"mousewheel-page-height"),o*=v,f*=v,e*=v),l=Math.max(Math.abs(f),Math.abs(e)),(!t||l<t)&&(t=l,s(r,l)&&(t/=40)),s(r,l)&&(o/=40,e/=40,f/=40),o=Math[o>=1?"floor":"ceil"](o/t),e=Math[e>=1?"floor":"ceil"](e/t),f=Math[f>=1?"floor":"ceil"](f/t),i.deltaX=e,i.deltaY=f,i.deltaFactor=t,i.deltaMode=0,y.unshift(i,o,e,f),u&&clearTimeout(u),u=setTimeout(c,200),(n.event.dispatch||n.event.handle).apply(this,y)}function c(){t=null}function s(n,t){return r.settings.adjustOldDeltas&&n.type==="mousewheel"&&t%120==0}var o=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],i="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],h=Array.prototype.slice,u,t,f,r;if(n.event.fixHooks)for(f=o.length;f;)n.event.fixHooks[o[--f]]=n.event.mouseHooks;r=n.event.special.mousewheel={version:"3.1.9",setup:function(){if(this.addEventListener)for(var t=i.length;t;)this.addEventListener(i[--t],e,!1);else this.onmousewheel=e;n.data(this,"mousewheel-line-height",r.getLineHeight(this));n.data(this,"mousewheel-page-height",r.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var n=i.length;n;)this.removeEventListener(i[--n],e,!1);else this.onmousewheel=null},getLineHeight:function(t){return parseInt(n(t)["offsetParent"in n.fn?"offsetParent":"parent"]().css("fontSize"),10)},getPageHeight:function(t){return n(t).height()},settings:{adjustOldDeltas:!0}};n.fn.extend({mousewheel:function(n){return n?this.bind("mousewheel",n):this.trigger("mousewheel")},unmousewheel:function(n){return this.unbind("mousewheel",n)}})});define("shoppingCart/event-tracker",["jquery","google-analytics","class"],function(n,t){"use strict";var i={ViewCart:"View Cart",Checkout:"Checkout",TopNav:"Top Nav"};return Object.subClass({init:function(n){this.$window=n;this.ga=new t(n);this.trackingAllowed=Cookiebot&&Cookiebot.consent&&Cookiebot.consent.statistics},addProduct:function(n){window.dataLayer&&!this.disabled&&this.trackingAllowed&&(this.ga.trackEvent(i.ViewCart,"add_to_cart",n.name,n.price),dataLayer.push({event:"productClick",ecommerce:{click:{products:[{id:n.id,name:n.name,price:n.price,quantity:1}]}}}),dataLayer.push({event:"add_to_cart",ecommerce:{currency:"USD",value:n.price,items:[{item_id:n.id,item_name:n.name,price:n.price,quantity:1}]}}))},hoverAddProduct:function(n){!this.disabled&&this.trackingAllowed&&this.ga.trackEvent(i.ViewCart,"Hover Add Product",n.name,n.price)},addKitBottom:function(n){!this.disabled&&this.trackingAllowed&&this.ga.trackEvent(i.ViewCart,"Add Kit Bottom",n.getKitsCount())},addKitSummary:function(n){!this.disabled&&this.trackingAllowed&&this.ga.trackEvent(i.ViewCart,"Add Kit Summary",n.getKitsCount())},removeProduct:function(n){window.dataLayer&&!this.disabled&&this.trackingAllowed&&(this.ga.trackEvent(i.ViewCart,"Remove Product",n.name,n.price),dataLayer.push({event:"remove_from_cart",ecommerce:{currency:"USD",value:n.price,items:[{item_id:n.id,item_name:n.name,price:n.price,quantity:1}]}}))},removeProductSummary:function(n){window.dataLayer&&!this.disabled&&this.trackingAllowed&&(this.ga.trackEvent(i.ViewCart,"Remove Product Summary",n.name,n.price),dataLayer.push({event:"summary_remove_from_cart",ecommerce:{currency:"USD",value:n.price,items:[{item_id:n.id,item_name:n.name,price:n.price,quantity:1}]}}))},removeKitSummary:function(n){!this.disabled&&this.trackingAllowed&&this.ga.trackEvent(i.ViewCart,"Remove Kit Summary",n.getKitsCount()+1,n.price)},couponAttempt:function(n){!this.disabled&&this.trackingAllowed&&this.ga.trackEvent(i.ViewCart,"Coupon Attempt",n)},couponSuccess:function(n){!this.disabled&&this.trackingAllowed&&this.ga.trackEvent(i.ViewCart,"Coupon Success",n)},couponInvalid:function(n){!this.disabled&&this.trackingAllowed&&this.ga.trackEvent(i.ViewCart,"Coupon Invalid",n)},couponRemoved:function(n){!this.disabled&&this.trackingAllowed&&this.ga.trackEvent(i.ViewCart,"Coupon Removed",n)},checkoutButton:function(n){!this.disabled&&this.trackingAllowed&&this.ga.trackEvent(i.ViewCart,"Checkout Button",n.getKitsCount(),n.price);window.Cookiebot&&Cookiebot.consent&&Cookiebot.consent.marketing===!0&&typeof fbq=="function"&&window.fbq("track","InitiateCheckout",{currency:"USD",value:n.price})},cartExit:function(n){!this.disabled&&this.trackingAllowed&&this.ga.trackEvent(i.ViewCart,"Cart Exit",n.getKitsCount(),n.price)},genderNotSelected:function(n){!this.disabled&&this.trackingAllowed&&this.ga.trackEvent(i.ViewCart,"Gender Not Selected",n.getDisplayKitNumber())},proceedAttemptWithNoProducts:function(n){!this.disabled&&this.trackingAllowed&&this.ga.trackEvent(i.ViewCart,"No Products Selected",n.getDisplayKitNumber())},kitSelect:function(n){!this.disabled&&this.trackingAllowed&&this.ga.trackEvent(i.ViewCart,"Kit Select",n.getDisplayKitNumber())},nameKitSuccess:function(n){!this.disabled&&this.trackingAllowed&&this.ga.trackEvent(i.ViewCart,"Name Kit Success",n)},loginAttempt:function(n){!this.disabled&&this.trackingAllowed&&this.ga.trackEvent(i.ViewCart,"Log In Attempt",n)},loginSuccess:function(n){!this.disabled&&this.trackingAllowed&&this.ga.trackEvent(i.ViewCart,"Log In Success",n)},loginInvalid:function(n){!this.disabled&&this.trackingAllowed&&this.ga.trackEvent(i.ViewCart,"Log In Invalid",n)},editCart:function(n,t){!this.disabled&&this.trackingAllowed&&this.ga.trackEvent(i.Checkout,"Edit Cart",n.getKitsCount(),t)},termsOfServiceClick:function(n,t){!this.disabled&&this.trackingAllowed&&this.ga.trackEvent(i.Checkout,"TOS Click",n.getKitsCount(),t)},purchasePolicyClick:function(n,t){!this.disabled&&this.trackingAllowed&&this.ga.trackEvent(i.Checkout,"Purchase Policy Click",n.getKitsCount(),t)},completeOrder:function(n,t){!this.disabled&&this.trackingAllowed&&this.ga.trackEvent(i.Checkout,"Complete Button",n.getKitsCount(),t)},addProductButton:function(n,t,i){if(window.dataLayer&&!this.disabled&&this.trackingAllowed){this.ga.trackEvent(this.$window.location.pathname,"add_to_cart",n);var r=[];r.push({item_id:n,item_name:t,price:i,quantity:1});dataLayer.push({event:"productClick",ecommerce:{click:{products:r}}});dataLayer.push({event:"add_to_cart",ecommerce:{currency:"USD",value:i,items:r}})}},kitSelectFromButtom:function(n){!this.disabled&&this.trackingAllowed&&this.ga.trackEvent(this.$window.location.pathname,"Kit Select",n)},openCartFromIcon:function(n){!this.disabled&&this.trackingAllowed&&this.ga.trackEvent(i.TopNav,"Open Cart",n)},onCartView:function(n){var u,t,i,r;if(window.dataLayer&&!this.disabled&&this.trackingAllowed){for(this.ga.trackPageView(this.$window.location.pathname.replace("//","/")),u=[],t=0;t<n.kits.length;t++)for(i=0;i<n.kits[t].productsInCart.length;i++)r=n.kits[t].productsInCart[i].product,u.push({item_id:r.id,item_name:r.name,price:r.price,quantity:1});dataLayer.push({event:"view_cart",ecommerce:{actionField:{step:1},currency:"USD",value:n.invoicePrice,items:u}})}},onCheckoutView:function(n){var u,t,i,r;if(window.dataLayer&&!this.disabled&&this.trackingAllowed){for(this.ga.trackPageView(this.$window.location.pathname.replace("//","/")),u=[],t=0;t<n.kits.length;t++)for(i=0;i<n.kits[t].productsInCart.length;i++)r=n.kits[t].productsInCart[i].product,u.push({item_id:r.id,item_name:r.name,price:r.price,quantity:1});dataLayer.push({event:"begin_checkout",ecommerce:{actionField:{step:2},currency:"USD",value:n.invoicePrice,items:u}})}},trackTransaction:function(t){var i,r,u;window.dataLayer&&this.trackingAllowed&&(i={transactionId:t.id.substring(t.id.length-8),affiliation:t.affiliateId,total:t.amount,tax:t.tax,shipping:t.shippingAmount,city:t.city,state:t.state,country:t.country,items:n.map(t.items,function(n){return{transactionId:t.id.substring(t.id.length-8),sku:n.productId,name:n.name,category:n.category,price:n.price,quantity:n.quantity}})},dataLayer.push({event:"checkout3",ecommerce:{actionField:{step:3},products:n.map(t.items,function(n){return{item_id:n.productId,item_name:n.name,item_category:n.category,price:n.price,quantity:n.quantity}})}}),r={event:"purchase",purchase:{transaction_id:t.id.substring(t.id.length-8),affiliation:t.ftdnaRef,customerStatus:t.customerStatus,value:t.amount,currency:"USD",tax:t.tax,shipping:t.shippingAmount,coupon:t.coupon,items:n.map(t.items,function(n){return{item_id:n.productId,item_name:n.name,item_category:n.category,price:n.price,quantity:n.quantity}})}},dataLayer.push(r),t.billMeLater||(u={event:"rakuten-purchase",rakutenPurchase:{transactionId:t.id.substring(t.id.length-8),totalAmount:t.amount,coupon:t.coupon,customerStatus:t.customerStatus,taxAmount:t.tax,shippingAmount:t.shippingAmount,paymentId:t.paymentId,items:n.map(t.itemsNoShipping,function(n){return{SKU:n.productId,productName:n.name,unitPrice:n.price,quantity:n.quantity}})}},dataLayer.push(u)),this.ga.trackTransaction(i),fbq("track","Purchase",{currency:"USD",value:t.amount}))},disable:function(){this.disabled=!0}})});define("common/pageInit",["jquery","shoppingCart/event-tracker","google-analytics","controls/addproduct"],function(n,t,i){"use strict";var r={};return{init:function(t){var u=this;r=t||{};n(function(){n(".add-product-button").addproduct({showCart:function(n){window.dispatchEvent(new CustomEvent("try-add-to-cart",{detail:n}))}});u.initHeader(r);var t=new i(window);n("#saleBanner").click(function(){t.trackEvent("Promo Banner","Click","Page banner was clicked on");window.location="shopping-cart"});n("span#countdownTimer a").click(function(){ga("send","event","Sale Banner","Click Buy Now","Summer Sale 2014")});attachTimer()})},initButton:function(n){var t=this;n&&n.length&&n.addproduct({showCart:function(n){window.dispatchEvent(new CustomEvent("try-add-to-cart",{detail:n}))}})},initHeader:function(i){var r=this;i=i||{};n(".show-cart").click(function(){var i=new t(window);i.openCartFromIcon(n(this).find("#headerCartCounter").text()||"0")})}}});require(["common/pageInit"],function(n){n.init()});define("controls/addproduct",["jquery","shoppingCart/event-tracker"],function(n,t,i){"use strict";n.widget("ftdna.addproduct",{options:{showCart:function(){console.log("No callback has been set to show the cart.")}},_create:function(r){var u=this;u.kitList=n("<ul>").addClass("add-product-kit-list").hide().appendTo("body");u.element.click(function(r){var f=u.element.data("id"),o=u.element.data("rid"),s=u.element.data("name"),h=u.element.data("price"),c=u.element.data("oc"),l=u.element.data("male"),a=u.element.data("c"),v=u.element.data("fs"),y=u.element.data("project"),e;return u.kitList.children().length>1?u.kitList.toggle().position({my:"left center",at:"right center",of:u.element,collision:"flip flip"}):l&&u.kitList.children().first().hasClass("female")?u._showProductGenderNotAllowed(u.element):u.options.showCart({cartOptions:{productId:f,offerCode:c||i,coupon:a||i,fs:v||i,resellerId:o||i,project:y||i}}),n(".add-product-kit-list").not(u.kitList).hide(),r.stopPropagation(),e=new t(window),e.addProductButton(f,s,h),!1});n("body").click(function(){u.kitList.hide();n("#addProductGenderNotAllowed").hide()});u._setOptions(r||{})},_init:function(){n("#addProductNotAllowed").length==0&&n("<div id='addProductGenderNotAllowed' class='tooltip_warning'><div class='tooltip_warning_header'><i><strong>Test cannot be added to shopping cart<\/strong><\/i><\/div> <p>Y- DNA tests are for males only. Please add this test to a male kit in your shopping cart.<\/p> <div class='triangle'><\/div><\/div>").hide().appendTo("body")},_loadKitList:function(r){var u=this,f=u.element.data("id"),e=u.element.data("rid"),o=u.element.data("oc"),s=u.element.data("male"),h=u.element.data("c"),c=u.element.data("fs"),l=u.element.data("project");u.kitList.empty().append(n.map(r,function(r){var v="Kit #"+(r.kitNum||r.kitIndex),a=r.name?v+(" - "+r.name):v;return r.female!==null&&(a=a+" ("+(r.female?"Female":"Male")+")"),n("<li>").text(a).addClass(r.female===!0?"female":"").click(function(a){if(s&&r.female)u._showProductGenderNotAllowed(n(this));else{u.options.showCart({cartOptions:{productId:f,offerCode:o||i,coupon:h||i,fs:c||i,resellerId:e||i,project:l||i}});u.kitList.hide();n("#addProductGenderNotAllowed").hide();var v=new t(window);v.kitSelectFromButtom(r.kitNum||r.kitIndex)}a.stopPropagation()})}))},_showProductGenderNotAllowed:function(t){n("#addProductGenderNotAllowed").show().position({my:"right-10",at:"left",of:t,collision:"flip flip"})}})})