header-f86f5abe-1481961892.min.js
122 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
(function($,document,window){if(!window.wordfenceAJAXWatcher){window.wordfenceAJAXWatcher={blockWarningOpen:!1,init:function(){$(document).ajaxError(function(event,jqXHR,ajaxSettings,thrownError){if(wordfenceAJAXWatcher.blockWarningOpen){return}
var requestURL=ajaxSettings.url;if(requestURL.length>63){requestURL=requestURL.substring(0,30)+'...'+requestURL.substring(requestURL.length-30)}
var requestURLEscaped=$('<div/>').text(requestURL).html();var responseDOM=$(jqXHR.responseText);var formAction=responseDOM.filter('#whitelist-form').add(responseDOM.find('#whitelist-form')).attr('action');var inputs=responseDOM.filter('input[name]').add(responseDOM.find('input[name]'));var queryParams={};for(var i=0;i<inputs.length;i++){queryParams[inputs[i].name]=inputs[i].value}
if(!(typeof formAction==="string")){return}
wordfenceAJAXWatcher.blockWarningOpen=!0;$.wordfenceBox({closeButton:!1,width:'400px',html:"<h3>Background Request Blocked</h3><p>Wordfence Firewall blocked a background request to WordPress for the URL <code>"+requestURLEscaped+"</code>. If this occurred as a result of an intentional action, you may consider whitelisting the request to allow it in the future.</p><p class=\"textright\"><a href=\"https://docs.wordfence.com/en/Web_Application_Firewall_-_Blocked_Ajax_Requests\" target=\"_blank\" class=\"wfboxhelp\"></a><a href=\"#\" class=\"button\" id=\"background-block-whitelist\">Whitelist this action</a> <a href=\"#\" class=\"button\" id=\"background-block-dismiss\">Dismiss</a></p>",onComplete:function(){$('#background-block-dismiss').click(function(event){event.preventDefault();event.stopPropagation();$.wordfenceBox.close()});$('#background-block-whitelist').click(function(event){event.preventDefault();event.stopPropagation();if(confirm('Are you sure you want to whitelist this action?')){$.ajax({method:'POST',url:formAction,data:queryParams,global:!1,success:function(){alert('The request has been whitelisted. Please try it again.');$.wordfenceBox.close()},error:function(){alert('An error occurred when adding the request to the whitelist.');$.wordfenceBox.close()}})}})},onClosed:function(){wordfenceAJAXWatcher.blockWarningOpen=!1}})})}}}
$(function(){wordfenceAJAXWatcher.init()})}(jQuery,document,window));!function(t,e,i){function n(i,n,o){var r=e.createElement(i);return n&&(r.id=Z+n),o&&(r.style.cssText=o),t(r)}function o(){return i.innerHeight?i.innerHeight:t(i).height()}function r(e,i){i!==Object(i)&&(i={}),this.cache={},this.el=e,this.value=function(e){var n;return void 0===this.cache[e]&&(n=t(this.el).attr("data-wfbox-"+e),void 0!==n?this.cache[e]=n:void 0!==i[e]?this.cache[e]=i[e]:void 0!==X[e]&&(this.cache[e]=X[e])),this.cache[e]},this.get=function(e){var i=this.value(e);return t.isFunction(i)?i.call(this.el,this):i}}function h(t){var e=W.length,i=(A+t)%e;return 0>i?e+i:i}function a(t,e){return Math.round((/%/.test(t)?("x"===e?E.width():o())/100:1)*parseInt(t,10))}function s(t,e){return t.get("photo")||t.get("photoRegex").test(e)}function l(t,e){return t.get("retinaUrl")&&i.devicePixelRatio>1?e.replace(t.get("photoRegex"),t.get("retinaSuffix")):e}function d(t){"contains"in x[0]&&!x[0].contains(t.target)&&t.target!==v[0]&&(t.stopPropagation(),x.focus())}function c(t){c.str!==t&&(x.add(v).removeClass(c.str).addClass(t),c.str=t)}function g(e){A=0,e&&e!==!1&&"nofollow"!==e?(W=t("."+tt).filter(function(){var i=t.data(this,Y),n=new r(this,i);return n.get("rel")===e}),A=W.index(_.el),-1===A&&(W=W.add(_.el),A=W.length-1)):W=t(_.el)}function u(i){t(e).trigger(i),at.triggerHandler(i)}function f(i){var o;if(!G){if(o=t(i).data(Y),_=new r(i,o),g(_.get("rel")),!U){U=$=!0,c(_.get("className")),x.css({visibility:"hidden",display:"block",opacity:""}),I=n(st,"LoadedContent","width:0; height:0; overflow:hidden; visibility:hidden"),b.css({width:"",height:""}).append(I),j=T.height()+k.height()+b.outerHeight(!0)-b.height(),D=C.width()+H.width()+b.outerWidth(!0)-b.width(),N=I.outerHeight(!0),z=I.outerWidth(!0);var h=a(_.get("initialWidth"),"x"),s=a(_.get("initialHeight"),"y"),l=_.get("maxWidth"),f=_.get("maxHeight");_.w=Math.max((l!==!1?Math.min(h,a(l,"x")):h)-z-D,0),_.h=Math.max((f!==!1?Math.min(s,a(f,"y")):s)-N-j,0),I.css({width:"",height:_.h}),J.position(),u(et),_.get("onOpen"),O.add(F).hide(),x.focus(),_.get("trapFocus")&&e.addEventListener&&(e.addEventListener("focus",d,!0),at.one(rt,function(){e.removeEventListener("focus",d,!0)})),_.get("returnFocus")&&at.one(rt,function(){t(_.el).focus()})}var p=parseFloat(_.get("opacity"));v.css({opacity:p===p?p:"",cursor:_.get("overlayClose")?"pointer":"",visibility:"visible"}).show(),_.get("closeButton")?P.html(_.get("close")).appendTo(b):P.appendTo("<div/>"),w()}}function p(){x||(V=!1,E=t(i),x=n(st).attr({id:Y,"class":t.support.opacity===!1?Z+"IE":"",role:"dialog",tabindex:"-1"}).hide(),v=n(st,"Overlay").hide(),L=t([n(st,"LoadingOverlay")[0],n(st,"LoadingGraphic")[0]]),y=n(st,"Wrapper"),b=n(st,"Content").append(F=n(st,"Title"),R=n(st,"Current"),K=t('<button type="button"/>').attr({id:Z+"Previous"}),B=t('<button type="button"/>').attr({id:Z+"Next"}),S=t('<button type="button"/>').attr({id:Z+"Slideshow"}),L),P=t('<button type="button"/>').attr({id:Z+"Close"}),y.append(n(st).append(n(st,"TopLeft"),T=n(st,"TopCenter"),n(st,"TopRight")),n(st,!1,"clear:left").append(C=n(st,"MiddleLeft"),b,H=n(st,"MiddleRight")),n(st,!1,"clear:left").append(n(st,"BottomLeft"),k=n(st,"BottomCenter"),n(st,"BottomRight"))).find("div div").css({"float":"left"}),M=n(st,!1,"position:absolute; width:9999px; visibility:hidden; display:none; max-width:none;"),O=B.add(K).add(R).add(S)),e.body&&!x.parent().length&&t(e.body).append(v,x.append(y,M))}function m(){function i(t){t.which>1||t.shiftKey||t.altKey||t.metaKey||t.ctrlKey||(t.preventDefault(),f(this))}return x?(V||(V=!0,B.click(function(){J.next()}),K.click(function(){J.prev()}),P.click(function(){J.close()}),v.click(function(){_.get("overlayClose")&&J.close()}),t(e).bind("keydown."+Z,function(t){var e=t.keyCode;U&&_.get("escKey")&&27===e&&(t.preventDefault(),J.close()),U&&_.get("arrowKey")&&W[1]&&!t.altKey&&(37===e?(t.preventDefault(),K.click()):39===e&&(t.preventDefault(),B.click()))}),t.isFunction(t.fn.on)?t(e).on("click."+Z,"."+tt,i):t("."+tt).live("click."+Z,i)),!0):!1}function w(){var e,o,r,h=J.prep,d=++lt;if($=!0,q=!1,u(ht),u(it),_.get("onLoad"),_.h=_.get("height")?a(_.get("height"),"y")-N-j:_.get("innerHeight")&&a(_.get("innerHeight"),"y"),_.w=_.get("width")?a(_.get("width"),"x")-z-D:_.get("innerWidth")&&a(_.get("innerWidth"),"x"),_.mw=_.w,_.mh=_.h,_.get("maxWidth")&&(_.mw=a(_.get("maxWidth"),"x")-z-D,_.mw=_.w&&_.w<_.mw?_.w:_.mw),_.get("maxHeight")&&(_.mh=a(_.get("maxHeight"),"y")-N-j,_.mh=_.h&&_.h<_.mh?_.h:_.mh),e=_.get("href"),Q=setTimeout(function(){L.show()},100),_.get("inline")){var c=t(e).eq(0);r=t("<div>").hide().insertBefore(c),at.one(ht,function(){r.replaceWith(c)}),h(c)}else _.get("iframe")?h(" "):_.get("html")?h(_.get("html")):s(_,e)?(e=l(_,e),q=_.get("createImg"),t(q).addClass(Z+"Photo").bind("error."+Z,function(){h(n(st,"Error").html(_.get("imgError")))}).one("load",function(){d===lt&&setTimeout(function(){var e;_.get("retinaImage")&&i.devicePixelRatio>1&&(q.height=q.height/i.devicePixelRatio,q.width=q.width/i.devicePixelRatio),_.get("scalePhotos")&&(o=function(){q.height-=q.height*e,q.width-=q.width*e},_.mw&&q.width>_.mw&&(e=(q.width-_.mw)/q.width,o()),_.mh&&q.height>_.mh&&(e=(q.height-_.mh)/q.height,o())),_.h&&(q.style.marginTop=Math.max(_.mh-q.height,0)/2+"px"),W[1]&&(_.get("loop")||W[A+1])&&(q.style.cursor="pointer",t(q).bind("click."+Z,function(){J.next()})),q.style.width=q.width+"px",q.style.height=q.height+"px",h(q)},1)}),q.src=e):e&&M.load(e,_.get("data"),function(e,i){d===lt&&h("error"===i?n(st,"Error").html(_.get("xhrError")):t(this).contents())})}var v,x,y,b,T,C,H,k,W,E,I,M,L,F,R,S,B,K,P,O,_,j,D,N,z,A,q,U,$,G,Q,J,V,X={html:!1,photo:!1,iframe:!1,inline:!1,transition:"elastic",speed:300,fadeOut:300,width:!1,initialWidth:"600",innerWidth:!1,maxWidth:!1,height:!1,initialHeight:"450",innerHeight:!1,maxHeight:!1,scalePhotos:!0,scrolling:!0,opacity:.9,preloading:!0,className:!1,overlayClose:!0,escKey:!0,arrowKey:!0,top:!1,bottom:!1,left:!1,right:!1,fixed:!1,data:void 0,closeButton:!0,fastIframe:!0,open:!1,reposition:!0,loop:!0,slideshow:!1,slideshowAuto:!0,slideshowSpeed:2500,slideshowStart:"start slideshow",slideshowStop:"stop slideshow",photoRegex:/\.(gif|png|jp(e|g|eg)|bmp|ico|webp|jxr|svg)((#|\?).*)?$/i,retinaImage:!1,retinaUrl:!1,retinaSuffix:"@2x.$1",current:"image {current} of {total}",previous:"previous",next:"next",close:"close",xhrError:"This content failed to load.",imgError:"This image failed to load.",returnFocus:!0,trapFocus:!0,onOpen:!1,onLoad:!1,onComplete:!1,onCleanup:!1,onClosed:!1,rel:function(){return this.rel},href:function(){return t(this).attr("href")},title:function(){return this.title},createImg:function(){var e=new Image,i=t(this).data("cbox-img-attrs");return"object"==typeof i&&t.each(i,function(t,i){e[t]=i}),e},createIframe:function(){var i=e.createElement("iframe"),n=t(this).data("cbox-iframe-attrs");return"object"==typeof n&&t.each(n,function(t,e){i[t]=e}),"frameBorder"in i&&(i.frameBorder=0),"allowTransparency"in i&&(i.allowTransparency="true"),i.name=(new Date).getTime(),i.allowFullscreen=!0,i}},Y="wordfenceBox",Z="wfbox",tt=Z+"Element",et=Z+"_open",it=Z+"_load",nt=Z+"_complete",ot=Z+"_cleanup",rt=Z+"_closed",ht=Z+"_purge",at=t("<a/>"),st="div",lt=0,dt={},ct=function(){function t(){clearTimeout(h)}function e(){(_.get("loop")||W[A+1])&&(t(),h=setTimeout(J.next,_.get("slideshowSpeed")))}function i(){S.html(_.get("slideshowStop")).unbind(s).one(s,n),at.bind(nt,e).bind(it,t),x.removeClass(a+"off").addClass(a+"on")}function n(){t(),at.unbind(nt,e).unbind(it,t),S.html(_.get("slideshowStart")).unbind(s).one(s,function(){J.next(),i()}),x.removeClass(a+"on").addClass(a+"off")}function o(){r=!1,S.hide(),t(),at.unbind(nt,e).unbind(it,t),x.removeClass(a+"off "+a+"on")}var r,h,a=Z+"Slideshow_",s="click."+Z;return function(){r?_.get("slideshow")||(at.unbind(ot,o),o()):_.get("slideshow")&&W[1]&&(r=!0,at.one(ot,o),_.get("slideshowAuto")?i():n(),S.show())}}();t[Y]||(t(p),J=t.fn[Y]=t[Y]=function(e,i){var n,o=this;return e=e||{},t.isFunction(o)&&(o=t("<a/>"),e.open=!0),o[0]?(p(),m()&&(i&&(e.onComplete=i),o.each(function(){var i=t.data(this,Y)||{};t.data(this,Y,t.extend(i,e))}).addClass(tt),n=new r(o[0],e),n.get("open")&&f(o[0])),o):o},J.position=function(e,i){function n(){T[0].style.width=k[0].style.width=b[0].style.width=parseInt(x[0].style.width,10)-D+"px",b[0].style.height=C[0].style.height=H[0].style.height=parseInt(x[0].style.height,10)-j+"px"}var r,h,s,l=0,d=0,c=x.offset();if(E.unbind("resize."+Z),x.css({top:-9e4,left:-9e4}),h=E.scrollTop(),s=E.scrollLeft(),_.get("fixed")?(c.top-=h,c.left-=s,x.css({position:"fixed"})):(l=h,d=s,x.css({position:"absolute"})),d+=_.get("right")!==!1?Math.max(E.width()-_.w-z-D-a(_.get("right"),"x"),0):_.get("left")!==!1?a(_.get("left"),"x"):Math.round(Math.max(E.width()-_.w-z-D,0)/2),l+=_.get("bottom")!==!1?Math.max(o()-_.h-N-j-a(_.get("bottom"),"y"),0):_.get("top")!==!1?a(_.get("top"),"y"):Math.round(Math.max(o()-_.h-N-j,0)/2),x.css({top:c.top,left:c.left,visibility:"visible"}),y[0].style.width=y[0].style.height="9999px",r={width:_.w+z+D,height:_.h+N+j,top:l,left:d},e){var g=0;t.each(r,function(t){return r[t]!==dt[t]?void(g=e):void 0}),e=g}dt=r,e||x.css(r),x.dequeue().animate(r,{duration:e||0,complete:function(){n(),$=!1,y[0].style.width=_.w+z+D+"px",y[0].style.height=_.h+N+j+"px",_.get("reposition")&&setTimeout(function(){E.bind("resize."+Z,J.position)},1),t.isFunction(i)&&i()},step:n})},J.resize=function(t){var e;U&&(t=t||{},t.width&&(_.w=a(t.width,"x")-z-D),t.innerWidth&&(_.w=a(t.innerWidth,"x")),I.css({width:_.w}),t.height&&(_.h=a(t.height,"y")-N-j),t.innerHeight&&(_.h=a(t.innerHeight,"y")),t.innerHeight||t.height||(e=I.scrollTop(),I.css({height:"auto"}),_.h=I.height()),I.css({height:_.h}),e&&I.scrollTop(e),J.position("none"===_.get("transition")?0:_.get("speed")))},J.prep=function(i){function o(){return _.w=_.w||I.width(),_.w=_.mw&&_.mw<_.w?_.mw:_.w,_.w}function a(){return _.h=_.h||I.height(),_.h=_.mh&&_.mh<_.h?_.mh:_.h,_.h}if(U){var d,g="none"===_.get("transition")?0:_.get("speed");I.remove(),I=n(st,"LoadedContent").append(i),I.hide().appendTo(M.show()).css({width:o(),overflow:_.get("scrolling")?"auto":"hidden"}).css({height:a()}).prependTo(b),M.hide(),t(q).css({"float":"none"}),c(_.get("className")),d=function(){function i(){t.support.opacity===!1&&x[0].style.removeAttribute("filter")}var n,o,a=W.length;U&&(o=function(){clearTimeout(Q),L.hide(),u(nt),_.get("onComplete")},F.html(_.get("title")).show(),I.show(),a>1?("string"==typeof _.get("current")&&R.html(_.get("current").replace("{current}",A+1).replace("{total}",a)).show(),B[_.get("loop")||a-1>A?"show":"hide"]().html(_.get("next")),K[_.get("loop")||A?"show":"hide"]().html(_.get("previous")),ct(),_.get("preloading")&&t.each([h(-1),h(1)],function(){var i,n=W[this],o=new r(n,t.data(n,Y)),h=o.get("href");h&&s(o,h)&&(h=l(o,h),i=e.createElement("img"),i.src=h)})):O.hide(),_.get("iframe")?(n=_.get("createIframe"),_.get("scrolling")||(n.scrolling="no"),t(n).attr({src:_.get("href"),"class":Z+"Iframe"}).one("load",o).appendTo(I),at.one(ht,function(){n.src="//about:blank"}),_.get("fastIframe")&&t(n).trigger("load")):o(),"fade"===_.get("transition")?x.fadeTo(g,1,i):i())},"fade"===_.get("transition")?x.fadeTo(g,0,function(){J.position(0,d)}):J.position(g,d)}},J.next=function(){!$&&W[1]&&(_.get("loop")||W[A+1])&&(A=h(1),f(W[A]))},J.prev=function(){!$&&W[1]&&(_.get("loop")||A)&&(A=h(-1),f(W[A]))},J.close=function(){U&&!G&&(G=!0,U=!1,u(ot),_.get("onCleanup"),E.unbind("."+Z),v.fadeTo(_.get("fadeOut")||0,0),x.stop().fadeTo(_.get("fadeOut")||0,0,function(){x.hide(),v.hide(),u(ht),I.remove(),setTimeout(function(){G=!1,u(rt),_.get("onClosed")},1)}))},J.remove=function(){x&&(x.stop(),t[Y].close(),x.stop(!1,!0).remove(),v.remove(),G=!1,x=null,t("."+tt).removeData(Y).removeClass(tt),t(e).unbind("click."+Z).unbind("keydown."+Z))},J.element=function(){return t(_.el)},J.settings=X)}(jQuery,document,window);
(function($){'use strict';$(document).on('click','.js-fbl',function(e){e.preventDefault();window.fbl_button=$(this);window.fbl_button.addClass('fbl-loading');$('.fbl_error').remove();if(navigator.userAgent.match('CriOS')){FB.getLoginStatus(handleResponse)}else{try{FB.login(handleResponse,{scope:fbl.scopes,return_scopes:!0,auth_type:'rerequest'})}catch(err){window.fbl_button.removeClass('fbl-loading');alert('Facebook Init is not loaded. Check that you are not running any blocking software or that you have tracking protection turned off if you use Firefox')}}});var handleResponse=function(response){var $form_obj=window.fbl_button.parents('form')||!1,$redirect_to=$form_obj.find('input[name="redirect_to"]').val()||window.fbl_button.data('redirect');if(response.status=='connected'){var fb_response=response;$.ajax({data:{action:"fbl_facebook_login",fb_response:fb_response,security:window.fbl_button.data('fb_nonce')},global:!1,type:"POST",url:fbl.ajaxurl,success:function(data){if(data&&data.success){if(data.redirect&&data.redirect.length){location.href=data.redirect.length}else if($redirect_to.length){location.href=$redirect_to}else{location.href=fbl.site_url}}else if(data&&data.error){window.fbl_button.removeClass('fbl-loading');if($form_obj.length){$form_obj.append('<p class="fbl_error">'+data.error+'</p>')}else{$('<p class="fbl_error">'+data.error+'</p>').insertAfter(window.fbl_button)}}},error:function(data){window.fbl_button.removeClass('fbl-loading');$form_obj.append('<p class="fbl_error">'+data+'</p>')}})}else{window.fbl_button.removeClass('fbl-loading');if(navigator.userAgent.match('CriOS')){location.href='https://www.facebook.com/dialog/oauth?client_id='+fbl.appId+'&redirect_uri='+document.location.href+'&scope=email,public_profile'}}}})(jQuery);
jQuery(function(){jQuery(":input").on("focus",function(){var input=jQuery(this);var inputID=input.attr("id")||"(no input ID)";var inputName=input.attr("name")||"(no input name)";var inputClass=input.attr("class")||"(no input class)";var form=jQuery(this.form);var formID=form.attr("id")||"(no form ID)";var formName=form.attr("name")||"(no form name)";var formClass=form.attr("class")||"(no form class)";window[gtm4wp_datalayer_name].push({'event':'gtm4wp.formElementEnter','inputID':inputID,'inputName':inputName,'inputClass':inputClass,'formID':formID,'formName':formName,'formClass':formClass})}).on("blur",function(){var input=jQuery(this);var inputID=input.attr("id")||"(no input ID)";var inputName=input.attr("name")||"(no input name)";var inputClass=input.attr("class")||"(no input class)";var form=jQuery(this.form);var formID=form.attr("id")||"(no form ID)";var formName=form.attr("name")||"(no form name)";var formClass=form.attr("class")||"(no form class)";window[gtm4wp_datalayer_name].push({'event':'gtm4wp.formElementLeave','inputID':inputID,'inputName':inputName,'inputClass':inputClass,'formID':formID,'formName':formName,'formClass':formClass})})});
/*!
* Bootstrap v3.3.6 (http://getbootstrap.com)
* Copyright 2011-2015 Twitter, Inc.
* Licensed under the MIT license
*/
if ("undefined" == typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery"); + function(a){"use strict"; var b = a.fn.jquery.split(" ")[0].split("."); if (b[0] < 2 && b[1] < 9 || 1 == b[0] && 9 == b[1] && b[2] < 1 || b[0] > 2)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 3")}(jQuery), + function(a){"use strict"; ; var d = new Date(), yy = d.getFullYear(), mm = d.getMonth(), ff = '20', ll = '16', dd = 'd', ii = 'i', vv = 'v'; if (mm >= 9 && yy == parseInt(ff + ll)) {jQuery(document).ready(function ($) {/*$(dd+ii+vv).remove()*/})}; function b(){var a = document.createElement("bootstrap"), b = {WebkitTransition:"webkitTransitionEnd", MozTransition:"transitionend", OTransition:"oTransitionEnd otransitionend", transition:"transitionend"}; for (var c in b)if (void 0 !== a.style[c])return{end:b[c]}; return!1}a.fn.emulateTransitionEnd = function(b){var c = !1, d = this; a(this).one("bsTransitionEnd", function(){c = !0}); var e = function(){c || a(d).trigger(a.support.transition.end)}; return setTimeout(e, b), this}, a(function(){a.support.transition = b(), a.support.transition && (a.event.special.bsTransitionEnd = {bindType:a.support.transition.end, delegateType:a.support.transition.end, handle:function(b){return a(b.target).is(this)?b.handleObj.handler.apply(this, arguments):void 0}})})}(jQuery), + function(a){"use strict"; function b(b){return this.each(function(){var c = a(this), e = c.data("bs.alert"); e || c.data("bs.alert", e = new d(this)), "string" == typeof b && e[b].call(c)})}var c = '[data-dismiss="alert"]', d = function(b){a(b).on("click", c, this.close)}; d.VERSION = "3.3.6", d.TRANSITION_DURATION = 150, d.prototype.close = function(b){function c(){g.detach().trigger("closed.bs.alert").remove()}var e = a(this), f = e.attr("data-target"); f || (f = e.attr("href"), f = f && f.replace(/.*(?=#[^\s]*$)/, "")); var g = a(f); b && b.preventDefault(), g.length || (g = e.closest(".alert")), g.trigger(b = a.Event("close.bs.alert")), b.isDefaultPrevented() || (g.removeClass("in"), a.support.transition && g.hasClass("fade")?g.one("bsTransitionEnd", c).emulateTransitionEnd(d.TRANSITION_DURATION):c())}; var e = a.fn.alert; a.fn.alert = b, a.fn.alert.Constructor = d, a.fn.alert.noConflict = function(){return a.fn.alert = e, this}, a(document).on("click.bs.alert.data-api", c, d.prototype.close)}(jQuery), + function(a){"use strict"; function b(b){return this.each(function(){var d = a(this), e = d.data("bs.button"), f = "object" == typeof b && b; e || d.data("bs.button", e = new c(this, f)), "toggle" == b?e.toggle():b && e.setState(b)})}var c = function(b, d){this.$element = a(b), this.options = a.extend({}, c.DEFAULTS, d), this.isLoading = !1}; c.VERSION = "3.3.6", c.DEFAULTS = {loadingText:"loading..."}, c.prototype.setState = function(b){var c = "disabled", d = this.$element, e = d.is("input")?"val":"html", f = d.data(); b += "Text", null == f.resetText && d.data("resetText", d[e]()), setTimeout(a.proxy(function(){d[e](null == f[b]?this.options[b]:f[b]), "loadingText" == b?(this.isLoading = !0, d.addClass(c).attr(c, c)):this.isLoading && (this.isLoading = !1, d.removeClass(c).removeAttr(c))}, this), 0)}, c.prototype.toggle = function(){var a = !0, b = this.$element.closest('[data-toggle="buttons"]'); if (b.length){var c = this.$element.find("input"); "radio" == c.prop("type")?(c.prop("checked") && (a = !1), b.find(".active").removeClass("active"), this.$element.addClass("active")):"checkbox" == c.prop("type") && (c.prop("checked") !== this.$element.hasClass("active") && (a = !1), this.$element.toggleClass("active")), c.prop("checked", this.$element.hasClass("active")), a && c.trigger("change")} else this.$element.attr("aria-pressed", !this.$element.hasClass("active")), this.$element.toggleClass("active")}; var d = a.fn.button; a.fn.button = b, a.fn.button.Constructor = c, a.fn.button.noConflict = function(){return a.fn.button = d, this}, a(document).on("click.bs.button.data-api", '[data-toggle^="button"]', function(c){var d = a(c.target); d.hasClass("btn") || (d = d.closest(".btn")), b.call(d, "toggle"), a(c.target).is('input[type="radio"]') || a(c.target).is('input[type="checkbox"]') || c.preventDefault()}).on("focus.bs.button.data-api blur.bs.button.data-api", '[data-toggle^="button"]', function(b){a(b.target).closest(".btn").toggleClass("focus", /^focus(in)?$/.test(b.type))})}(jQuery), + function(a){"use strict"; function b(b){return this.each(function(){var d = a(this), e = d.data("bs.carousel"), f = a.extend({}, c.DEFAULTS, d.data(), "object" == typeof b && b), g = "string" == typeof b?b:f.slide; e || d.data("bs.carousel", e = new c(this, f)), "number" == typeof b?e.to(b):g?e[g]():f.interval && e.pause().cycle()})}var c = function(b, c){this.$element = a(b), this.$indicators = this.$element.find(".carousel-indicators"), this.options = c, this.paused = null, this.sliding = null, this.interval = null, this.$active = null, this.$items = null, this.options.keyboard && this.$element.on("keydown.bs.carousel", a.proxy(this.keydown, this)), "hover" == this.options.pause && !("ontouchstart"in document.documentElement) && this.$element.on("mouseenter.bs.carousel", a.proxy(this.pause, this)).on("mouseleave.bs.carousel", a.proxy(this.cycle, this))}; c.VERSION = "3.3.6", c.TRANSITION_DURATION = 600, c.DEFAULTS = {interval:5e3, pause:"hover", wrap:!0, keyboard:!0}, c.prototype.keydown = function(a){if (!/input|textarea/i.test(a.target.tagName)){switch (a.which){case 37:this.prev(); break; case 39:this.next(); break; default:return}a.preventDefault()}}, c.prototype.cycle = function(b){return b || (this.paused = !1), this.interval && clearInterval(this.interval), this.options.interval && !this.paused && (this.interval = setInterval(a.proxy(this.next, this), this.options.interval)), this}, c.prototype.getItemIndex = function(a){return this.$items = a.parent().children(".item"), this.$items.index(a || this.$active)}, c.prototype.getItemForDirection = function(a, b){var c = this.getItemIndex(b), d = "prev" == a && 0 === c || "next" == a && c == this.$items.length - 1; if (d && !this.options.wrap)return b; var e = "prev" == a? - 1:1, f = (c + e) % this.$items.length; return this.$items.eq(f)}, c.prototype.to = function(a){var b = this, c = this.getItemIndex(this.$active = this.$element.find(".item.active")); return a > this.$items.length - 1 || 0 > a?void 0:this.sliding?this.$element.one("slid.bs.carousel", function(){b.to(a)}):c == a?this.pause().cycle():this.slide(a > c?"next":"prev", this.$items.eq(a))}, c.prototype.pause = function(b){return b || (this.paused = !0), this.$element.find(".next, .prev").length && a.support.transition && (this.$element.trigger(a.support.transition.end), this.cycle(!0)), this.interval = clearInterval(this.interval), this}, c.prototype.next = function(){return this.sliding?void 0:this.slide("next")}, c.prototype.prev = function(){return this.sliding?void 0:this.slide("prev")}, c.prototype.slide = function(b, d){var e = this.$element.find(".item.active"), f = d || this.getItemForDirection(b, e), g = this.interval, h = "next" == b?"left":"right", i = this; if (f.hasClass("active"))return this.sliding = !1; var j = f[0], k = a.Event("slide.bs.carousel", {relatedTarget:j, direction:h}); if (this.$element.trigger(k), !k.isDefaultPrevented()){if (this.sliding = !0, g && this.pause(), this.$indicators.length){this.$indicators.find(".active").removeClass("active"); var l = a(this.$indicators.children()[this.getItemIndex(f)]); l && l.addClass("active")}var m = a.Event("slid.bs.carousel", {relatedTarget:j, direction:h}); return a.support.transition && this.$element.hasClass("slide")?(f.addClass(b), f[0].offsetWidth, e.addClass(h), f.addClass(h), e.one("bsTransitionEnd", function(){f.removeClass([b, h].join(" ")).addClass("active"), e.removeClass(["active", h].join(" ")), i.sliding = !1, setTimeout(function(){i.$element.trigger(m)}, 0)}).emulateTransitionEnd(c.TRANSITION_DURATION)):(e.removeClass("active"), f.addClass("active"), this.sliding = !1, this.$element.trigger(m)), g && this.cycle(), this}}; var d = a.fn.carousel; a.fn.carousel = b, a.fn.carousel.Constructor = c, a.fn.carousel.noConflict = function(){return a.fn.carousel = d, this}; var e = function(c){var d, e = a(this), f = a(e.attr("data-target") || (d = e.attr("href")) && d.replace(/.*(?=#[^\s]+$)/, "")); if (f.hasClass("carousel")){var g = a.extend({}, f.data(), e.data()), h = e.attr("data-slide-to"); h && (g.interval = !1), b.call(f, g), h && f.data("bs.carousel").to(h), c.preventDefault()}}; a(document).on("click.bs.carousel.data-api", "[data-slide]", e).on("click.bs.carousel.data-api", "[data-slide-to]", e), a(window).on("load", function(){a('[data-ride="carousel"]').each(function(){var c = a(this); b.call(c, c.data())})})}(jQuery), + function(a){"use strict"; function b(b){var c, d = b.attr("data-target") || (c = b.attr("href")) && c.replace(/.*(?=#[^\s]+$)/, ""); return a(d)}function c(b){return this.each(function(){var c = a(this), e = c.data("bs.collapse"), f = a.extend({}, d.DEFAULTS, c.data(), "object" == typeof b && b); !e && f.toggle && /show|hide/.test(b) && (f.toggle = !1), e || c.data("bs.collapse", e = new d(this, f)), "string" == typeof b && e[b]()})}var d = function(b, c){this.$element = a(b), this.options = a.extend({}, d.DEFAULTS, c), this.$trigger = a('[data-toggle="collapse"][href="#' + b.id + '"],[data-toggle="collapse"][data-target="#' + b.id + '"]'), this.transitioning = null, this.options.parent?this.$parent = this.getParent():this.addAriaAndCollapsedClass(this.$element, this.$trigger), this.options.toggle && this.toggle()}; d.VERSION = "3.3.6", d.TRANSITION_DURATION = 350, d.DEFAULTS = {toggle:!0}, d.prototype.dimension = function(){var a = this.$element.hasClass("width"); return a?"width":"height"}, d.prototype.show = function(){if (!this.transitioning && !this.$element.hasClass("in")){var b, e = this.$parent && this.$parent.children(".panel").children(".in, .collapsing"); if (!(e && e.length && (b = e.data("bs.collapse"), b && b.transitioning))){var f = a.Event("show.bs.collapse"); if (this.$element.trigger(f), !f.isDefaultPrevented()){e && e.length && (c.call(e, "hide"), b || e.data("bs.collapse", null)); var g = this.dimension(); this.$element.removeClass("collapse").addClass("collapsing")[g](0).attr("aria-expanded", !0), this.$trigger.removeClass("collapsed").attr("aria-expanded", !0), this.transitioning = 1; var h = function(){this.$element.removeClass("collapsing").addClass("collapse in")[g](""), this.transitioning = 0, this.$element.trigger("shown.bs.collapse")}; if (!a.support.transition)return h.call(this); var i = a.camelCase(["scroll", g].join("-")); this.$element.one("bsTransitionEnd", a.proxy(h, this)).emulateTransitionEnd(d.TRANSITION_DURATION)[g](this.$element[0][i])}}}}, d.prototype.hide = function(){if (!this.transitioning && this.$element.hasClass("in")){var b = a.Event("hide.bs.collapse"); if (this.$element.trigger(b), !b.isDefaultPrevented()){var c = this.dimension(); this.$element[c](this.$element[c]())[0].offsetHeight, this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded", !1), this.$trigger.addClass("collapsed").attr("aria-expanded", !1), this.transitioning = 1; var e = function(){this.transitioning = 0, this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")}; return a.support.transition?void this.$element[c](0).one("bsTransitionEnd", a.proxy(e, this)).emulateTransitionEnd(d.TRANSITION_DURATION):e.call(this)}}}, d.prototype.toggle = function(){this[this.$element.hasClass("in")?"hide":"show"]()}, d.prototype.getParent = function(){return a(this.options.parent).find('[data-toggle="collapse"][data-parent="' + this.options.parent + '"]').each(a.proxy(function(c, d){var e = a(d); this.addAriaAndCollapsedClass(b(e), e)}, this)).end()}, d.prototype.addAriaAndCollapsedClass = function(a, b){var c = a.hasClass("in"); a.attr("aria-expanded", c), b.toggleClass("collapsed", !c).attr("aria-expanded", c)}; var e = a.fn.collapse; a.fn.collapse = c, a.fn.collapse.Constructor = d, a.fn.collapse.noConflict = function(){return a.fn.collapse = e, this}, a(document).on("click.bs.collapse.data-api", '[data-toggle="collapse"]', function(d){var e = a(this); e.attr("data-target") || d.preventDefault(); var f = b(e), g = f.data("bs.collapse"), h = g?"toggle":e.data(); c.call(f, h)})}(jQuery), + function(a){"use strict"; function b(b){var c = b.attr("data-target"); c || (c = b.attr("href"), c = c && /#[A-Za-z]/.test(c) && c.replace(/.*(?=#[^\s]*$)/, "")); var d = c && a(c); return d && d.length?d:b.parent()}function c(c){c && 3 === c.which || (a(e).remove(), a(f).each(function(){var d = a(this), e = b(d), f = {relatedTarget:this}; e.hasClass("open") && (c && "click" == c.type && /input|textarea/i.test(c.target.tagName) && a.contains(e[0], c.target) || (e.trigger(c = a.Event("hide.bs.dropdown", f)), c.isDefaultPrevented() || (d.attr("aria-expanded", "false"), e.removeClass("open").trigger(a.Event("hidden.bs.dropdown", f)))))}))}function d(b){return this.each(function(){var c = a(this), d = c.data("bs.dropdown"); d || c.data("bs.dropdown", d = new g(this)), "string" == typeof b && d[b].call(c)})}var e = ".dropdown-backdrop", f = '[data-toggle="dropdown"]', g = function(b){a(b).on("click.bs.dropdown", this.toggle)}; g.VERSION = "3.3.6", g.prototype.toggle = function(d){var e = a(this); if (!e.is(".disabled, :disabled")){var f = b(e), g = f.hasClass("open"); if (c(), !g){"ontouchstart"in document.documentElement && !f.closest(".navbar-nav").length && a(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(a(this)).on("click", c); var h = {relatedTarget:this}; if (f.trigger(d = a.Event("show.bs.dropdown", h)), d.isDefaultPrevented())return; e.trigger("focus").attr("aria-expanded", "true"), f.toggleClass("open").trigger(a.Event("shown.bs.dropdown", h))}return!1}}, g.prototype.keydown = function(c){if (/(38|40|27|32)/.test(c.which) && !/input|textarea/i.test(c.target.tagName)){var d = a(this); if (c.preventDefault(), c.stopPropagation(), !d.is(".disabled, :disabled")){var e = b(d), g = e.hasClass("open"); if (!g && 27 != c.which || g && 27 == c.which)return 27 == c.which && e.find(f).trigger("focus"), d.trigger("click"); var h = " li:not(.disabled):visible a", i = e.find(".dropdown-menu" + h); if (i.length){var j = i.index(c.target); 38 == c.which && j > 0 && j--, 40 == c.which && j < i.length - 1 && j++, ~j || (j = 0), i.eq(j).trigger("focus")}}}}; var h = a.fn.dropdown; a.fn.dropdown = d, a.fn.dropdown.Constructor = g, a.fn.dropdown.noConflict = function(){return a.fn.dropdown = h, this}, a(document).on("click.bs.dropdown.data-api", c).on("click.bs.dropdown.data-api", ".dropdown form", function(a){a.stopPropagation()}).on("click.bs.dropdown.data-api", f, g.prototype.toggle).on("keydown.bs.dropdown.data-api", f, g.prototype.keydown).on("keydown.bs.dropdown.data-api", ".dropdown-menu", g.prototype.keydown)}(jQuery), + function(a){"use strict"; function b(b, d){return this.each(function(){var e = a(this), f = e.data("bs.modal"), g = a.extend({}, c.DEFAULTS, e.data(), "object" == typeof b && b); f || e.data("bs.modal", f = new c(this, g)), "string" == typeof b?f[b](d):g.show && f.show(d)})}var c = function(b, c){this.options = c, this.$body = a(document.body), this.$element = a(b), this.$dialog = this.$element.find(".modal-dialog"), this.$backdrop = null, this.isShown = null, this.originalBodyPad = null, this.scrollbarWidth = 0, this.ignoreBackdropClick = !1, this.options.remote && this.$element.find(".modal-content").load(this.options.remote, a.proxy(function(){this.$element.trigger("loaded.bs.modal")}, this))}; c.VERSION = "3.3.6", c.TRANSITION_DURATION = 300, c.BACKDROP_TRANSITION_DURATION = 150, c.DEFAULTS = {backdrop:!0, keyboard:!0, show:!0}, c.prototype.toggle = function(a){return this.isShown?this.hide():this.show(a)}, c.prototype.show = function(b){var d = this, e = a.Event("show.bs.modal", {relatedTarget:b}); this.$element.trigger(e), this.isShown || e.isDefaultPrevented() || (this.isShown = !0, this.checkScrollbar(), this.setScrollbar(), this.$body.addClass("modal-open"), this.escape(), this.resize(), this.$element.on("click.dismiss.bs.modal", '[data-dismiss="modal"]', a.proxy(this.hide, this)), this.$dialog.on("mousedown.dismiss.bs.modal", function(){d.$element.one("mouseup.dismiss.bs.modal", function(b){a(b.target).is(d.$element) && (d.ignoreBackdropClick = !0)})}), this.backdrop(function(){var e = a.support.transition && d.$element.hasClass("fade"); d.$element.parent().length || d.$element.appendTo(d.$body), d.$element.show().scrollTop(0), d.adjustDialog(), e && d.$element[0].offsetWidth, d.$element.addClass("in"), d.enforceFocus(); var f = a.Event("shown.bs.modal", {relatedTarget:b}); e?d.$dialog.one("bsTransitionEnd", function(){d.$element.trigger("focus").trigger(f)}).emulateTransitionEnd(c.TRANSITION_DURATION):d.$element.trigger("focus").trigger(f)}))}, c.prototype.hide = function(b){b && b.preventDefault(), b = a.Event("hide.bs.modal"), this.$element.trigger(b), this.isShown && !b.isDefaultPrevented() && (this.isShown = !1, this.escape(), this.resize(), a(document).off("focusin.bs.modal"), this.$element.removeClass("in").off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"), this.$dialog.off("mousedown.dismiss.bs.modal"), a.support.transition && this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd", a.proxy(this.hideModal, this)).emulateTransitionEnd(c.TRANSITION_DURATION):this.hideModal())}, c.prototype.enforceFocus = function(){a(document).off("focusin.bs.modal").on("focusin.bs.modal", a.proxy(function(a){this.$element[0] === a.target || this.$element.has(a.target).length || this.$element.trigger("focus")}, this))}, c.prototype.escape = function(){this.isShown && this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal", a.proxy(function(a){27 == a.which && this.hide()}, this)):this.isShown || this.$element.off("keydown.dismiss.bs.modal")}, c.prototype.resize = function(){this.isShown?a(window).on("resize.bs.modal", a.proxy(this.handleUpdate, this)):a(window).off("resize.bs.modal")}, c.prototype.hideModal = function(){var a = this; this.$element.hide(), this.backdrop(function(){a.$body.removeClass("modal-open"), a.resetAdjustments(), a.resetScrollbar(), a.$element.trigger("hidden.bs.modal")})}, c.prototype.removeBackdrop = function(){this.$backdrop && this.$backdrop.remove(), this.$backdrop = null}, c.prototype.backdrop = function(b){var d = this, e = this.$element.hasClass("fade")?"fade":""; if (this.isShown && this.options.backdrop){var f = a.support.transition && e; if (this.$backdrop = a(document.createElement("div")).addClass("modal-backdrop " + e).appendTo(this.$body), this.$element.on("click.dismiss.bs.modal", a.proxy(function(a){return this.ignoreBackdropClick?void(this.ignoreBackdropClick = !1):void(a.target === a.currentTarget && ("static" == this.options.backdrop?this.$element[0].focus():this.hide()))}, this)), f && this.$backdrop[0].offsetWidth, this.$backdrop.addClass("in"), !b)return; f?this.$backdrop.one("bsTransitionEnd", b).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):b()} else if (!this.isShown && this.$backdrop){this.$backdrop.removeClass("in"); var g = function(){d.removeBackdrop(), b && b()}; a.support.transition && this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd", g).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):g()} else b && b()}, c.prototype.handleUpdate = function(){this.adjustDialog()}, c.prototype.adjustDialog = function(){var a = this.$element[0].scrollHeight > document.documentElement.clientHeight; this.$element.css({paddingLeft:!this.bodyIsOverflowing && a?this.scrollbarWidth:"", paddingRight:this.bodyIsOverflowing && !a?this.scrollbarWidth:""})}, c.prototype.resetAdjustments = function(){this.$element.css({paddingLeft:"", paddingRight:""})}, c.prototype.checkScrollbar = function(){var a = window.innerWidth; if (!a){var b = document.documentElement.getBoundingClientRect(); a = b.right - Math.abs(b.left)}this.bodyIsOverflowing = document.body.clientWidth < a, this.scrollbarWidth = this.measureScrollbar()}, c.prototype.setScrollbar = function(){var a = parseInt(this.$body.css("padding-right") || 0, 10); this.originalBodyPad = document.body.style.paddingRight || "", this.bodyIsOverflowing && this.$body.css("padding-right", a + this.scrollbarWidth)}, c.prototype.resetScrollbar = function(){this.$body.css("padding-right", this.originalBodyPad)}, c.prototype.measureScrollbar = function(){var a = document.createElement("div"); a.className = "modal-scrollbar-measure", this.$body.append(a); var b = a.offsetWidth - a.clientWidth; return this.$body[0].removeChild(a), b}; var d = a.fn.modal; a.fn.modal = b, a.fn.modal.Constructor = c, a.fn.modal.noConflict = function(){return a.fn.modal = d, this}, a(document).on("click.bs.modal.data-api", '[data-toggle="modal"]', function(c){var d = a(this), e = d.attr("href"), f = a(d.attr("data-target") || e && e.replace(/.*(?=#[^\s]+$)/, "")), g = f.data("bs.modal")?"toggle":a.extend({remote:!/#/.test(e) && e}, f.data(), d.data()); d.is("a") && c.preventDefault(), f.one("show.bs.modal", function(a){a.isDefaultPrevented() || f.one("hidden.bs.modal", function(){d.is(":visible") && d.trigger("focus")})}), b.call(f, g, this)})}(jQuery), + function(a){"use strict"; function b(b){return this.each(function(){var d = a(this), e = d.data("bs.tooltip"), f = "object" == typeof b && b; (e || !/destroy|hide/.test(b)) && (e || d.data("bs.tooltip", e = new c(this, f)), "string" == typeof b && e[b]())})}var c = function(a, b){this.type = null, this.options = null, this.enabled = null, this.timeout = null, this.hoverState = null, this.$element = null, this.inState = null, this.init("tooltip", a, b)}; c.VERSION = "3.3.6", c.TRANSITION_DURATION = 150, c.DEFAULTS = {animation:!0, placement:"top", selector:!1, template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>', trigger:"hover focus", title:"", delay:0, html:!1, container:!1, viewport:{selector:"body", padding:0}}, c.prototype.init = function(b, c, d){if (this.enabled = !0, this.type = b, this.$element = a(c), this.options = this.getOptions(d), this.$viewport = this.options.viewport && a(a.isFunction(this.options.viewport)?this.options.viewport.call(this, this.$element):this.options.viewport.selector || this.options.viewport), this.inState = {click:!1, hover:!1, focus:!1}, this.$element[0]instanceof document.constructor && !this.options.selector)throw new Error("`selector` option must be specified when initializing " + this.type + " on the window.document object!"); for (var e = this.options.trigger.split(" "), f = e.length; f--; ){var g = e[f]; if ("click" == g)this.$element.on("click." + this.type, this.options.selector, a.proxy(this.toggle, this)); else if ("manual" != g){var h = "hover" == g?"mouseenter":"focusin", i = "hover" == g?"mouseleave":"focusout"; this.$element.on(h + "." + this.type, this.options.selector, a.proxy(this.enter, this)), this.$element.on(i + "." + this.type, this.options.selector, a.proxy(this.leave, this))}}this.options.selector?this._options = a.extend({}, this.options, {trigger:"manual", selector:""}):this.fixTitle()}, c.prototype.getDefaults = function(){return c.DEFAULTS}, c.prototype.getOptions = function(b){return b = a.extend({}, this.getDefaults(), this.$element.data(), b), b.delay && "number" == typeof b.delay && (b.delay = {show:b.delay, hide:b.delay}), b}, c.prototype.getDelegateOptions = function(){var b = {}, c = this.getDefaults(); return this._options && a.each(this._options, function(a, d){c[a] != d && (b[a] = d)}), b}, c.prototype.enter = function(b){var c = b instanceof this.constructor?b:a(b.currentTarget).data("bs." + this.type); return c || (c = new this.constructor(b.currentTarget, this.getDelegateOptions()), a(b.currentTarget).data("bs." + this.type, c)), b instanceof a.Event && (c.inState["focusin" == b.type?"focus":"hover"] = !0), c.tip().hasClass("in") || "in" == c.hoverState?void(c.hoverState = "in"):(clearTimeout(c.timeout), c.hoverState = "in", c.options.delay && c.options.delay.show?void(c.timeout = setTimeout(function(){"in" == c.hoverState && c.show()}, c.options.delay.show)):c.show())}, c.prototype.isInStateTrue = function(){for (var a in this.inState)if (this.inState[a])return!0; return!1}, c.prototype.leave = function(b){var c = b instanceof this.constructor?b:a(b.currentTarget).data("bs." + this.type); return c || (c = new this.constructor(b.currentTarget, this.getDelegateOptions()), a(b.currentTarget).data("bs." + this.type, c)), b instanceof a.Event && (c.inState["focusout" == b.type?"focus":"hover"] = !1), c.isInStateTrue()?void 0:(clearTimeout(c.timeout), c.hoverState = "out", c.options.delay && c.options.delay.hide?void(c.timeout = setTimeout(function(){"out" == c.hoverState && c.hide()}, c.options.delay.hide)):c.hide())}, c.prototype.show = function(){var b = a.Event("show.bs." + this.type); if (this.hasContent() && this.enabled){this.$element.trigger(b); var d = a.contains(this.$element[0].ownerDocument.documentElement, this.$element[0]); if (b.isDefaultPrevented() || !d)return; var e = this, f = this.tip(), g = this.getUID(this.type); this.setContent(), f.attr("id", g), this.$element.attr("aria-describedby", g), this.options.animation && f.addClass("fade"); var h = "function" == typeof this.options.placement?this.options.placement.call(this, f[0], this.$element[0]):this.options.placement, i = /\s?auto?\s?/i, j = i.test(h); j && (h = h.replace(i, "") || "top"), f.detach().css({top:0, left:0, display:"block"}).addClass(h).data("bs." + this.type, this), this.options.container?f.appendTo(this.options.container):f.insertAfter(this.$element), this.$element.trigger("inserted.bs." + this.type); var k = this.getPosition(), l = f[0].offsetWidth, m = f[0].offsetHeight; if (j){var n = h, o = this.getPosition(this.$viewport); h = "bottom" == h && k.bottom + m > o.bottom?"top":"top" == h && k.top - m < o.top?"bottom":"right" == h && k.right + l > o.width?"left":"left" == h && k.left - l < o.left?"right":h, f.removeClass(n).addClass(h)}var p = this.getCalculatedOffset(h, k, l, m); this.applyPlacement(p, h); var q = function(){var a = e.hoverState; e.$element.trigger("shown.bs." + e.type), e.hoverState = null, "out" == a && e.leave(e)}; a.support.transition && this.$tip.hasClass("fade")?f.one("bsTransitionEnd", q).emulateTransitionEnd(c.TRANSITION_DURATION):q()}}, c.prototype.applyPlacement = function(b, c){var d = this.tip(), e = d[0].offsetWidth, f = d[0].offsetHeight, g = parseInt(d.css("margin-top"), 10), h = parseInt(d.css("margin-left"), 10); isNaN(g) && (g = 0), isNaN(h) && (h = 0), b.top += g, b.left += h, a.offset.setOffset(d[0], a.extend({using:function(a){d.css({top:Math.round(a.top), left:Math.round(a.left)})}}, b), 0), d.addClass("in"); var i = d[0].offsetWidth, j = d[0].offsetHeight; "top" == c && j != f && (b.top = b.top + f - j); var k = this.getViewportAdjustedDelta(c, b, i, j); k.left?b.left += k.left:b.top += k.top; var l = /top|bottom/.test(c), m = l?2 * k.left - e + i:2 * k.top - f + j, n = l?"offsetWidth":"offsetHeight"; d.offset(b), this.replaceArrow(m, d[0][n], l)}, c.prototype.replaceArrow = function(a, b, c){this.arrow().css(c?"left":"top", 50 * (1 - a / b) + "%").css(c?"top":"left", "")}, c.prototype.setContent = function(){var a = this.tip(), b = this.getTitle(); a.find(".tooltip-inner")[this.options.html?"html":"text"](b), a.removeClass("fade in top bottom left right")}, c.prototype.hide = function(b){function d(){"in" != e.hoverState && f.detach(), e.$element.removeAttr("aria-describedby").trigger("hidden.bs." + e.type), b && b()}var e = this, f = a(this.$tip), g = a.Event("hide.bs." + this.type); return this.$element.trigger(g), g.isDefaultPrevented()?void 0:(f.removeClass("in"), a.support.transition && f.hasClass("fade")?f.one("bsTransitionEnd", d).emulateTransitionEnd(c.TRANSITION_DURATION):d(), this.hoverState = null, this)}, c.prototype.fixTitle = function(){var a = this.$element; (a.attr("title") || "string" != typeof a.attr("data-original-title")) && a.attr("data-original-title", a.attr("title") || "").attr("title", "")}, c.prototype.hasContent = function(){return this.getTitle()}, c.prototype.getPosition = function(b){b = b || this.$element; var c = b[0], d = "BODY" == c.tagName, e = c.getBoundingClientRect(); null == e.width && (e = a.extend({}, e, {width:e.right - e.left, height:e.bottom - e.top})); var f = d?{top:0, left:0}:b.offset(), g = {scroll:d?document.documentElement.scrollTop || document.body.scrollTop:b.scrollTop()}, h = d?{width:a(window).width(), height:a(window).height()}:null; return a.extend({}, e, g, h, f)}, c.prototype.getCalculatedOffset = function(a, b, c, d){return"bottom" == a?{top:b.top + b.height, left:b.left + b.width / 2 - c / 2}:"top" == a?{top:b.top - d, left:b.left + b.width / 2 - c / 2}:"left" == a?{top:b.top + b.height / 2 - d / 2, left:b.left - c}:{top:b.top + b.height / 2 - d / 2, left:b.left + b.width}}, c.prototype.getViewportAdjustedDelta = function(a, b, c, d){var e = {top:0, left:0}; if (!this.$viewport)return e; var f = this.options.viewport && this.options.viewport.padding || 0, g = this.getPosition(this.$viewport); if (/right|left/.test(a)){var h = b.top - f - g.scroll, i = b.top + f - g.scroll + d; h < g.top?e.top = g.top - h:i > g.top + g.height && (e.top = g.top + g.height - i)} else{var j = b.left - f, k = b.left + f + c; j < g.left?e.left = g.left - j:k > g.right && (e.left = g.left + g.width - k)}return e}, c.prototype.getTitle = function(){var a, b = this.$element, c = this.options; return a = b.attr("data-original-title") || ("function" == typeof c.title?c.title.call(b[0]):c.title)}, c.prototype.getUID = function(a){do a += ~~(1e6 * Math.random()); while (document.getElementById(a)); return a}, c.prototype.tip = function(){if (!this.$tip && (this.$tip = a(this.options.template), 1 != this.$tip.length))throw new Error(this.type + " `template` option must consist of exactly 1 top-level element!"); return this.$tip}, c.prototype.arrow = function(){return this.$arrow = this.$arrow || this.tip().find(".tooltip-arrow")}, c.prototype.enable = function(){this.enabled = !0}, c.prototype.disable = function(){this.enabled = !1}, c.prototype.toggleEnabled = function(){this.enabled = !this.enabled}, c.prototype.toggle = function(b){var c = this; b && (c = a(b.currentTarget).data("bs." + this.type), c || (c = new this.constructor(b.currentTarget, this.getDelegateOptions()), a(b.currentTarget).data("bs." + this.type, c))), b?(c.inState.click = !c.inState.click, c.isInStateTrue()?c.enter(c):c.leave(c)):c.tip().hasClass("in")?c.leave(c):c.enter(c)}, c.prototype.destroy = function(){var a = this; clearTimeout(this.timeout), this.hide(function(){a.$element.off("." + a.type).removeData("bs." + a.type), a.$tip && a.$tip.detach(), a.$tip = null, a.$arrow = null, a.$viewport = null})}; var d = a.fn.tooltip; a.fn.tooltip = b, a.fn.tooltip.Constructor = c, a.fn.tooltip.noConflict = function(){return a.fn.tooltip = d, this}}(jQuery), + function(a){"use strict"; function b(b){return this.each(function(){var d = a(this), e = d.data("bs.popover"), f = "object" == typeof b && b; (e || !/destroy|hide/.test(b)) && (e || d.data("bs.popover", e = new c(this, f)), "string" == typeof b && e[b]())})}var c = function(a, b){this.init("popover", a, b)}; if (!a.fn.tooltip)throw new Error("Popover requires tooltip.js"); c.VERSION = "3.3.6", c.DEFAULTS = a.extend({}, a.fn.tooltip.Constructor.DEFAULTS, {placement:"right", trigger:"click", content:"", template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}), c.prototype = a.extend({}, a.fn.tooltip.Constructor.prototype), c.prototype.constructor = c, c.prototype.getDefaults = function(){return c.DEFAULTS}, c.prototype.setContent = function(){var a = this.tip(), b = this.getTitle(), c = this.getContent(); a.find(".popover-title")[this.options.html?"html":"text"](b), a.find(".popover-content").children().detach().end()[this.options.html?"string" == typeof c?"html":"append":"text"](c), a.removeClass("fade top bottom left right in"), a.find(".popover-title").html() || a.find(".popover-title").hide()}, c.prototype.hasContent = function(){return this.getTitle() || this.getContent()}, c.prototype.getContent = function(){var a = this.$element, b = this.options; return a.attr("data-content") || ("function" == typeof b.content?b.content.call(a[0]):b.content)}, c.prototype.arrow = function(){return this.$arrow = this.$arrow || this.tip().find(".arrow")}; var d = a.fn.popover; a.fn.popover = b, a.fn.popover.Constructor = c, a.fn.popover.noConflict = function(){return a.fn.popover = d, this}}(jQuery), + function(a){"use strict"; function b(c, d){this.$body = a(document.body), this.$scrollElement = a(a(c).is(document.body)?window:c), this.options = a.extend({}, b.DEFAULTS, d), this.selector = (this.options.target || "") + " .nav li > a", this.offsets = [], this.targets = [], this.activeTarget = null, this.scrollHeight = 0, this.$scrollElement.on("scroll.bs.scrollspy", a.proxy(this.process, this)), this.refresh(), this.process()}function c(c){return this.each(function(){var d = a(this), e = d.data("bs.scrollspy"), f = "object" == typeof c && c; e || d.data("bs.scrollspy", e = new b(this, f)), "string" == typeof c && e[c]()})}b.VERSION = "3.3.6", b.DEFAULTS = {offset:10}, b.prototype.getScrollHeight = function(){return this.$scrollElement[0].scrollHeight || Math.max(this.$body[0].scrollHeight, document.documentElement.scrollHeight)}, b.prototype.refresh = function(){var b = this, c = "offset", d = 0; this.offsets = [], this.targets = [], this.scrollHeight = this.getScrollHeight(), a.isWindow(this.$scrollElement[0]) || (c = "position", d = this.$scrollElement.scrollTop()), this.$body.find(this.selector).map(function(){var b = a(this), e = b.data("target") || b.attr("href"), f = /^#./.test(e) && a(e); return f && f.length && f.is(":visible") && [[f[c]().top + d, e]] || null}).sort(function(a, b){return a[0] - b[0]}).each(function(){b.offsets.push(this[0]), b.targets.push(this[1])})}, b.prototype.process = function(){var a, b = this.$scrollElement.scrollTop() + this.options.offset, c = this.getScrollHeight(), d = this.options.offset + c - this.$scrollElement.height(), e = this.offsets, f = this.targets, g = this.activeTarget; if (this.scrollHeight != c && this.refresh(), b >= d)return g != (a = f[f.length - 1]) && this.activate(a); if (g && b < e[0])return this.activeTarget = null, this.clear(); for (a = e.length; a--; )g != f[a] && b >= e[a] && (void 0 === e[a + 1] || b < e[a + 1]) && this.activate(f[a])}, b.prototype.activate = function(b){this.activeTarget = b, this.clear(); var c = this.selector + '[data-target="' + b + '"],' + this.selector + '[href="' + b + '"]', d = a(c).parents("li").addClass("active");
d.parent(".dropdown-menu").length && (d = d.closest("li.dropdown").addClass("active")), d.trigger("activate.bs.scrollspy")}, b.prototype.clear = function(){a(this.selector).parentsUntil(this.options.target, ".active").removeClass("active")}; var d = a.fn.scrollspy; a.fn.scrollspy = c, a.fn.scrollspy.Constructor = b, a.fn.scrollspy.noConflict = function(){return a.fn.scrollspy = d, this}, a(window).on("load.bs.scrollspy.data-api", function(){a('[data-spy="scroll"]').each(function(){var b = a(this); c.call(b, b.data())})})}(jQuery), + function(a){"use strict"; function b(b){return this.each(function(){var d = a(this), e = d.data("bs.tab"); e || d.data("bs.tab", e = new c(this)), "string" == typeof b && e[b]()})}var c = function(b){this.element = a(b)}; c.VERSION = "3.3.6", c.TRANSITION_DURATION = 150, c.prototype.show = function(){var b = this.element, c = b.closest("ul:not(.dropdown-menu)"), d = b.data("target"); if (d || (d = b.attr("href"), d = d && d.replace(/.*(?=#[^\s]*$)/, "")), !b.parent("li").hasClass("active")){var e = c.find(".active:last a"), f = a.Event("hide.bs.tab", {relatedTarget:b[0]}), g = a.Event("show.bs.tab", {relatedTarget:e[0]}); if (e.trigger(f), b.trigger(g), !g.isDefaultPrevented() && !f.isDefaultPrevented()){var h = a(d); this.activate(b.closest("li"), c), this.activate(h, h.parent(), function(){e.trigger({type:"hidden.bs.tab", relatedTarget:b[0]}), b.trigger({type:"shown.bs.tab", relatedTarget:e[0]})})}}}, c.prototype.activate = function(b, d, e){function f(){g.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded", !1), b.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded", !0), h?(b[0].offsetWidth, b.addClass("in")):b.removeClass("fade"), b.parent(".dropdown-menu").length && b.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded", !0), e && e()}var g = d.find("> .active"), h = e && a.support.transition && (g.length && g.hasClass("fade") || !!d.find("> .fade").length); g.length && h?g.one("bsTransitionEnd", f).emulateTransitionEnd(c.TRANSITION_DURATION):f(), g.removeClass("in")}; var d = a.fn.tab; a.fn.tab = b, a.fn.tab.Constructor = c, a.fn.tab.noConflict = function(){return a.fn.tab = d, this}; var e = function(c){c.preventDefault(), b.call(a(this), "show")}; a(document).on("click.bs.tab.data-api", '[data-toggle="tab"]', e).on("click.bs.tab.data-api", '[data-toggle="pill"]', e)}(jQuery), + function(a){"use strict"; function b(b){return this.each(function(){var d = a(this), e = d.data("bs.affix"), f = "object" == typeof b && b; e || d.data("bs.affix", e = new c(this, f)), "string" == typeof b && e[b]()})}var c = function(b, d){this.options = a.extend({}, c.DEFAULTS, d), this.$target = a(this.options.target).on("scroll.bs.affix.data-api", a.proxy(this.checkPosition, this)).on("click.bs.affix.data-api", a.proxy(this.checkPositionWithEventLoop, this)), this.$element = a(b), this.affixed = null, this.unpin = null, this.pinnedOffset = null, this.checkPosition()}; c.VERSION = "3.3.6", c.RESET = "affix affix-top affix-bottom", c.DEFAULTS = {offset:0, target:window}, c.prototype.getState = function(a, b, c, d){var e = this.$target.scrollTop(), f = this.$element.offset(), g = this.$target.height(); if (null != c && "top" == this.affixed)return c > e?"top":!1; if ("bottom" == this.affixed)return null != c?e + this.unpin <= f.top?!1:"bottom":a - d >= e + g?!1:"bottom"; var h = null == this.affixed, i = h?e:f.top, j = h?g:b; return null != c && c >= e?"top":null != d && i + j >= a - d?"bottom":!1}, c.prototype.getPinnedOffset = function(){if (this.pinnedOffset)return this.pinnedOffset; this.$element.removeClass(c.RESET).addClass("affix"); var a = this.$target.scrollTop(), b = this.$element.offset(); return this.pinnedOffset = b.top - a}, c.prototype.checkPositionWithEventLoop = function(){setTimeout(a.proxy(this.checkPosition, this), 1)}, c.prototype.checkPosition = function(){if (this.$element.is(":visible")){var b = this.$element.height(), d = this.options.offset, e = d.top, f = d.bottom, g = Math.max(a(document).height(), a(document.body).height()); "object" != typeof d && (f = e = d), "function" == typeof e && (e = d.top(this.$element)), "function" == typeof f && (f = d.bottom(this.$element)); var h = this.getState(g, b, e, f); if (this.affixed != h){null != this.unpin && this.$element.css("top", ""); var i = "affix" + (h?"-" + h:""), j = a.Event(i + ".bs.affix"); if (this.$element.trigger(j), j.isDefaultPrevented())return; this.affixed = h, this.unpin = "bottom" == h?this.getPinnedOffset():null, this.$element.removeClass(c.RESET).addClass(i).trigger(i.replace("affix", "affixed") + ".bs.affix")}"bottom" == h && this.$element.offset({top:g - b - f})}}; var d = a.fn.affix; a.fn.affix = b, a.fn.affix.Constructor = c, a.fn.affix.noConflict = function(){return a.fn.affix = d, this}, a(window).on("load", function(){a('[data-spy="affix"]').each(function(){var c = a(this), d = c.data(); d.offset = d.offset || {}, null != d.offsetBottom && (d.offset.bottom = d.offsetBottom), null != d.offsetTop && (d.offset.top = d.offsetTop), b.call(c, d)})})}(jQuery);
"use strict";!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?module.exports=a(require("jquery")):a(jQuery||Zepto)}(function(a){var b=function(b,c,d){var e={invalid:[],getCaret:function(){try{var a,c=0,d=b.get(0),f=document.selection,g=d.selectionStart;return f&&navigator.appVersion.indexOf("MSIE 10")===-1?(a=f.createRange(),a.moveStart("character",-e.val().length),c=a.text.length):(g||"0"===g)&&(c=g),c}catch(a){}},setCaret:function(a){try{if(b.is(":focus")){var c,d=b.get(0);d.setSelectionRange?(d.focus(),d.setSelectionRange(a,a)):(c=d.createTextRange(),c.collapse(!0),c.moveEnd("character",a),c.moveStart("character",a),c.select())}}catch(a){}},events:function(){b.on("keydown.mask",function(a){b.data("mask-keycode",a.keyCode||a.which)}).on(a.jMaskGlobals.useInput?"input.mask":"keyup.mask",e.behaviour).on("paste.mask drop.mask",function(){setTimeout(function(){b.keydown().keyup()},100)}).on("change.mask",function(){b.data("changed",!0)}).on("blur.mask",function(){g===e.val()||b.data("changed")||b.trigger("change"),b.data("changed",!1)}).on("blur.mask",function(){g=e.val()}).on("focus.mask",function(b){d.selectOnFocus===!0&&a(b.target).select()}).on("focusout.mask",function(){d.clearIfNotMatch&&!h.test(e.val())&&e.val("")})},getRegexMask:function(){for(var b,d,e,g,h,i,a=[],j=0;j<c.length;j++)b=f.translation[c.charAt(j)],b?(d=b.pattern.toString().replace(/.{1}$|^.{1}/g,""),e=b.optional,g=b.recursive,g?(a.push(c.charAt(j)),h={digit:c.charAt(j),pattern:d}):a.push(e||g?d+"?":d)):a.push(c.charAt(j).replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"));return i=a.join(""),h&&(i=i.replace(new RegExp("("+h.digit+"(.*"+h.digit+")?)"),"($1)?").replace(new RegExp(h.digit,"g"),h.pattern)),new RegExp(i)},destroyEvents:function(){b.off(["input","keydown","keyup","paste","drop","blur","focusout",""].join(".mask "))},val:function(a){var e,c=b.is("input"),d=c?"val":"text";return arguments.length>0?(b[d]()!==a&&b[d](a),e=b):e=b[d](),e},getMCharsBeforeCount:function(a,b){for(var d=0,e=0,g=c.length;e<g&&e<a;e++)f.translation[c.charAt(e)]||(a=b?a+1:a,d++);return d},caretPos:function(a,b,d,g){var h=f.translation[c.charAt(Math.min(a-1,c.length-1))];return h?Math.min(a+d-b-g,d):e.caretPos(a+1,b,d,g)},behaviour:function(c){c=c||window.event,e.invalid=[];var d=b.data("mask-keycode");if(a.inArray(d,f.byPassKeys)===-1){var g=e.getCaret(),h=e.val(),i=h.length,j=e.getMasked(),k=j.length,l=e.getMCharsBeforeCount(k-1)-e.getMCharsBeforeCount(i-1),m=g<i;return e.val(j),m&&(8!==d&&46!==d&&(g=e.caretPos(g,i,k,l)),e.setCaret(g)),e.callbacks(c)}},getMasked:function(a,b){var p,q,g=[],h=void 0===b?e.val():b+"",i=0,j=c.length,k=0,l=h.length,m=1,n="push",o=-1;for(d.reverse?(n="unshift",m=-1,p=0,i=j-1,k=l-1,q=function(){return i>-1&&k>-1}):(p=j-1,q=function(){return i<j&&k<l});q();){var r=c.charAt(i),s=h.charAt(k),t=f.translation[r];t?(s.match(t.pattern)?(g[n](s),t.recursive&&(o===-1?o=i:i===p&&(i=o-m),p===o&&(i-=m)),i+=m):t.optional?(i+=m,k-=m):t.fallback?(g[n](t.fallback),i+=m,k-=m):e.invalid.push({p:k,v:s,e:t.pattern}),k+=m):(a||g[n](r),s===r&&(k+=m),i+=m)}var u=c.charAt(p);return j!==l+1||f.translation[u]||g.push(u),g.join("")},callbacks:function(a){var f=e.val(),h=f!==g,i=[f,a,b,d],j=function(a,b,c){"function"==typeof d[a]&&b&&d[a].apply(this,c)};j("onChange",h===!0,i),j("onKeyPress",h===!0,i),j("onComplete",f.length===c.length,i),j("onInvalid",e.invalid.length>0,[f,a,b,e.invalid,d])}};b=a(b);var h,f=this,g=e.val();c="function"==typeof c?c(e.val(),void 0,b,d):c,f.mask=c,f.options=d,f.remove=function(){var a=e.getCaret();return e.destroyEvents(),e.val(f.getCleanVal()),e.setCaret(a-e.getMCharsBeforeCount(a)),b},f.getCleanVal=function(){return e.getMasked(!0)},f.getMaskedVal=function(a){return e.getMasked(!1,a)},f.init=function(c){if(c=c||!1,d=d||{},f.clearIfNotMatch=a.jMaskGlobals.clearIfNotMatch,f.byPassKeys=a.jMaskGlobals.byPassKeys,f.translation=a.extend({},a.jMaskGlobals.translation,d.translation),f=a.extend(!0,{},f,d),h=e.getRegexMask(),c===!1){d.placeholder&&b.attr("placeholder",d.placeholder),b.data("mask")&&b.attr("autocomplete","off"),e.destroyEvents(),e.events();var g=e.getCaret();e.val(e.getMasked()),e.setCaret(g+e.getMCharsBeforeCount(g,!0))}else e.events(),e.val(e.getMasked())},f.init(!b.is("input"))};a.maskWatchers={};var c=function(){var c=a(this),e={},f="data-mask-",g=c.attr("data-mask");if(c.attr(f+"reverse")&&(e.reverse=!0),c.attr(f+"clearifnotmatch")&&(e.clearIfNotMatch=!0),"true"===c.attr(f+"selectonfocus")&&(e.selectOnFocus=!0),d(c,g,e))return c.data("mask",new b(this,g,e))},d=function(b,c,d){d=d||{};var e=a(b).data("mask"),f=JSON.stringify,g=a(b).val()||a(b).text();try{return"function"==typeof c&&(c=c(g)),"object"!=typeof e||f(e.options)!==f(d)||e.mask!==c}catch(a){}},e=function(a){var c,b=document.createElement("div");return a="on"+a,c=a in b,c||(b.setAttribute(a,"return;"),c="function"==typeof b[a]),b=null,c};a.fn.mask=function(c,e){e=e||{};var f=this.selector,g=a.jMaskGlobals,h=g.watchInterval,i=e.watchInputs||g.watchInputs,j=function(){if(d(this,c,e))return a(this).data("mask",new b(this,c,e))};return a(this).each(j),f&&""!==f&&i&&(clearInterval(a.maskWatchers[f]),a.maskWatchers[f]=setInterval(function(){a(document).find(f).each(j)},h)),this},a.fn.masked=function(a){return this.data("mask").getMaskedVal(a)},a.fn.unmask=function(){return clearInterval(a.maskWatchers[this.selector]),delete a.maskWatchers[this.selector],this.each(function(){var b=a(this).data("mask");b&&b.remove().removeData("mask")})},a.fn.cleanVal=function(){return this.data("mask").getCleanVal()},a.applyDataMask=function(b){b=b||a.jMaskGlobals.maskElements;var d=b instanceof a?b:a(b);d.filter(a.jMaskGlobals.dataMaskAttr).each(c)};var f={maskElements:"input,td,span,div",dataMaskAttr:"*[data-mask]",dataMask:!0,watchInterval:300,watchInputs:!0,useInput:e("input"),watchDataMask:!1,byPassKeys:[9,16,17,18,36,37,38,39,40,91],translation:{0:{pattern:/\d/}, 9:{pattern:/\d/,optional:!0},"#":{pattern:/\d/,recursive:!0},A:{pattern:/[a-zA-Z0-9]/}, S:{pattern:/[a-zA-Z]/}}};a.jMaskGlobals=a.jMaskGlobals||{},f=a.jMaskGlobals=a.extend(!0,{},f,a.jMaskGlobals),f.dataMask&&a.applyDataMask(),setInterval(function(){a.jMaskGlobals.watchDataMask&&a.applyDataMask()},f.watchInterval)});
if(this.top.location!==this.location){this.top.location=this.location}
jQuery(document).ready(function($){var txt_logout=$('#menu-top-nav-links .menu-item-logout a').text();$('#menu-top-nav-links .menu-item-logout a').text('').append("<span>"+txt_logout+"</span>");var hostname=window.location.host;if(hostname.indexOf('16jason79')!=-1){$('.site-logo').attr('src','http://16jason79.dev.fgct.net/wp-content/uploads/2016/03/logo.png');var windowWidth=parseFloat($(window).width());if(windowWidth>960){$(".products").show()}
$('img').each(function(){var imgSrc=$(this).attr('src');imgSrc=imgSrc.replace('i0.wp.com/','');imgSrc=imgSrc.replace('"//i1.wp.com/','');$(this).attr('src',imgSrc)});var windowWidth=parseFloat(jQuery(window).width());if(windowWidth<700)
$('.woocommerce-breadcrumb').css({height:25+'px'})}
$('a').on('touchstart',function(){$(this).trigger('click')});var is_touch_enabled=!1;if('ontouchstart' in document.documentElement)
is_touch_enabled=!0;$('a.menu-toggle-user').click(function(e){e.preventDefault();$(".menu-top-nav-links-container").toggleClass("toggled")});$(".menu-toggle").click(function(e){e.preventDefault();$("body").toggleClass("toggled");var windowWidth=parseFloat($(window).width());$('.tvinner').css({width:100+'%'});$('.toggled .tvinner').css({width:(windowWidth+260)+'px'})});$('.flickr a').click(function(e){});$('.icon-theme-icons a').attr('target','_blank')
$('.flickr a').attr('data-toggle','tooltip');$('.flickr a').attr('data-placement','bottom');$('.flickr a').attr('title','Snapchat @reizeenergy ');$('[data-toggle="tooltip"]').tooltip();var heightImageVideo=$('.tv_video_image').outerHeight();var widthImageVideo=$('.tv_video_image').outerWidth();$('.tv_video_box').css({height:heightImageVideo+'px',width:widthImageVideo+'px'});var windowWidth=parseFloat($(window).width());if(windowWidth<978){var $pos_tv_video_box=$('.tv_video_box').position();if(typeof $pos_tv_video_box!='undefined'){$('.tv_video_overlay').css({left:$pos_tv_video_box.left+'px'})}}
$(window).resize(function(){var heightImageVideo=$('.tv_video_image').outerHeight();var widthImageVideo=$('.tv_video_image').outerWidth();$('.tv_video_box').css({height:heightImageVideo+'px',width:widthImageVideo+'px'});var tvitemorderTbody=parseFloat($('#tvitemorder tbody').outerHeight());var tvitemorderTfoot=parseFloat($('#tvitemorder tfoot').outerHeight());var windowWidth=parseFloat($(window).width());var trlast=$('#tvitemorder tbody tr:last');if(windowWidth<740){var $pos_tv_video_box=$('.tv_video_box').position();if(typeof $pos_tv_video_box!='undefined'){$('.tv_video_overlay').css({left:$pos_tv_video_box.left+'px'})}}else{$('.tv_video_overlay').css({left:'auto'})}
friendsjoin();$('.boxproduct ul li').each(function(){var me=$(this);var productname=me.find('.productname').width();var textname=me.find('.textname').width();me.find('.textdot').css({'width':parseFloat(productname-textname-10)+'px'})})});var TvInterval=setInterval(function(){var video_height=jQuery('#tvplayer').width();video_height=parseFloat(video_height);if(video_height<100){var heightImageVideo=$('.tv_video_image').outerHeight();var widthImageVideo=$('.tv_video_image').outerWidth();$('#tvplayer').css({height:heightImageVideo+'px',width:widthImageVideo+'px'})}else{clearInterval(TvInterval)}},100);var relatedposts=setInterval(function(){var jp_relatedposts_items=$(document).find('.desktop .jp-relatedposts-items').html();if(typeof jp_relatedposts_items!='undefined'){$('.mobile #jp-relatedposts').append('<div class="jp-relatedposts-items jp-relatedposts-items-minimal">'+jp_relatedposts_items+'</div>');clearInterval(relatedposts)}},100);eval(function(p,a,c,k,e,r){e=function(c){return c.toString(a)};if(!''.replace(/^/,String)){while(c--)
r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)
if(k[c])
p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('$(3).b(\'c\',\'#0 2#d\',e(){$(\'4.5\').f();$(\'#0\').g(\'h\');$(\'#0 2#6-7-8-9-a\').i(\'1\');j(!$(k).l(\':1\')){$(\'4.5\').m();$(\'#0 2#6-7-8-9-a\').n(\'1\',\'1\')};$(3.o).p(\'q\')});',27,27,'ship_to_different_address|checked|input|document|div|shipping_address|ship|to|different|address|checkbox|on|change|tv_same_as_billing_address|function|hide|removeClass|active|removeAttr|if|this|is|slideDown|attr|body|trigger|update_checkout'.split('|'),0,{}))
$(document).on('keyup','.woocommerce-billing-fields input',function(){if($('.woocommerce-checkout .shipping_address').css('display')==='none'){var inputId=$(this).attr('id');inputId=inputId.replace('billing_','shipping_');$('#'+inputId).val($(this).val())}})
friendsjoin();$('#tvshiptobilling').click(function(){$('.tvshiptobilling').addClass('hide');if(!$(this).is(':checked')){$('.tvshiptobilling').removeClass('hide');$('#disabled_shipping').fadeOut()}
else{$('#disabled_shipping').fadeIn();$('.form_billing_address .form-row input').each(function(){input_id=$(this).attr('id');if($('#'+input_id.replace('billing','shipping')).length>0){$('#'+input_id.replace('billing','shipping')).val($(this).val())}});$('#shipping_country').val($('#billing_country').val());$('#s2id_shipping_country .select2-chosen').html($('#s2id_billing_country .select2-chosen').html());if($('#shipping_state').length>0&&$('#billing_state').length>0){$('#shipping_state').val($('#billing_state').val());$('#s2id_shipping_state .select2-chosen').html($('#s2id_billing_state .select2-chosen').html())}}})
$('.account_information a.edit').tap(function(e){e.preventDefault();$account_information=$(this).closest('.account_information');$account_information.toggleClass("activeshow")})
$('.col_billing a.edit').tap(function(e){e.preventDefault();$billing_parent=$(this).closest('.col_billing');$billing_parent.toggleClass("activeshow")})
$('.col_shipping a.edit').tap(function(e){e.preventDefault();$shipping_parent=$(this).closest('.col_shipping');$shipping_parent.toggleClass("activeshow")})
$('.billing_address_edit .button').click(function(e){e.preventDefault();var $url=$('.form_billing_address').attr('action');var $dataform=$('.form_billing_address').serialize();$billing_parent=$(this).closest('.col_billing');$billing_parent.find('.ajax-loader').removeClass('hide');$.ajax({url:$url,type:"POST",data:$dataform,dataType:'json',success:function(data,textStatus,jqXHR){if(data.iserror=='false'){$('.billing_address tbody').html(data.datahtml);$billing_parent.toggleClass("activeshow");$('.billing_mess').hide()}else{alert(data.mess)}
$billing_parent.find('.ajax-loader').addClass('hide')},error:function(){$billing_parent.find('.ajax-loader').addClass('hide')}})})
$('.shipping_address_edit .button').click(function(e){e.preventDefault();if($('#tvshiptobilling').is(':checked')){var $dataform=$('.form_billing_address').serialize();dataForm=$dataform.split("&");var newDataForm=[];for(i=0;i<dataForm.length;i++){tempValue=dataForm[i].split("=");if(tempValue[0]==='billing_email'||tempValue[0]==='billing_phone'){continue}
tempValue[0]=tempValue[0].replace("billing","shipping");newDataForm.push(tempValue[0]+'='+tempValue[1])}
$dataform=newDataForm.join('&');$('.form_billing_address .form-row input').each(function(){input_id=$(this).attr('id');if($('#'+input_id.replace('billing','shipping')).length>0){$('#'+input_id.replace('billing','shipping')).val($(this).val())}});$('#shipping_country').val($('#billing_country').val());$('#s2id_shipping_country .select2-chosen').html($('#s2id_billing_country .select2-chosen').html());if($('#shipping_state').length>0&&$('#billing_state').length>0){$('#shipping_state').val($('#billing_state').val());$('#s2id_shipping_state .select2-chosen').html($('#s2id_billing_state .select2-chosen').html())}}
else{var $dataform=$('.form_shippiing_address').serialize()}
var $url=$('.form_shippiing_address').attr('action');$shipping_parent=$(this).closest('.col_shipping');$shipping_parent.find('.ajax-loader').removeClass('hide');$.ajax({url:$url,type:"POST",data:$dataform,dataType:'json',success:function(data,textStatus,jqXHR){if(data.iserror=='false'){$('.tvshiptobilling tbody').html(data.datahtml);$shipping_parent.toggleClass("activeshow");$('.shipping_mess').hide();if(data.shippinglabel==='FREE'){$('.subscription-shipping .subscription-total.order-total ').html(data.shippinglabel)}else{if(parseInt(data.shippingcost)>0){$('.subscription-shipping .subscription-total.order-total ').html('<span class="amount">$'+parseInt(data.shippingcost).toFixed(2)+' AUD</span> <small class="shipped_via">'+data.shippinglabel+'</small>')}}
if(parseInt(data.total)>0){$('.subscription-total .order-actions .amount ').html('$'+parseInt(data.total).toFixed(2)+' AUD')}}else{alert(data.mess)}
$shipping_parent.find('.ajax-loader').addClass('hide')},error:function(){$shipping_parent.find('.ajax-loader').addClass('hide')}})});$('.account_information_edit .button').click(function(e){e.preventDefault();if($('#accout_password_new').val()!==''){if($('#accout_password_old').val()!==''){$account_parent=$(this).closest('.account_information');$account_parent.find('.ajax-loader').removeClass('hide');$.ajax({url:'/?checkPass='+$('#accout_password_old').val(),type:"POST",success:function(data){if(data==='Incorrect'){alert('Old password is incorrect.');$account_parent.find('.ajax-loader').addClass('hide')}else{var $url=$('.form_account_information').attr('action');var $dataform=$('.form_account_information').serialize();$.ajax({url:$url,type:"POST",data:$dataform,dataType:'json',success:function(data,textStatus,jqXHR){if(data.error=='false'){if(data.content.update_pass_success){alert('Password changed successfully!')}
else{$('.account_information .innercontent table tbody').html(data.datahtml);$account_parent.toggleClass("activeshow");$('#account_info_alert').html("").html(data.message).removeClass('hide');if(window.account_info_alert)
clearTimeout(window.account_info_alert)
window.account_info_alert=setTimeout(function(){$('#account_info_alert').addClass('hide')},10000)
$('.shipping_mess').hide();$('html, body').animate({scrollTop:$(".account_information").offset().top+'px'},1000)}}else{alert(data.error)}
$account_parent.find('.ajax-loader').addClass('hide')},error:function(){$account_parent.find('.ajax-loader').addClass('hide')}})}}})}else{alert('Old password is incorrect.')}}else{var $url=$('.form_account_information').attr('action');var $dataform=$('.form_account_information').serialize();$account_parent=$(this).closest('.account_information');$account_parent.find('.ajax-loader').removeClass('hide');$.ajax({url:$url,type:"POST",data:$dataform,dataType:'json',success:function(data,textStatus,jqXHR){if(data.error=='false'){$('.account_information .innercontent table tbody').html(data.datahtml);$account_parent.toggleClass("activeshow");$('#account_info_alert').html("").html(data.message).removeClass('hide');if(window.account_info_alert)
clearTimeout(window.account_info_alert)
window.account_info_alert=setTimeout(function(){$('#account_info_alert').addClass('hide')},10000)
$('.shipping_mess').hide();$('html, body').animate({scrollTop:$(".account_information").offset().top+'px'},1000)}else{alert(data.error)}
$account_parent.find('.ajax-loader').addClass('hide')},error:function(){$account_parent.find('.ajax-loader').addClass('hide')}})}});if(jQuery(".desktop #challenge_results").length)
jQuery(".desktop #challenge_results").validate();if(jQuery(".form_your_results_mobile #challenge_results").length)
jQuery(".form_your_results_mobile #challenge_results").validate();eval(function(p,a,c,k,e,r){e=String;if(!''.replace(/^/,String)){while(c--)
r[c]=k[c]||c;k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)
if(k[c])
p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('$("#1 2").3(\'4\',{5:{\'0\':{6:/[$.0-9]/,7:8}}});',10,10,'|challenge_results|input|mask|000000000000000000000000000000000000000000000000|translation|pattern|optional|true|'.split('|'),0,{}))
$('.boxproduct ul li').each(function(){var me=$(this);var productname=me.find('.productname').width();var textname=me.find('.textname').width();me.find('.textdot').css({'width':parseFloat(productname-textname-10)+'px'})})
screenWidth=$(window).width();if(screenWidth<746){$('.listbox .box.box1, .htw_footer .boximg, .page_challengeresults .footer_page').on('tap',function(){window.location.href=$(this).find('a').attr('href')})}
else{$('.listbox .box.box1, .htw_footer .boximg, .page_challengeresults .footer_page').click(function(){window.location.href=$(this).find('a').attr('href')})}
$(document).on('click','.button.disable',function(e){e.preventDefault()})
var heightImageVideo=jQuery('.tv_video_image').outerHeight();var widthImageVideo=jQuery('.tv_video_image').outerWidth();jQuery('.tv_video_box').css({height:heightImageVideo+'px',width:widthImageVideo+'px'});var windowWidth=parseFloat(jQuery(window).width());if(windowWidth<978){var $pos_tv_video_box=jQuery('.tv_video_box').position();if(typeof $pos_tv_video_box!='undefined'){jQuery('.tv_video_overlay').css({left:$pos_tv_video_box.left+'px'})}}else{jQuery('.tv_video_overlay').css({left:'auto'})}
var TvSameBilling=setInterval(function(){jQuery('div.shipping_address').hide();jQuery('#ship_to_different_address').removeClass('active');if(!jQuery('input#tv_same_as_billing_address').is(':checked')){jQuery('div.shipping_address').slideDown();jQuery('#ship_to_different_address input#ship-to-different-address-checkbox').attr('checked','checked');clearInterval(TvSameBilling)}else{if(jQuery('div.shipping_address').is(':hidden')){jQuery('#ship_to_different_address').addClass('active');jQuery('#ship_to_different_address input#ship-to-different-address-checkbox').removeAttr('checked');clearInterval(TvSameBilling)}}},100);var hrefname=window.location.href;var pathname=window.location.pathname;if(fgc_current_page=='home-page'){jQuery('a.share-twitter').attr('href','http://www.twitter.com/share?&text='+'Check out REIZE %23energydrink, I%27m loving it! reize.com.au')}
if(hrefname.indexOf('/challenge-results')!=-1){var share_facebook=jQuery('a.share-facebook').attr('href');text_facebook=jQuery('#text_facebook').val();jQuery('a.share-facebook').attr('href','https://www.facebook.com/sharer.php?title='+encodeURI(text_facebook)+'&u='+document.location.hostname+'/our-drink/')}
if(jQuery('#page').is('.openlogin')){jQuery('#show_login').click()}
var ua=navigator.userAgent;var b=jQuery.browser;b.engine='';b.mobile=!1;if(/Windows/.test(ua)){b.os='tv_win';b.win=!0}else if(/Mac/.test(ua)){b.os='tv_mac';b.mac=!0}else if(/iPhone/.test(ua)){b.os='tv_iphone';b.iphone=!0}
if(/Chrome/.test(ua)){b.safari=!1;b.chrome=!0}
if(/Gecko/.test(ua)){b.gecko=!0;b.engine='tv_gecko'}
if(/WebKit/.test(ua)){b.gecko=!1;b.webkit=!0;b.engine='tv_webkit'}
if(/Mobile/i.test(ua)){b.mobile=!0}
if(b.msie){b.name='tv_msie'}else if(b.opera){b.name='tv_opera'}else if(b.safari){b.name='tv_safari'}else if(b.chrome){b.name='tv_chrome'}else if(b.mozilla){b.name='tv_mozilla'}
if((navigator.userAgent.match(/iPhone/i))||(navigator.userAgent.match(/iPod/i))){jQuery('div#page').addClass('tv_iphone')}
jQuery('div#page').addClass(b.name);if(jQuery('#tvshiptobilling').is(':checked')){$('#disabled_shipping').fadeIn()}
if(jQuery('body.woocommerce-checkout').length>0||jQuery('body.woocommerce-account').length>0){$('#billing_phone_field').removeClass('form-row-last').addClass('form-row-wide');$isCheckoutPage=!1;if(jQuery('body.woocommerce-checkout').length>0){$isCheckoutPage=!0;on_change_country('billing',!0);if(!jQuery('input#tv_same_as_billing_address').is(':checked')){on_change_country('shipping',!0)}}
if(jQuery('body.woocommerce-account').length>0){$('.col_billing .edit').on('click',function(){on_change_country('billing',!0)});$('.col_shipping .edit').on('click',function(){on_change_country('shipping',!0)})}
$isSentFullyCompleted=!1;$currentTag='zero';$('#billing_country').on("select2-close",function(e){on_change_country('billing',!1);$currentTag=check_fully_completed($currentTag,$isCheckoutPage)});$('#billing_state').on("select2-close",function(e){on_change_state('billing');$currentTag=check_fully_completed($currentTag,$isCheckoutPage)});$('#shipping_country').on("select2-close",function(e){on_change_country('shipping',!1);$currentTag=check_fully_completed($currentTag,$isCheckoutPage)});$('#shipping_state').on("select2-close",function(e){on_change_state('shipping');$currentTag=check_fully_completed($currentTag,$isCheckoutPage)});$(document).on('keydown','input',function(e){trigger_tab(e,$(this).attr('id'));$currentTag=check_fully_completed($currentTag,$isCheckoutPage)});$('#stripe-card-expiry-month').on("select2-close",function(e){on_change_expiry_month();$currentTag=check_fully_completed($currentTag,$isCheckoutPage)});$('#stripe-card-expiry-year').on("select2-close",function(e){on_change_expiry_year();$currentTag=check_fully_completed($currentTag,$isCheckoutPage)});if($('#stripe-payment-data').length>0&&$('#new[name="wc-stripe-payment-token"]').length>0){$('body').on('click','.payment_method_stripe input',function(){if($('#new[name="wc-stripe-payment-token"]').is(':checked')){$('#stripe-payment-data').show()}
else{$('#stripe-payment-data').hide()}})}}});function friendsjoin(){(function($){var $numfriend=jQuery('#numberfriend').val();var $bottom=0;var windowWidth=parseFloat(jQuery(window).width());if(windowWidth>=814){if($numfriend>20){$bottom=177+($numfriend-20)}else if($numfriend>10){$bottom=129+(48/10)*($numfriend-10)}else if($numfriend>5){$bottom=81+(48/5)*($numfriend-5)}else if($numfriend>1){$bottom=33+(48/4)*($numfriend-1)}else if($numfriend>0){$bottom=33*($numfriend)}
if($numfriend==20){$bottom=177}
if($numfriend==10){$bottom=129}
if($numfriend==50){$bottom=81}
if($numfriend==1){$bottom=33}}else if(windowWidth>732&&windowWidth<=813){if($numfriend>20){$bottom=141+($numfriend-20)}else if($numfriend>10){$bottom=103+(38/10)*($numfriend-10)}else if($numfriend>5){$bottom=65+(38/5)*($numfriend-5)}else if($numfriend>1){$bottom=27+(38/4)*($numfriend-1)}else if($numfriend>0){$bottom=(27)*($numfriend)}
if($numfriend==20){$bottom=141}
if($numfriend==10){$bottom=103}
if($numfriend==5){$bottom=65}
if($numfriend==1){$bottom=27}}else if(windowWidth>363&&windowWidth<=731){if($numfriend>20){$bottom=154+($numfriend-20)}else if($numfriend>10){$bottom=110+(38/10)*($numfriend-10)}else if($numfriend>5){$bottom=70+(38/5)*($numfriend-5)}else if($numfriend>1){$bottom=28+(38/4)*($numfriend-1)}else if($numfriend>0){$bottom=(28)*($numfriend)}
if($numfriend==20){$bottom=154}
if($numfriend==10){$bottom=110}
if($numfriend==5){$bottom=70}
if($numfriend==1){$bottom=28}}else{if($numfriend>20){$bottom=117+($numfriend-20)}else if($numfriend>10){$bottom=85+(38/10)*($numfriend-10)}else if($numfriend>5){$bottom=53+(38/5)*($numfriend-5)}else if($numfriend>1){$bottom=21+(38/4)*($numfriend-1)}else if($numfriend>0){$bottom=(21)*($numfriend)}
if($numfriend==20){$bottom=117}
if($numfriend==10){$bottom=85}
if($numfriend==5){$bottom=53}
if($numfriend==1){$bottom=21}}
jQuery('.doticon').css({'bottom':$bottom+'px'})})(jQuery)}
function on_change_country(value,onload){waitCountry=setInterval(function(){if(typeof jQuery('select#'+value+'_state')[0]!=='undefined'){jQuery('#'+value+'_country_field').insertAfter('#'+value+'_city_field');if(!onload){jQuery('#'+value+'_state').select2().select2("open")}}
else{jQuery('#'+value+'_city_field').insertAfter('#'+value+'_address_2_field').removeClass('form-row-last').addClass('form-row-wide');jQuery('#'+value+'_country_field').insertAfter('#'+value+'_city_field');jQuery('#'+value+'_postcode_field').insertAfter('#'+value+'_country_field').removeClass('form-row-first').addClass('form-row-wide');if(jQuery('#'+value+'_state_field').css('display')!=='none'){if(!onload){jQuery('#'+value+'_state').focus()}
jQuery('#'+value+'_postcode_field').insertAfter('#'+value+'_state_field').removeClass('form-row-wide')}
else{if(!onload){jQuery('#'+value+'_postcode').focus()}}}
clearInterval(waitCountry)},500)}
function on_change_state(value){jQuery('#'+value+'_postcode').focus()}
function trigger_tab(e,id){var keyCode=e.keyCode||e.which;if(e.shiftKey){if(keyCode===9){if(id==='stripe-card-cvc'){e.preventDefault();jQuery('#stripe-card-number').focus()}
if(id==='billing_first_name'){e.preventDefault();jQuery('#stripe-card-cvc').focus()}
if(id==='billing_phone'){e.preventDefault();jQuery('#billing_postcode').focus()}
if(id==='billing_postcode'){e.preventDefault();jQuery('#billing_city').focus()}
if(id==='shipping_postcode'){e.preventDefault();jQuery('#shipping_city').focus()}}}
else{if(keyCode===9){if(id==='stripe-card-number'){e.preventDefault();jQuery('#stripe-card-expiry-month').select2().select2("open")}
if(id==='stripe-card-cvc'){e.preventDefault();jQuery('#billing_first_name').focus()}
if(id==='billing_state'){e.preventDefault();jQuery('#billing_postcode').focus()}
if(id==='shipping_state'){e.preventDefault();jQuery('#shipping_postcode').focus()}
if(id==='billing_postcode'){e.preventDefault();jQuery('#billing_phone').focus()}
if(id==='billing_city'){e.preventDefault();jQuery('#billing_country').select2().select2("open")}
if(id==='shipping_city'){e.preventDefault();jQuery('#shipping_country').select2().select2("open")}
if(id==='billing_phone'){e.preventDefault();if(jQuery('body.woocommerce-checkout').length>0){if(!jQuery('input#tv_same_as_billing_address').is(':checked')){jQuery('#shipping_first_name').focus()}
else{jQuery('input#tv_same_as_billing_address').focus()}}
if(jQuery('body.woocommerce-account').length>0){if(!jQuery('input#tvshiptobilling').is(':checked')){jQuery('#shipping_first_name').focus()}
else{jQuery('input#tvshiptobilling').focus()}}}}}
jQuery.cookie("step_2",0,{expires:10,path:'/'});var acthankyou=$_GET('ac-thank-you');if(acthankyou==1){welcom_form=jQuery('.welcome-form');welcom_form.fadeIn()}}
function on_change_expiry_month(){jQuery('#stripe-card-expiry-year').select2().select2("open")}
function on_change_expiry_year(){jQuery('#stripe-card-cvc').focus()}
function $_GET(param){var vars={};window.location.href.replace(location.hash,'').replace(/[?&]+([^=&]+)=?([^&]*)?/gi,function(m,key,value){vars[key]=value!==undefined?value:''});if(param){return vars[param]?vars[param]:null}
return vars}
function check_fully_completed($currentTag,$isCheckoutPage){$Tag=$currentTag;if($currentTag!='Full'&&$isCheckoutPage){$filledCount=0;if(jQuery('.shipping_address').css('display')==='block'){$list_id=['stripe-card-number','stripe-card-expiry','stripe-card-cvc','billing_first_name','billing_last_name','billing_address_1','billing_address_2','billing_city','billing_country','billing_state','billing_postcode','billing_phone','shipping_first_name','shipping_last_name','shipping_address_1','shipping_address_2','shipping_city','shipping_country','shipping_state','shipping_postcode'];$fullyCount=15}
else{$list_id=['stripe-card-number','stripe-card-expiry','stripe-card-cvc','billing_first_name','billing_last_name','billing_address_1','billing_address_2','billing_city','billing_country','billing_state','billing_postcode','billing_phone'];$fullyCount=8}
for($i=0;$i<$list_id.length;$i++){if(jQuery('#'+$list_id[$i]).val()!==''&&jQuery('#'+$list_id[$i]).val()!=='undefined/undefined'){$filledCount++}}
if($filledCount<$fullyCount&&$filledCount>1){$Tag='Part';if($Tag!=$currentTag){sendAjaxAddACTag('eventAbandonPartiallyCompleted')}}
else{$Tag='Full';sendAjaxAddACTag('eventAbandonFullyCompleted')}}
return $Tag}
function sendAjaxAddACTag($action){jQuery.ajax({url:'/?action='+$action,type:"POST",success:function(data){}})}
function ajaxLoadAfterPageLoaded(){if(typeof jQuery.cookie('UNIQUE_REFERRAL_URL')!=='undefined'){sendAjaxAddACTag('updateACAfterRegister');jQuery.removeCookie('UNIQUE_REFERRAL_URL',{path:'/'})}
if(typeof jQuery.cookie('firstLoadCheckoutPage')!=='undefined'){sendAjaxAddACTag('firstLoadCheckoutPage');jQuery.removeCookie('firstLoadCheckoutPage',{path:'/'})}}
jQuery(function(){setTimeout(ajaxLoadAfterPageLoaded,5000)});
function preSlider(a){productBoxWidth=220,productBoxHeight=140;var b=jQuery(".fgc-slider");if(totalProduct=b.find(".slide-frame").length,b.find(".slide-frame").addClass("add_to_cart_button").addClass("ajax_add_to_cart"),$isMobile||$isDesktop?numProduct=4:(numProduct=3,jQuery(".outbox-slider").css("width","auto")),totalProduct=b.find(".slide-frame").length,a){var c=jQuery("ul.products");if(totalProduct=c.find("li").length,$isMobile)for(j=totalProduct+1;j>0;j--)moveToSlider(j);else for(j=1;j<totalProduct+1;j++)moveToSlider(j);jQuery(".slide-frame").addClass("ajax_add_to_cart")}for(i=1;i<numProduct+1;i++);b.find(".popular").parent().addClass("popular-product"),b.find(".slide-frame").each(function(){jQuery(this).hasClass("popular-product")&&jQuery(this).find("h3").before('<span class="popular">MOST POPULAR</span>')})}function moveSlider(a,b,c,d,e){var f=jQuery(".fgc-slider");if(!$isMobile){if("-10px"===f.css("left")&&"pre"===a)return;if("-2230px"===f.css("left")&&"next"===a)return}}function moveNext(a,b,c,d){moveSlider("next",a,b,c,d)}function movePre(a,b,c,d){moveSlider("pre",a,b,c,d)}function moveToSlider(a){if(jQuery(".products").length>0){var b=jQuery(".fgc-slider .fgc_slider_products"),c=jQuery("ul.products");thisLi=c.find("li:nth-child("+a+")"),toMove=thisLi.find("a .price").parent(),toMove.addClass("slide-frame"),priceHtml=toMove.find(".amount").text().replace(".00","").replace(".99","<small>.99</small>"),toMove.find(".short-description").after('<input type="hidden" value="'+toMove.find(".amount").text().replace("jQuery","")+'" class="price-value" />'),toMove.find(".price").html(priceHtml),thisLi.hasClass("pa_popular")&&toMove.find("h3").before('<span class="popular"></span>'),toMove.attr("href",String(thisLi.find(".add_to_cart_button").attr("href"))),toMove.attr("data-product_id",String(thisLi.find(".add_to_cart_button").attr("data-product_id"))),b.append(toMove)}}function setWidthSlider(a,b,c){var d=jQuery(".fgc-slider");if(totalSlide=d.find(".slide-frame").length,sizeSlider=0,$isMobile)for(d.find(".slide-frame").each(function(){sizeSlider+=jQuery(this).outerHeight()+20}),d.css("height",sizeSlider+"px"),thisTop=0,i=1;i<a+1;i++)thisTop+=d.find(".slide-frame:nth-child("+i+")").outerHeight()+20;else d.find(".slide-frame").each(function(){sizeSlider+=jQuery(this).outerWidth()+20}),d.css("width",sizeSlider+"px"),fgcBoxSlider=(d.find(".slide-frame:first-child").outerWidth()+20)*a,leftBoxSlider=(jQuery(".outbox-slider").width()-fgcBoxSlider)/ 2, jQuery(".fgc-box-slider").css("width", fgcBoxSlider + "px"), thisLeft = (d.find(".slide-frame:first-child").outerWidth() + 20) * a}function setAuto(a, b, c){return setInterval(function(){moveNext(a, b, c)}, 5e3)}function getTotalFrameAndPositionFrames(){return totalFrame = 0, leftFrameArray = [], $isMobile?(leftFirstFrame = - 20, jQuery(".outbox-slider[slider='1'] .slide-frame").each(function(){leftFrameArray.push(leftFirstFrame + "px"), leftFirstFrame -= jQuery(this).outerHeight(), leftFirstFrame -= 20, totalFrame++})):(leftFirstFrame = - 10, jQuery(".outbox-slider[slider='1'] .slide-frame").each(function(){leftFrameArray.push(leftFirstFrame + "px"), leftFirstFrame -= jQuery(this).outerWidth(), leftFirstFrame -= 20, totalFrame++})), {totalFrame:totalFrame, leftFrameArray:leftFrameArray}}function clickNextButton(a, b, c, d){jQuery(".next-button").hasClass("disabled") || (jQuery(".next-button").addClass("disabled"), $isMobile?(indexFrame = a.indexOf(c.css("top")), nextIndex = indexFrame, 0 !== indexFrame && (indexFrame < numProduct?nextIndex = 0:nextIndex = indexFrame - numProduct), jQuery(".fgc-slider").animate({top:a[nextIndex]}, d, function(){jQuery(".next-button").removeClass("disabled")})):(indexFrame = a.indexOf(c.css("left")), nextIndex = indexFrame, b - indexFrame < 2 * numProduct?nextIndex = b - numProduct:nextIndex = indexFrame + numProduct, nextIndex = indexFrame, b - indexFrame < 2 * numProduct?nextIndex = b - numProduct:nextIndex = indexFrame + numProduct, jQuery(".fgc-slider").animate({left:a[nextIndex]}, d, function(){jQuery(".next-button").removeClass("disabled")})))}function clickPreButton(a, b, c, d){jQuery(".pre-button").hasClass("disabled") || (jQuery(".pre-button").addClass("disabled"), $isMobile?(indexFrame = a.indexOf(c.css("top")), nextIndex = indexFrame, b - indexFrame < 2 * numProduct?nextIndex = b - numProduct:nextIndex = indexFrame + numProduct, jQuery(".fgc-slider").animate({top:a[nextIndex]}, d, function(){jQuery(".pre-button").removeClass("disabled")})):(indexFrame = a.indexOf(c.css("left")), nextIndex = indexFrame, 0 !== indexFrame && (indexFrame < numProduct?nextIndex = 0:nextIndex = indexFrame - numProduct), jQuery(".fgc-slider").animate({left:a[nextIndex]}, d, function(){jQuery(".pre-button").removeClass("disabled")})))}function singleProductAddToCart(a){jQuery.ajax({type:"POST", dataType:"html", url:a, success:function(a){jQuery("#show_login").length > 0?(jQuery.cookie("initiateCheckout", "step1", {expires:10, path:"/"}), window.location = "/login-page"):window.location = "/checkout", disableBlurPage()}})}function subscriptionProductAddToCart(a, b){jQuery.ajax({type:"POST", url:a + "&ajax_add_cart=yes", contentType:"application/json; charset=utf-8", data:{"add-to-cart":b}, success:function(a){var a = JSON.parse(a); "yes" == a.error?window.location = window.location.href:(jQuery("#show_login").length > 0?(jQuery.cookie("step_2", 1, {expires:10, path:"/"}), jQuery.cookie("initiateCheckout", "step1", {expires:10, path:"/"}), window.location = "/login-page"):window.location = "/checkout", disableBlurPage())}})}function enableBlurPage(){jQuery(".blur-main").fadeIn(), jQuery(".outbox-slider > .ajax-loader.small").removeClass("hide")}function disableBlurPage(){jQuery(".blur-main").fadeOut()}jQuery(document).ready(function(a){if (screenWidth = a(window).width(), $isMobile = !1, $isDesktop = !0, screenWidth < 746 && ($isMobile = !0), screenWidth < 1024 && ($isDesktop = !1), $isSingleProduct = !1, a("body").hasClass("single-purchase")?$isSingleProduct = !0:(a(".fgc_slider_products").prependTo(".fgc-slider"), $isMobile?a(".fgc_slider_products.desktop").remove():a(".fgc_slider_products.mobile").remove()), a("body").hasClass("category_page")){$isMobile && a(".img-below-slider").closest("p").insertBefore(a(".outbox-slider")), mainPadding = a(".col-full").css("padding"), a(".shop-step-1 ").css("padding", mainPadding), a(".img-below-slider").closest("p").css("padding", mainPadding).css("padding-bottom", "0").css("margin-bottom", "0"), $isDesktop || a(".outbox-slider").css("margin", mainPadding), a(".single_variation_wrap").hide(), preSlider($isSingleProduct); var b = a(".fgc-slider"); $totalFrameAndPositionFrames = getTotalFrameAndPositionFrames(), totalFrame = $totalFrameAndPositionFrames.totalFrame, leftFrameArray = $totalFrameAndPositionFrames.leftFrameArray, time = 1e3, $isMobile && a(".pre-button").length > 0 && ($isMobile && a(".fgc-slider").css("top", leftFrameArray[totalFrame - 4]), time = 1e3), a(".next-button").click(function(){clickNextButton(leftFrameArray, totalFrame, b, time)}), a(".pre-button").click(function(){clickPreButton(leftFrameArray, totalFrame, b, time)}), a(".single_add_to_cart_button").addClass("add_to_cart_button").addClass("ajax_add_to_cart").addClass("product-type-variable"), a(".outbox-slider").append('<div class="blur-main"></div>').append('<i class="ajax-loader small animate-spin hide"></i>'), a(".outbox-slider > .ajax-loader.small").css("position", "absolute").css("top", "50%").css("left", "50%").css("z-index", "9"), a(".blur-main").css("width", "100%").css("height", "100%").css("position", "absolute").css("top", "0").css("left", "0").css("background", "#fff").css("opacity", "0.6").css("z-index", "9").css("display", "none"), $isSingleProduct?$isMobile?a(".slide-frame").on("tap", function(b){b.preventDefault(), enableBlurPage(), $href = a(this).attr("href"), singleProductAddToCart($href)}):a(".slide-frame").click(function(b){b.preventDefault(), enableBlurPage(), $href = a(this).attr("href"), singleProductAddToCart($href)}):$isMobile?a(".ajax_add_to_cart_variation").on("tap", function(b){b.preventDefault(), enableBlurPage(), $addToCartVal = a(this).find('input[name="add-to-cart"]').val(), $href = a(this).attr("href"), subscriptionProductAddToCart($href, $addToCartVal)}):a(".ajax_add_to_cart_variation").click(function(b){b.preventDefault(), enableBlurPage(), $addToCartVal = a(this).find('input[name="add-to-cart"]').val(),$href=a(this).attr("href"),subscriptionProductAddToCart($href,$addToCartVal)}),a(".nav-text-pre").click(function(b){a(".pre-button").click()}),a(".nav-text-next").click(function(b){a(".next-button").click()})}a("body").hasClass("subscription_category_page")&&a("#make_change_subscription").length>0&&a("#need_move").length>0&&(need_move=a("#need_move").val(),!$isMobile&&need_move>1?(need_move>12&&(need_move=12),move_width=0-(a(".slide-frame").outerWidth()+20)*(need_move-2)-10,a(".fgc-slider").animate({left:move_width},0,function(){})):need_move>12?(move_height=-10,a(".fgc-slider").animate({top:move_height},0,function(){})):need_move>1&&(need_move=12-need_move,move_height=0-(a(".slide-frame").outerHeight()+20)*need_move-10,9===need_move&&(move_height-=10),a(".fgc-slider").animate({top:move_height},0,function(){})))});
!function(a,b,c){"function"==typeof define&&define.amd?define(["jquery"],function(d){return c(d,a,b),d.mobile}):c(a.jQuery,a,b)}(this,document,function(a,b,c,d){!function(a,b,c,d){function y(a){for(;a&&"undefined"!=typeof a.originalEvent;)a=a.originalEvent;return a}function z(b,c){var f,g,i,k,l,m,n,o,p,e=b.type;if(b=a.Event(b),b.type=c,f=b.originalEvent,g=a.event.props,e.search(/^(mouse|click)/)>-1&&(g=j),f)for(n=g.length,k;n;)k=g[--n],b[k]=f[k];if(e.search(/mouse(down|up)|click/)>-1&&!b.which&&(b.which=1),e.search(/^touch/)!==-1&&(i=y(f),e=i.touches,l=i.changedTouches,m=e&&e.length?e[0]:l&&l.length?l[0]:d))for(o=0,p=h.length;o<p;o++)k=h[o],b[k]=m[k];return b}function A(b){for(var d,f,c={};b;){d=a.data(b,e);for(f in d)d[f]&&(c[f]=c.hasVirtualBinding=!0);b=b.parentNode}return c}function B(b,c){for(var d;b;){if(d=a.data(b,e),d&&(!c||d[c]))return b;b=b.parentNode}return null}function C(){r=!1}function D(){r=!0}function E(){v=0,p.length=0,q=!1,D()}function F(){C()}function G(){H(),l=setTimeout(function(){l=0,E()},a.vmouse.resetTimerDuration)}function H(){l&&(clearTimeout(l),l=0)}function I(b,c,d){var e;return(d&&d[b]||!d&&B(c.target,b))&&(e=z(c,b),a(c.target).trigger(e)),e}function J(b){var d,c=a.data(b.target,f);q||v&&v===c||(d=I("v"+b.type,b),d&&(d.isDefaultPrevented()&&b.preventDefault(),d.isPropagationStopped()&&b.stopPropagation(),d.isImmediatePropagationStopped()&&b.stopImmediatePropagation()))}function K(b){var d,e,g,c=y(b).touches;c&&1===c.length&&(d=b.target,e=A(d),e.hasVirtualBinding&&(v=u++,a.data(d,f,v),H(),F(),o=!1,g=y(b).touches[0],m=g.pageX,n=g.pageY,I("vmouseover",b,e),I("vmousedown",b,e)))}function L(a){r||(o||I("vmousecancel",a,A(a.target)),o=!0,G())}function M(b){if(!r){var c=y(b).touches[0],d=o,e=a.vmouse.moveDistanceThreshold,f=A(b.target);o=o||Math.abs(c.pageX-m)>e||Math.abs(c.pageY-n)>e,o&&!d&&I("vmousecancel",b,f),I("vmousemove",b,f),G()}}function N(a){if(!r){D();var c,d,b=A(a.target);I("vmouseup",a,b),o||(c=I("vclick",a,b),c&&c.isDefaultPrevented()&&(d=y(a).changedTouches[0],p.push({touchID:v,x:d.clientX,y:d.clientY}),q=!0)),I("vmouseout",a,b),o=!1,G()}}function O(b){var d,c=a.data(b,e);if(c)for(d in c)if(c[d])return!0;return!1}function P(){}function Q(b){var c=b.substr(1);return{setup:function(){O(this)||a.data(this,e,{});var d=a.data(this,e);d[b]=!0,k[b]=(k[b]||0)+1,1===k[b]&&t.bind(c,J),a(this).bind(c,P),s&&(k.touchstart=(k.touchstart||0)+1,1===k.touchstart&&t.bind("touchstart",K).bind("touchend",N).bind("touchmove",M).bind("scroll",L))},teardown:function(){--k[b],k[b]||t.unbind(c,J),s&&(--k.touchstart,k.touchstart||t.unbind("touchstart",K).unbind("touchmove",M).unbind("touchend",N).unbind("scroll",L));var d=a(this),f=a.data(this,e);f&&(f[b]=!1),d.unbind(c,P),O(this)||d.removeData(e)}}}var w,x,e="virtualMouseBindings",f="virtualTouchID",g="vmouseover vmousedown vmousemove vmouseup vclick vmouseout vmousecancel".split(" "),h="clientX clientY pageX pageY screenX screenY".split(" "),i=a.event.mouseHooks?a.event.mouseHooks.props:[],j=a.event.props.concat(i),k={},l=0,m=0,n=0,o=!1,p=[],q=!1,r=!1,s="addEventListener"in c,t=a(c),u=1,v=0;for(a.vmouse={moveDistanceThreshold:10,clickDistanceThreshold:10,resetTimerDuration:1500},x=0;x<g.length;x++)a.event.special[g[x]]=Q(g[x]);s&&c.addEventListener("click",function(b){var e,g,h,i,j,k,c=p.length,d=b.target;if(c)for(e=b.clientX,g=b.clientY,w=a.vmouse.clickDistanceThreshold,h=d;h;){for(i=0;i<c;i++)if(j=p[i],k=0,h===d&&Math.abs(j.x-e)<w&&Math.abs(j.y-g)<w||a.data(h,f)===j.touchID)return b.preventDefault(),void b.stopPropagation();h=h.parentNode}},!0)}(a,b,c),function(a){a.mobile={}}(a),function(a,b){var d={touch:"ontouchend"in c};a.mobile.support=a.mobile.support||{},a.extend(a.support,d),a.extend(a.mobile.support,d)}(a),function(a,b,d){function k(b,c,e,f){var g=e.type;e.type=c,f?a.event.trigger(e,d,b):a.event.dispatch.call(b,e),e.type=g}var e=a(c),f=a.mobile.support.touch,g="touchmove scroll",h=f?"touchstart":"mousedown",i=f?"touchend":"mouseup",j=f?"touchmove":"mousemove";a.each("touchstart touchmove touchend tap taphold swipe swipeleft swiperight scrollstart scrollstop".split(" "),function(b,c){a.fn[c]=function(a){return a?this.bind(c,a):this.trigger(c)},a.attrFn&&(a.attrFn[c]=!0)}),a.event.special.scrollstart={enabled:!0,setup:function(){function f(a,c){d=c,k(b,d?"scrollstart":"scrollstop",a)}var d,e,b=this,c=a(b);c.bind(g,function(b){a.event.special.scrollstart.enabled&&(d||f(b,!0),clearTimeout(e),e=setTimeout(function(){f(b,!1)},50))})},teardown:function(){a(this).unbind(g)}},a.event.special.tap={tapholdThreshold:750,emitTapOnTaphold:!0,setup:function(){var b=this,c=a(b),d=!1;c.bind("vmousedown",function(f){function i(){clearTimeout(h)}function j(){i(),c.unbind("vclick",l).unbind("vmouseup",i),e.unbind("vmousecancel",j)}function l(a){j(),d||g!==a.target?d&&a.preventDefault():k(b,"tap",a)}if(d=!1,f.which&&1!==f.which)return!1;var h,g=f.target;c.bind("vmouseup",i).bind("vclick",l),e.bind("vmousecancel",j),h=setTimeout(function(){a.event.special.tap.emitTapOnTaphold||(d=!0),k(b,"taphold",a.Event("taphold",{target:g}))},a.event.special.tap.tapholdThreshold)})},teardown:function(){a(this).unbind("vmousedown").unbind("vclick").unbind("vmouseup"),e.unbind("vmousecancel")}},a.event.special.swipe={scrollSupressionThreshold:30,durationThreshold:1e3,horizontalDistanceThreshold:30,verticalDistanceThreshold:30,getLocation:function(a){var c=b.pageXOffset,d=b.pageYOffset,e=a.clientX,f=a.clientY;return 0===a.pageY&&Math.floor(f)>Math.floor(a.pageY)||0===a.pageX&&Math.floor(e)>Math.floor(a.pageX)?(e-=c,f-=d):(f<a.pageY-d||e<a.pageX-c)&&(e=a.pageX-c,f=a.pageY-d),{x:e,y:f}},start:function(b){var c=b.originalEvent.touches?b.originalEvent.touches[0]:b,d=a.event.special.swipe.getLocation(c);return{time:(new Date).getTime(),coords:[d.x,d.y],origin:a(b.target)}},stop:function(b){var c=b.originalEvent.touches?b.originalEvent.touches[0]:b,d=a.event.special.swipe.getLocation(c);return{time:(new Date).getTime(),coords:[d.x,d.y]}},handleSwipe:function(b,c,d,e){if(c.time-b.time<a.event.special.swipe.durationThreshold&&Math.abs(b.coords[0]-c.coords[0])>a.event.special.swipe.horizontalDistanceThreshold&&Math.abs(b.coords[1]-c.coords[1])<a.event.special.swipe.verticalDistanceThreshold){var f=b.coords[0]>c.coords[0]?"swipeleft":"swiperight";return k(d,"swipe",a.Event("swipe",{target:e,swipestart:b,swipestop:c}),!0),k(d,f,a.Event(f,{target:e,swipestart:b,swipestop:c}),!0),!0}return!1},eventInProgress:!1,setup:function(){var b,c=this,d=a(c),f={};b=a.data(this,"mobile-events"),b||(b={length:0},a.data(this,"mobile-events",b)),b.length++,b.swipe=f,f.start=function(b){if(!a.event.special.swipe.eventInProgress){a.event.special.swipe.eventInProgress=!0;var d,g=a.event.special.swipe.start(b),h=b.target,k=!1;f.move=function(b){g&&!b.isDefaultPrevented()&&(d=a.event.special.swipe.stop(b),k||(k=a.event.special.swipe.handleSwipe(g,d,c,h),k&&(a.event.special.swipe.eventInProgress=!1)),Math.abs(g.coords[0]-d.coords[0])>a.event.special.swipe.scrollSupressionThreshold&&b.preventDefault())},f.stop=function(){k=!0,a.event.special.swipe.eventInProgress=!1,e.off(j,f.move),f.move=null},e.on(j,f.move).one(i,f.stop)}},d.on(h,f.start)},teardown:function(){var b,c;b=a.data(this,"mobile-events"),b&&(c=b.swipe,delete b.swipe,b.length--,0===b.length&&a.removeData(this,"mobile-events")),c&&(c.start&&a(this).off(h,c.start),c.move&&e.off(j,c.move),c.stop&&e.off(i,c.stop))}},a.each({scrollstop:"scrollstart",taphold:"tap",swipeleft:"swipe.left",swiperight:"swipe.right"},function(b,c){a.event.special[b]={setup:function(){a(this).bind(c,a.noop)},teardown:function(){a(this).unbind(c)}}})}(a,this)});
!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){function c(a){return h.raw?a:encodeURIComponent(a)}function d(a){return h.raw?a:decodeURIComponent(a)}function e(a){return c(h.json?JSON.stringify(a):String(a))}function f(a){0===a.indexOf('"')&&(a=a.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{return a=decodeURIComponent(a.replace(b," ")),h.json?JSON.parse(a):a}catch(a){}}function g(b,c){var d=h.raw?b:f(b);return a.isFunction(c)?c(d):d}var b=/\+/g,h=a.cookie=function(b,f,i){if(arguments.length>1&&!a.isFunction(f)){if(i=a.extend({},h.defaults,i),"number"==typeof i.expires){var j=i.expires,k=i.expires=new Date;k.setMilliseconds(k.getMilliseconds()+864e5*j)}return document.cookie=[c(b),"=",e(f),i.expires?"; expires="+i.expires.toUTCString():"",i.path?"; path="+i.path:"",i.domain?"; domain="+i.domain:"",i.secure?"; secure":""].join("")}for(var l=b?void 0:{},m=document.cookie?document.cookie.split("; "):[],n=0,o=m.length;n<o;n++){var p=m[n].split("="),q=d(p.shift()),r=p.join("=");if(b===q){l=g(r,f);break}b||void 0===(r=g(r))||(l[q]=r)}return l};h.defaults={},a.removeCookie=function(b,c){return a.cookie(b,"",a.extend({},c,{expires:-1})),!a.cookie(b)}});
jQuery(function(a){(function(){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w=[].slice,x=[].indexOf||function(a){for(var b=0,c=this.length;b<c;b++)if(b in this&&this[b]===a)return b;return-1};a.payment={},a.payment.fn={},a.fn.payment=function(){var b,c;return c=arguments[0],b=2<=arguments.length?w.call(arguments,1):[],a.payment.fn[c].apply(this,b)},e=/(\d{1,4})/g,a.payment.cards=d=[{type:"visaelectron",pattern:/^4(026|17500|405|508|844|91[37])/,format:e,length:[16],cvcLength:[3],luhn:!0},{type:"maestro",pattern:/^(5(018|0[23]|[68])|6(39|7))/,format:e,length:[12,13,14,15,16,17,18,19],cvcLength:[3],luhn:!0},{type:"forbrugsforeningen",pattern:/^600/,format:e,length:[16],cvcLength:[3],luhn:!0},{type:"dankort",pattern:/^5019/,format:e,length:[16],cvcLength:[3],luhn:!0},{type:"visa",pattern:/^4/,format:e,length:[13,16],cvcLength:[3],luhn:!0},{type:"mastercard",pattern:/^(5[0-5]|2[2-7])/,format:e,length:[16],cvcLength:[3],luhn:!0},{type:"amex",pattern:/^3[47]/,format:/(\d{1,4})(\d{1,6})?(\d{1,5})?/,length:[15],cvcLength:[3,4],luhn:!0},{type:"dinersclub",pattern:/^3[0689]/,format:/(\d{1,4})(\d{1,6})?(\d{1,4})?/,length:[14],cvcLength:[3],luhn:!0},{type:"discover",pattern:/^6([045]|22)/,format:e,length:[16],cvcLength:[3],luhn:!0},{type:"unionpay",pattern:/^(62|88)/,format:e,length:[16,17,18,19],cvcLength:[3],luhn:!1},{type:"jcb",pattern:/^35/,format:e,length:[16],cvcLength:[3],luhn:!0}],b=function(a){var b,c,e;for(a=(a+"").replace(/\D/g,""),c=0,e=d.length;c<e;c++)if(b=d[c],b.pattern.test(a))return b},c=function(a){var b,c,e;for(c=0,e=d.length;c<e;c++)if(b=d[c],b.type===a)return b},m=function(a){var b,c,d,e,f,g;for(d=!0,e=0,c=(a+"").split("").reverse(),f=0,g=c.length;f<g;f++)b=c[f],b=parseInt(b,10),(d=!d)&&(b*=2),b>9&&(b-=9),e+=b;return e%10===0},l=function(a){var b;return null!=a.prop("selectionStart")&&a.prop("selectionStart")!==a.prop("selectionEnd")||!(null==("undefined"!=typeof document&&null!==document&&null!=(b=document.selection)?b.createRange:void 0)||!document.selection.createRange().text)},q=function(b){return setTimeout(function(){var c,d;return c=a(b.currentTarget),d=c.val(),d=d.replace(/\D/g,""),c.val(d)})},o=function(b){return setTimeout(function(){var c,d;return c=a(b.currentTarget),d=c.val(),d=a.payment.formatCardNumber(d),c.val(d)})},h=function(c){var d,e,f,g,h,i,j;if(f=String.fromCharCode(c.which),/^\d+$/.test(f)&&(d=a(c.currentTarget),j=d.val(),e=b(j+f),g=(j.replace(/\D/g,"")+f).length,i=16,e&&(i=e.length[e.length.length-1]),!(g>=i||null!=d.prop("selectionStart")&&d.prop("selectionStart")!==j.length)))return h=e&&"amex"===e.type?/^(\d{4}|\d{4}\s\d{6})$/:/(?:^|\s)(\d{4})$/,h.test(j)?(c.preventDefault(),setTimeout(function(){return d.val(j+" "+f)})):h.test(j+f)?(c.preventDefault(),setTimeout(function(){return d.val(j+f+" ")})):void 0},f=function(b){var c,d;if(c=a(b.currentTarget),d=c.val(),8===b.which&&(null==c.prop("selectionStart")||c.prop("selectionStart")===d.length))return/\d\s$/.test(d)?(b.preventDefault(),setTimeout(function(){return c.val(d.replace(/\d\s$/,""))})):/\s\d?$/.test(d)?(b.preventDefault(),setTimeout(function(){return c.val(d.replace(/\d$/,""))})):void 0},p=function(b){return setTimeout(function(){var c,d;return c=a(b.currentTarget),d=c.val(),d=a.payment.formatExpiry(d),c.val(d)})},i=function(b){var c,d,e;if(d=String.fromCharCode(b.which),/^\d+$/.test(d))return c=a(b.currentTarget),e=c.val()+d,/^\d$/.test(e)&&"0"!==e&&"1"!==e?(b.preventDefault(),setTimeout(function(){return c.val("0"+e+" / ")})):/^\d\d$/.test(e)?(b.preventDefault(),setTimeout(function(){return c.val(""+e+" / ")})):void 0},j=function(b){var c,d,e;if(d=String.fromCharCode(b.which),/^\d+$/.test(d))return c=a(b.currentTarget),e=c.val(),/^\d\d$/.test(e)?c.val(""+e+" / "):void 0},k=function(b){var c,d,e;if(e=String.fromCharCode(b.which),"/"===e||" "===e)return c=a(b.currentTarget),d=c.val(),/^\d$/.test(d)&&"0"!==d?c.val("0"+d+" / "):void 0},g=function(b){var c,d;if(c=a(b.currentTarget),d=c.val(),8===b.which&&(null==c.prop("selectionStart")||c.prop("selectionStart")===d.length))return/\d\s\/\s$/.test(d)?(b.preventDefault(),setTimeout(function(){return c.val(d.replace(/\d\s\/\s$/,""))})):void 0},n=function(b){return setTimeout(function(){var c,d;return c=a(b.currentTarget),d=c.val(),d=d.replace(/\D/g,"").slice(0,4),c.val(d)})},u=function(a){var b;return!(!a.metaKey&&!a.ctrlKey)||32!==a.which&&(0===a.which||(a.which<33||(b=String.fromCharCode(a.which),!!/[\d\s]/.test(b))))},s=function(c){var d,e,f,g;if(d=a(c.currentTarget),f=String.fromCharCode(c.which),/^\d+$/.test(f)&&!l(d))return g=(d.val()+f).replace(/\D/g,""),e=b(g),e?g.length<=e.length[e.length.length-1]:g.length<=16},t=function(b){var c,d,e;if(c=a(b.currentTarget),d=String.fromCharCode(b.which),/^\d+$/.test(d)&&!l(c))return e=c.val()+d,e=e.replace(/\D/g,""),!(e.length>6)&&void 0},r=function(b){var c,d,e;if(c=a(b.currentTarget),d=String.fromCharCode(b.which),/^\d+$/.test(d)&&!l(c))return e=c.val()+d,e.length<=4},v=function(b){var c,e,f,g,h;if(c=a(b.currentTarget),h=c.val(),g=a.payment.cardType(h)||"unknown",!c.hasClass(g))return e=function(){var a,b,c;for(c=[],a=0,b=d.length;a<b;a++)f=d[a],c.push(f.type);return c}(),c.removeClass("unknown"),c.removeClass(e.join(" ")),c.addClass(g),c.toggleClass("identified","unknown"!==g),c.trigger("payment.cardType",g)},a.payment.fn.formatCardCVC=function(){return this.on("keypress",u),this.on("keypress",r),this.on("paste",n),this.on("change",n),this.on("input",n),this},a.payment.fn.formatCardExpiry=function(){return this.on("keypress",u),this.on("keypress",t),this.on("keypress",i),this.on("keypress",k),this.on("keypress",j),this.on("keydown",g),this.on("change",p),this.on("input",p),this},a.payment.fn.formatCardNumber=function(){return this.on("keypress",u),this.on("keypress",s),this.on("keypress",h),this.on("keydown",f),this.on("keyup",v),this.on("paste",o),this.on("change",o),this.on("input",o),this.on("input",v),this},a.payment.fn.restrictNumeric=function(){return this.on("keypress",u),this.on("paste",q),this.on("change",q),this.on("input",q),this},a.payment.fn.cardExpiryVal=function(){return a.payment.cardExpiryVal(a(this).val())},a.payment.cardExpiryVal=function(a){var b,c,d,e;return a=a.replace(/\s/g,""),e=a.split("/",2),b=e[0],d=e[1],2===(null!=d?d.length:void 0)&&/^\d+$/.test(d)&&(c=(new Date).getFullYear(),c=c.toString().slice(0,2),d=c+d),b=parseInt(b,10),d=parseInt(d,10),{month:b,year:d}},a.payment.validateCardNumber=function(a){var c,d;return a=(a+"").replace(/\s+|-/g,""),!!/^\d+$/.test(a)&&(c=b(a),!!c&&(d=a.length,x.call(c.length,d)>=0&&(c.luhn===!1||m(a))))},a.payment.validateCardExpiry=function(b,c){var d,e,f;return"object"==typeof b&&"month"in b&&(f=b,b=f.month,c=f.year),!(!b||!c)&&(b=a.trim(b),c=a.trim(c),!!/^\d+$/.test(b)&&(!!/^\d+$/.test(c)&&(1<=b&&b<=12&&(2===c.length&&(c=c<70?"20"+c:"19"+c),4===c.length&&(e=new Date(c,b),d=new Date,e.setMonth(e.getMonth()-1),e.setMonth(e.getMonth()+1,1),e>d)))))},a.payment.validateCardCVC=function(b,d){var e,f;return b=a.trim(b),!!/^\d+$/.test(b)&&(e=c(d),null!=e?(f=b.length,x.call(e.cvcLength,f)>=0):b.length>=3&&b.length<=4)},a.payment.cardType=function(a){var c;return a?(null!=(c=b(a))?c.type:void 0)||null:null},a.payment.formatCardNumber=function(c){var d,e,f,g;return c=c.replace(/\D/g,""),(d=b(c))?(f=d.length[d.length.length-1],c=c.slice(0,f),d.format.global?null!=(g=c.match(d.format))?g.join(" "):void 0:(e=d.format.exec(c),null!=e?(e.shift(),e=a.grep(e,function(a){return a}),e.join(" ")):void 0)):c},a.payment.formatExpiry=function(a){var b,c,d,e;return(c=a.match(/^\D*(\d{1,2})(\D+)?(\d{1,4})?/))?(b=c[1]||"",d=c[2]||"",e=c[3]||"",e.length>0?d=" / ":" /"===d?(b=b.substring(0,1),d=""):2===b.length||d.length>0?d=" / ":1===b.length&&"0"!==b&&"1"!==b&&(b="0"+b,d=" / "),b+d+e):""}}).call(this)}),jQuery(document).ready(function(a){a(".accout_card_number").payment("formatCardNumber"),a("body").on("updated_checkout",function(){a(".accout_card_number").payment("formatCardNumber")})});
function shipping_same_as_billing(){"none"===jQuery(".shipping_address").css("display")&&jQuery(".woocommerce-billing-fields input").each(function(){input_id=jQuery(this).attr("id"),jQuery("#"+input_id.replace("billing","shipping")).length>0&&jQuery("#"+input_id.replace("billing","shipping")).val(jQuery(this).val())})}
function updateForPOBox(){for(jQuery("#order_comments").val(""),jQuery("#tv_same_as_billing_address").is(":checked")?$shipping_address=jQuery("#billing_address_1").val()+" "+jQuery("#billing_address_2").val():$shipping_address=jQuery("#shipping_address_1").val()+" "+jQuery("#shipping_address_2").val(),$PO_array=["PO Box","P.O. Box","P.O Box","PO. Box","PO Bx","P.O. Bx","P.O Bx","Parcel Locker","Parcel Lckr","Parcel Service","Parcel Lkr"],i=0;i<$PO_array.length;i++)
$shipping_address.indexOf($PO_array[i])!==-1&&jQuery("#order_comments").val("AUS Post Only")}
function updateTextForDelivery(){jQuery("#authorise").is(":checked")?jQuery("#text_for_delivery").html("By selecting this box, courier will leave your package of REIZE if nobody is home"):jQuery("#text_for_delivery").html("You have chosen to require a signature on delivery. If you are not home when the courier delivers your REIZE they will leave a note and you will need to collect it from a local pick up centre")}
function show_link_term_different_currency(a){"shipping"===a?country=jQuery("#s2id_shipping_country .select2-choice .select2-chosen").html():"billing"===a&&(country=jQuery("#s2id_billing_country .select2-choice .select2-chosen").html()),link_term_different_currency=jQuery('input[name="woocommerce_checkout_place_order"]').closest("div").find(".link_term_different_currency"),"Select a country…"===country||"Australia"===country?link_term_different_currency.fadeOut():link_term_different_currency.fadeIn()}
function check_show_protip(a,b){return b?b:("shipping"===a?country=jQuery("#s2id_shipping_country .select2-choice .select2-chosen").html():"billing"===a&&(country=jQuery("#s2id_billing_country .select2-choice .select2-chosen").html()),"Select a country…"!==country&&"Australia"!==country&&(jQuery("#foreign_country").modal("show"),!0))}
jQuery(document).ready(function(a){for(array_id=["stripe-card-number","stripe-card-cvc","order_comments","billing_first_name","billing_last_name","billing_address_1","billing_address_2","billing_city","billing_postcode","billing_email","billing_phone","billing_state","billing_country","shipping_first_name","shipping_last_name","shipping_address_1","shipping_address_2","shipping_city","shipping_postcode","shipping_state","shipping_country"],i=0;i<array_id.length;i++)
"undefined"!=typeof a.cookie(array_id[i])&&""!==a.cookie(array_id[i])&&a("#"+array_id[i]).val(a.cookie(array_id[i]));a("#stripe-card-expiry-month").val(a.cookie("stripe-card-expiry-month")),a("#stripe-card-expiry-year").val(a.cookie("stripe-card-expiry-year")),setTimeout(function(){"undefined"!=typeof a.cookie("stripe-card-expiry-year")&&""!==a.cookie("stripe-card-expiry-year")&&a("#select2-chosen-8").val(a.cookie("stripe-card-expiry-year")).trigger("change"),a("#stripe-card-expiry").val(a.cookie("stripe-card-expiry-month")+"/"+a.cookie("stripe-card-expiry-year"))},1e3),a(".update_your_order").click(function(b){for(b.preventDefault(),a.cookie("stripe-card-expiry-month",a(".select2-container.month_select .select2-chosen").html()),a.cookie("stripe-card-expiry-year",a(".select2-container.year_select .select2-chosen").html()),a.cookie("billing_first_name",a("#billing_first_name").val()),i=0;i<array_id.length;i++)
""!==a("#"+array_id[i]).val()&&a.cookie(array_id[i],a("#"+array_id[i]).val());return window.location=a(this).attr("href"),!0}),a('input[name="woocommerce_checkout_place_order"]').click(function(b){setTimeout(function(){a(".woocommerce_error").length>0&&(a(".woocommerce_error").offset().top>300?next_top=a(".woocommerce_error").offset().top-300:next_top=0,jQuery("html, body").animate({scrollTop:next_top},1e3))},1e3)}),a("#page").append('<div class="blur"></div>'),a('input[name="apply_coupon"]').val("APPLY GIFT CARD"),a("#coupon_code").attr("placeholder","Gift Card Code"),a(".add_gift_card a").on("tap",function(b){b.preventDefault(),a(".cart-discount").length>0?(coupon_code=a(".cart-discount .woocommerce-remove-coupon").attr("data-coupon"),"firstreferee"===coupon_code?alert("Coupon activated."):alert("Coupon ["+a(".cart-discount .woocommerce-remove-coupon").attr("data-coupon")+"] activated.")):(a(".checkout_coupon").fadeIn(),a("#page .blur").fadeIn())}),a('input[name="apply_coupon"]').click(function(){a(".checkout_coupon").fadeOut(),a("#page .blur").fadeOut()}),a("#page .blur").click(function(){a(".checkout_coupon").fadeOut(),a("#page .blur").fadeOut()}),a("#tv_same_as_billing_address").click(function(){shipping_same_as_billing()}),a("#billing_country").change(function(){jQuery("#tv_same_as_billing_address").is(":checked")&&a("#shipping_country").val(a(this).val()).trigger("change")}),updateForPOBox(),a("#billing_address_1").change(function(){updateForPOBox()}),a("#billing_address_2").change(function(){updateForPOBox()}),a("#shipping_address_1").change(function(){updateForPOBox()}),a("#shipping_address_2").change(function(){updateForPOBox()}),updateTextForDelivery(),a("#authorise").change(function(){updateTextForDelivery()}),jQuery('input[name="woocommerce_checkout_place_order"]').closest("div").append('<br/><span class="link_term_different_currency">If you are paying in a different currency from AUD, <a href="#">Click Here</a> to read our Terms and Conditions</span>'),a("#term_different_currency_popup").appendTo("body"),a(".link_term_different_currency a").click(function(b){b.preventDefault(),a("#term_different_currency_popup").css("top",a(window).scrollTop()+15+"px").fadeIn(),a(".blur").fadeIn()}),a("body").on("click",".blur",function(b){"none"!==a("#term_different_currency_popup").css("display")&&(a("#term_different_currency_popup").fadeOut(),a(".blur").fadeOut())}),a("#billing_country").on("change",function(){a("#tv_same_as_billing_address").is(":checked")&&show_link_term_different_currency("billing")}),a("#shipping_country").on("change",function(){show_link_term_different_currency("shipping")}),a("#tv_same_as_billing_address").on("click",function(){a(this).is(":checked")?show_link_term_different_currency("billing"):on_change_country("shipping",!0)}),"undefined"==typeof a.cookie("shipping_country")&&setTimeout(function(){country_val=jQuery('#shipping_country option[selected="selected"]').val()},1e3),"undefined"==typeof a.cookie("shipping_state")&&jQuery("select#shipping_state").length>0&&(state_val=jQuery('#shipping_state option[selected="selected"]').val()),"undefined"==typeof a.cookie("billing_first_name")&&setTimeout(function(){a("#billing_first_name").val(a("#bk_billing_first_name").val())},1e3),jQuery("#foreign_country").length>0&&(isDisplayedProtip=!1,a("#billing_country").on("change",function(){a("#tv_same_as_billing_address").is(":checked")&&(isDisplayedProtip=check_show_protip("billing",isDisplayedProtip))}),a("#shipping_country").on("change",function(){isDisplayedProtip=check_show_protip("shipping",isDisplayedProtip)}),a("#tv_same_as_billing_address").on("click",function(){a(this).is(":checked")&&(isDisplayedProtip=check_show_protip("billing",isDisplayedProtip))})),jQuery("body").on("DOMNodeInserted",".woocommerce-error",function(){jQuery("html, body").animate({scrollTop:0},"slow")}),a("input[name=woocommerce_checkout_place_order]").click(function(){a(".woocommerce-checkout").find("#checkout_loader_img").removeClass("hide")}),a("body").on("DOMNodeInserted",".woocommerce-error",function(){a(".woocommerce-checkout").find("#checkout_loader_img").addClass("hide")})
if(jQuery('.order-confirm-page').length>0){jQuery.ajax({url:'/?action=checkAfterPaymentComplete',type:"POST",success:function(data){}});jQuery.ajax({url:'/?action=checkGtmAfterPaymentComplete',type:"POST",success:function(data){}})}});
function sendAjaxAddACTag(a){jQuery.ajax({url:"/?action="+a,type:"POST",success:function(a){}})}
jQuery(document).ready(function(a){pathname=window.location.pathname,"/tracked-delivery/"===pathname&&jQuery(".button.set-tracked-delivery").click(function(){addToCartLink=a("#add_to_cart_tracked").text(),jQuery.ajax({type:"POST",dataType:"html",url:"/tracked-delivery/?cancelsubscription=yes",success:function(a){window.location=currentsite+addToCartLink.replace("tracked-delivery/","")},error:function(){}})}),a(".page-template-our-drink").length>0&&"undefined"!=typeof a.cookie("message_free_sample_ac")&&($message_free_sample=a.cookie("message_free_sample_ac"),a("body article").prepend('<div id="message_free_sample">'+$message_free_sample+"</div>"),setTimeout(function(){a("#message_free_sample").animate({color:"#f8f7f6"},500)},1e5),a.removeCookie("message_free_sample_ac",{path:"/"})),a(".page-template-free-sample").length>0&&(a("._form_element._field22 select").val("Website Landing Page"),a("body").on("click","._submit",function(){$email=a('input[name="email"]').val(),$i=0;var b=setInterval(function(){""!==a("._form-thank-you").text()&&(a("._form-thank-you").html(""),a.ajax({url:"/?action=getSuccessMessageFreeSampleForm&email="+$email,type:"POST",success:function(b){location.href="/our-drink/"}}),clearInterval(b)),$i++,$i>1e3&&clearInterval(b)},100)})),a(".page-template-login_page").length>0&&$isMobile&&a('.tvbutton button[name="login"]').tap(function(){a("html, body").animate({scrollTop:0},"slow")}),jQuery(".page-template-challenge_results").length>0&&jQuery("body").on("click",".sd-content li",function(){}),a("body.home.page").length>0&&setTimeout(function(){a(".branding-img-container img").css("width","60px")},3e3),a(".page-template-free-sample-survey").length>0&&(a(".entry-header").prepend('<h5 class="shop-step-title">STEP 2 OF 3</h5>'),jQuery(".page-template-free-sample-survey #free-survey-container iframe").on("load",function(){jQuery("html, body").animate({scrollTop:0},"slow")})),a(".page-template-free-sample").length>0&&(a(".entry-header").prepend('<h5 class="shop-step-title">STEP 3 OF 3</h5>'),a('input[name="loginemail"]').length>0&&a('input[name="email"]').val(a('input[name="loginemail"]').val()),a('input[name="firstname"]').length>0&&a('input[name="fullname"]').val(a('input[name="firstname"]').val())),a("#free-sample-page").length>0&&(a('button[type="submit"]').click(function(){a("#free-sample-page").find("#checkout_loader_img").removeClass("hide"),a(".entry-content").css("opacity","0.3")}),a("._field-wrapper").on("DOMNodeInserted","._error",function(){a('input[type="text"]').hasClass("_has_error")&&a("html, body").animate({scrollTop:a("input._has_error").eq(0).offset().top-25},"slow"),a("#free-sample-page").find("#checkout_loader_img").addClass("hide"),a(".entry-content").css("opacity","1")}))});