(function($){ $(document).ready(function(){ var main=$('main'); var side=$('#sidebar'); var wrapper=$('#widget-tracking'); if(main.length&&side.length&&wrapper.length){ var sideMargin={ top: side.css('margin-top') ? side.css('margin-top'):0, right: side.css('margin-right') ? side.css('margin-right'):0, bottom: side.css('margin-bottom') ? side.css('margin-bottom'):0, left: side.css('margin-left') ? side.css('margin-left'):0 }; var w=$(window); var wrapperHeight=wrapper.outerHeight(); var wrapperTop=wrapper.offset().top; var sideLeft=side.offset().left; var winLeft; var pos; var scrollAdjust=function(){ var sideHeight=side.outerHeight(); var mainHeight=main.outerHeight(); var mainAbs=main.offset().top + mainHeight; var winTop=w.scrollTop(); var winLeft=w.scrollLeft(); var winHeight=w.height(); var nf=(winTop > wrapperTop)&&(mainHeight > sideHeight) ? true:false; var pos = !nf ? 'static':(winTop + wrapperHeight) > mainAbs ? 'absolute':'fixed'; if(pos==='fixed'){ side.css({ position: pos, top: '', bottom: winHeight - wrapperHeight - 40, left: sideLeft - winLeft, margin: 0 }); }else if(pos==='absolute'){ side.css({ position: pos, top: mainAbs - sideHeight, bottom: '', left: sideLeft, margin: 0 }); }else{ side.css({ position: pos, marginTop: sideMargin.top, marginRight: sideMargin.right, marginBottom: sideMargin.bottom, marginLeft: sideMargin.left }); }}; var resizeAdjust=function(){ side.css({ position:'static', marginTop: sideMargin.top, marginRight: sideMargin.right, marginBottom: sideMargin.bottom, marginLeft: sideMargin.left }); sideLeft=side.offset().left; winLeft=w.scrollLeft(); if(pos==='fixed'){ side.css({ position: pos, left: sideLeft - winLeft, margin: 0 }); }else if(pos==='absolute'){ side.css({ position: pos, left: sideLeft, margin: 0 }); }}; w.on('load', scrollAdjust); w.on('scroll', scrollAdjust); w.on('resize', resizeAdjust); }}); })(jQuery); (function($){ $('a[data-click-tracking]').click(function(){ var trackingLabel=$(this).attr('data-click-tracking'); if(typeof gtag!=='undefined'){ gtag('event', 'click', { 'event_category': 'WP Associate POST', 'event_label': trackingLabel }); }else if(typeof ga!=='undefined'){ ga('send', 'event', 'WP Associate POST', 'click', trackingLabel); }else if(typeof _gaq!=='undefined'){ _gaq.push([ '_trackEvent', 'WP Associate POST', 'click', trackingLabel ]); }}); })(jQuery); var objectFitImages=function(){"use strict";function t(t,e){return"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='"+t+"' height='"+e+"'%3E%3C/svg%3E"}function e(t){if(t.srcset&&!m&&window.picturefill){var e=window.picturefill._;t[e.ns]&&t[e.ns].evaled||e.fillImg(t,{reselect:!0}),t[e.ns].curSrc||(t[e.ns].supported=!1,e.fillImg(t,{reselect:!0})),t.currentSrc=t[e.ns].curSrc||t.src}}function i(t){for(var e,i=getComputedStyle(t).fontFamily,r={};null!==(e=l.exec(i));)r[e[1]]=e[2];return r}function r(e,i,r){var n=t(i||1,r||0);p.call(e,"src")!==n&&b.call(e,"src",n)}function n(t,e){t.naturalWidth?e(t):setTimeout(n,100,t,e)}function c(t){var c=i(t),o=t[a];if(c["object-fit"]=c["object-fit"]||"fill",!o.img){if("fill"===c["object-fit"])return;if(!o.skipTest&&g&&!c["object-position"])return}if(!o.img){o.img=new Image(t.width,t.height),o.img.srcset=p.call(t,"data-ofi-srcset")||t.srcset,o.img.src=p.call(t,"data-ofi-src")||t.src,b.call(t,"data-ofi-src",t.src),t.srcset&&b.call(t,"data-ofi-srcset",t.srcset),r(t,t.naturalWidth||t.width,t.naturalHeight||t.height),t.srcset&&(t.srcset="");try{s(t)}catch(t){window.console&&console.warn("https://bit.ly/ofi-old-browser")}}e(o.img),t.style.backgroundImage='url("'+(o.img.currentSrc||o.img.src).replace(/"/g,'\\"')+'")',t.style.backgroundPosition=c["object-position"]||"center",t.style.backgroundRepeat="no-repeat",t.style.backgroundOrigin="content-box",/scale-down/.test(c["object-fit"])?n(o.img,function(){o.img.naturalWidth>t.width||o.img.naturalHeight>t.height?t.style.backgroundSize="contain":t.style.backgroundSize="auto"}):t.style.backgroundSize=c["object-fit"].replace("none","auto").replace("fill","100% 100%"),n(o.img,function(e){r(t,e.naturalWidth,e.naturalHeight)})}function s(t){var e={get:function(e){return t[a].img[e||"src"]},set:function(e,i){return t[a].img[i||"src"]=e,b.call(t,"data-ofi-"+i,e),c(t),e}};Object.defineProperty(t,"src",e),Object.defineProperty(t,"currentSrc",{get:function(){return e.get("currentSrc")}}),Object.defineProperty(t,"srcset",{get:function(){return e.get("srcset")},set:function(t){return e.set(t,"srcset")}})}function o(t,e){var i=!h&&!t;if(e=e||{},t=t||"img",f&&!e.skipTest||!d)return!1;"img"===t?t=document.getElementsByTagName("img"):"string"==typeof t?t=document.querySelectorAll(t):"length"in t||(t=[t]);for(var r=0;r 1){ history.pop(); }else{ return false; }}else{ back=false; } $.ajax({ type: 'POST', url: ajaxurl, data: items, success: function(response){ ; }}).done(function(result){ if(result.url!=''){ $('#question_wrap, #choices').animate({opacity: '0.0'}, 1000, 'swing', function(){ window.location.href=result.url; }); }else{ if(back){ $('#question_wrap').css({opacity: '0.0'}, 1000); $('.yesno_q').attr('id', 'q'+result.qid); if(result.title!=''){ $('.yesno_q dt span').text(result.title); }else{ $('.yesno_q dt span').text('Q'+result.qnum); } $('.yesno_q dd').html(result.question); $('#question_wrap').animate({ marginLeft: -1200}, 0); $('#question_wrap').animate({opacity: '1'}, 0); $('#question_wrap').animate({ marginLeft: 0}, 500, 'swing', function(){ if(result.choices.length > 0){ $('#choices').children().remove(); for (var i=0; i < result.choices.length; i++){ $('#choices').append('
  • '); }; display_back_button(); }else{ $('#choices').animate({opacity: '0.0'}, 1000, function(){ $('#choices').children().remove(); }); }}); }else{ $('#question_wrap').animate({ marginLeft: -1200}, 500, 'swing', function(){ $('.yesno_q').attr('id', 'q'+result.qid); history.push(parseInt(result.qid)); if(result.title!=''){ $('.yesno_q dt span').text(result.title); }else{ $('.yesno_q dt span').text('Q'+result.qnum); } $('.yesno_q dd').html(result.question); $('#question_wrap').css({opacity: '0.0'}); $('#question_wrap').animate({ marginLeft: 0}, 0); $('#question_wrap').animate({opacity: '1'}, 1000); if(result.choices.length > 0){ $('#choices').children().remove(); for (var i=0; i < result.choices.length; i++){ $('#choices').append('
  • '); }; display_back_button(); }else{ $('#choices').animate({opacity: '0.0'}, 1000, function(){ $('#choices').children().remove(); }); }}); }} }); }) function display_back_button(){ $('ul#choices').append('
  • '); $('ul#choices li#back').hide(); $('ul#choices li#back').append(''); if(history.length > 1){ $('#back_button').val(history[ history.length-2 ]); $('ul#choices li#back').show(); }} }); (function(c,d,f,h){({cache:{},init:function(){this.cacheElements();this.bindEvents()},cacheElements:function(){this.cache={$window:c(d),window:d,$document:c(f),document:f,wordpress:vaSocialBuzzSettings}},bindEvents:function(){var a=this;c.ajaxSetup({cache:!0,async:!0});a.cache.$document.on("ready",function(){a.gaEventTracking();a.createElements();a.getJavaScriptSDK()})},gaEventTracking:function(){var a=this,b=c(".va-social-buzz"),d=b.find(".vasb_share_button-fb").children("a"),g=b.find(".vasb_share_button-twttr").children("a"), b=b.find(".vasb_share_button-push7").children("a");"undefined"==typeof a.cache.window.GoogleAnalyticsObject||"ga"!=a.cache.window.GoogleAnalyticsObject&&"__gaTracker"!=a.cache.window.GoogleAnalyticsObject?(d.on("click",function(e){e.preventDefault();"undefined"!=typeof FB&&"undefined"!=typeof a.cache.wordpress.appid?FB.ui({method:"share",href:a.cache.window.location.href,redirect_uri:a.cache.window.location.href}):a._shareNewWindow(this)}),g.on("click",function(e){e.preventDefault();a._shareNewWindow(this)}), b.on("click",function(e){e.preventDefault();a._shareNewWindow(this)})):a._gaEventTracking(a)},createElements:function(){var a=this.cache.document.getElementById("fb-root");if(null==a){var b=this.cache.document.body;a=this.cache.document.createElement("div");a.setAttribute("id","fb-root");b.insertBefore(a,b.firstChild)}},getJavaScriptSDK:function(){var a=this,b;c.getScript("//connect.facebook.net/"+a._deletionOtherAlphanumeric(a.cache.wordpress.locale)+"/sdk.js",function(){b={version:"v2.8",status:!0, cookie:!0,xfbml:!0};"undefined"!=typeof a.cache.wordpress.appid&&(b.appId=a._deletionOtherNumeric(a.cache.wordpress.appid));d.fbAsyncInit=function(){FB.init(b)}});c.getScript("//platform.twitter.com/widgets.js",function(){twttr.widgets.load()})},_escapeHTML:function(a){return a.replace(/<("[^"]*"|'[^']*'|[^'">])*>/g,"").replace(/"/g,""").replace(/\'/g,"'").replace(//g,">")},_deletionOtherAlphanumeric:function(a){return a.replace(/[^\w\-]/g,"")},_deletionOtherNumeric:function(a){return a.replace(/[^0-9]/g, "")},_gaEventTracking:function(a){var b=c(".va-social-buzz"),f=b.find(".vasb_share_button-fb").children("a"),g=b.find(".vasb_share_button-twttr").children("a"),b=b.find(".vasb_share_button-push7").children("a");null!=a.cache.window.__gaTracker&&(d.ga=a.cache.window.__gaTracker);d.onload=function(){"undefined"!=typeof FB&&(FB.Event.subscribe("edge.create",function(a){ga("send","event","VA Social Buzz","Facebook Like",a);ga("send","social","Facebook","Like",a)}),FB.Event.subscribe("edge.remove",function(a){ga("send", "event","VA Social Buzz","Facebook Unlike",a);ga("send","social","Facebook","Unlike",a)}));"undefined"!=typeof twttr&&twttr.ready(function(b){b.events.bind("follow",function(){ga("send","event","VA Social Buzz","Twitter Follow",a.cache.window.location.href);ga("send","social","Twitter","Follow",a.cache.window.location.href)})})};f.on("click",function(b){b.preventDefault();"undefined"!=typeof FB&&"undefined"!=typeof a.cache.wordpress.appid?FB.ui({method:"share",href:a.cache.window.location.href,redirect_uri:a.cache.window.location.href}, function(b){b&&!b.error_message&&(ga("send","event","VA Social Buzz","Facebook Share",a.cache.window.location.href),ga("send","social","Facebook","Share",a.cache.window.location.href))}):(ga("send","event","VA Social Buzz","Facebook Share",a.cache.window.location.href),ga("send","social","Facebook","Share",a.cache.window.location.href),a._shareNewWindow(this))});g.on("click",function(b){b.preventDefault();ga("send","event","VA Social Buzz","Twitter Tweet",a.cache.window.location.href);ga("send","social", "Twitter","Tweet",a.cache.window.location.href);a._shareNewWindow(this)});b.on("click",function(b){b.preventDefault();ga("send","event","VA Social Buzz","Push7 Subscription",a.cache.window.location.href);ga("send","social","Push7","Subscription",a.cache.window.location.href);a._shareNewWindow(this)})},_shareNewWindow:function(a){a=this._escapeHTML(c(a).attr("href"));d.open(a,"","width=550,height=500")}}).init()})(window.jQuery,window,document,void 0); !function(a,b){"use strict";function c(){if(!e){e=!0;var a,c,d,f,g=-1!==navigator.appVersion.indexOf("MSIE 10"),h=!!navigator.userAgent.match(/Trident.*rv:11\./),i=b.querySelectorAll("iframe.wp-embedded-content");for(c=0;c1e3)g=1e3;else if(~~g<200)g=200;f.height=g}if("link"===d.message)if(h=b.createElement("a"),i=b.createElement("a"),h.href=f.getAttribute("src"),i.href=d.value,i.host===h.host)if(b.activeElement===f)a.top.location.href=d.value}else;}},d)a.addEventListener("message",a.wp.receiveEmbedMessage,!1),b.addEventListener("DOMContentLoaded",c,!1),a.addEventListener("load",c,!1)}(window,document); !function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e(jQuery)}(function(a){var e,t,n,i;function r(e,t){var n,i,r,o=e.nodeName.toLowerCase();return"area"===o?(i=(n=e.parentNode).name,!(!e.href||!i||"map"!==n.nodeName.toLowerCase())&&(!!(r=a("img[usemap='#"+i+"']")[0])&&s(r))):(/^(input|select|textarea|button|object)$/.test(o)?!e.disabled:"a"===o&&e.href||t)&&s(e)}function s(e){return a.expr.filters.visible(e)&&!a(e).parents().addBack().filter(function(){return"hidden"===a.css(this,"visibility")}).length}a.ui=a.ui||{},a.extend(a.ui,{version:"1.11.4",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),a.fn.extend({scrollParent:function(e){var t=this.css("position"),n="absolute"===t,i=e?/(auto|scroll|hidden)/:/(auto|scroll)/,r=this.parents().filter(function(){var e=a(this);return(!n||"static"!==e.css("position"))&&i.test(e.css("overflow")+e.css("overflow-y")+e.css("overflow-x"))}).eq(0);return"fixed"!==t&&r.length?r:a(this[0].ownerDocument||document)},uniqueId:(e=0,function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++e)})}),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&a(this).removeAttr("id")})}}),a.extend(a.expr[":"],{data:a.expr.createPseudo?a.expr.createPseudo(function(t){return function(e){return!!a.data(e,t)}}):function(e,t,n){return!!a.data(e,n[3])},focusable:function(e){return r(e,!isNaN(a.attr(e,"tabindex")))},tabbable:function(e){var t=a.attr(e,"tabindex"),n=isNaN(t);return(n||0<=t)&&r(e,!n)}}),a("").outerWidth(1).jquery||a.each(["Width","Height"],function(e,n){var r="Width"===n?["Left","Right"]:["Top","Bottom"],i=n.toLowerCase(),o={innerWidth:a.fn.innerWidth,innerHeight:a.fn.innerHeight,outerWidth:a.fn.outerWidth,outerHeight:a.fn.outerHeight};function s(e,t,n,i){return a.each(r,function(){t-=parseFloat(a.css(e,"padding"+this))||0,n&&(t-=parseFloat(a.css(e,"border"+this+"Width"))||0),i&&(t-=parseFloat(a.css(e,"margin"+this))||0)}),t}a.fn["inner"+n]=function(e){return void 0===e?o["inner"+n].call(this):this.each(function(){a(this).css(i,s(this,e)+"px")})},a.fn["outer"+n]=function(e,t){return"number"!=typeof e?o["outer"+n].call(this,e):this.each(function(){a(this).css(i,s(this,e,!0,t)+"px")})}}),a.fn.addBack||(a.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),a("").data("a-b","a").removeData("a-b").data("a-b")&&(a.fn.removeData=(t=a.fn.removeData,function(e){return arguments.length?t.call(this,a.camelCase(e)):t.call(this)})),a.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),a.fn.extend({focus:(i=a.fn.focus,function(t,n){return"number"==typeof t?this.each(function(){var e=this;setTimeout(function(){a(e).focus(),n&&n.call(e)},t)}):i.apply(this,arguments)}),disableSelection:(n="onselectstart"in document.createElement("div")?"selectstart":"mousedown",function(){return this.bind(n+".ui-disableSelection",function(e){e.preventDefault()})}),enableSelection:function(){return this.unbind(".ui-disableSelection")},zIndex:function(e){if(void 0!==e)return this.css("zIndex",e);if(this.length)for(var t,n,i=a(this[0]);i.length&&i[0]!==document;){if(("absolute"===(t=i.css("position"))||"relative"===t||"fixed"===t)&&(n=parseInt(i.css("zIndex"),10),!isNaN(n)&&0!==n))return n;i=i.parent()}return 0}}),a.ui.plugin={add:function(e,t,n){var i,r=a.ui[e].prototype;for(i in n)r.plugins[i]=r.plugins[i]||[],r.plugins[i].push([t,n[i]])},call:function(e,t,n,i){var r,o=e.plugins[t];if(o&&(i||e.element[0].parentNode&&11!==e.element[0].parentNode.nodeType))for(r=0;r",options:{disabled:!1,create:null},_createWidget:function(t,e){e=h(e||this.defaultElement||this)[0],this.element=h(e),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=h(),this.hoverable=h(),this.focusable=h(),e!==this&&(h.data(e,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===e&&this.destroy()}}),this.document=h(e.style?e.ownerDocument:e.document||e),this.window=h(this.document[0].defaultView||this.document[0].parentWindow)),this.options=h.widget.extend({},this.options,this._getCreateOptions(),t),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:h.noop,_getCreateEventData:h.noop,_create:h.noop,_init:h.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetFullName).removeData(h.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:h.noop,widget:function(){return this.element},option:function(t,e){var i,n,s,o=t;if(0===arguments.length)return h.widget.extend({},this.options);if("string"==typeof t)if(o={},t=(i=t.split(".")).shift(),i.length){for(n=o[t]=h.widget.extend({},this.options[t]),s=0;s",options:{disabled:null,text:!0,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset"+this.eventNamespace).bind("reset"+this.eventNamespace,n),"boolean"!=typeof this.options.disabled?this.options.disabled=!!this.element.prop("disabled"):this.element.prop("disabled",this.options.disabled),this._determineButtonType(),this.hasTitle=!!this.buttonElement.attr("title");var e=this,i=this.options,t="checkbox"===this.type||"radio"===this.type,s=t?"":"ui-state-active";null===i.label&&(i.label="input"===this.type?this.buttonElement.val():this.buttonElement.html()),this._hoverable(this.buttonElement),this.buttonElement.addClass(r).attr("role","button").bind("mouseenter"+this.eventNamespace,function(){i.disabled||this===u&&o(this).addClass("ui-state-active")}).bind("mouseleave"+this.eventNamespace,function(){i.disabled||o(this).removeClass(s)}).bind("click"+this.eventNamespace,function(t){i.disabled&&(t.preventDefault(),t.stopImmediatePropagation())}),this._on({focus:function(){this.buttonElement.addClass("ui-state-focus")},blur:function(){this.buttonElement.removeClass("ui-state-focus")}}),t&&this.element.bind("change"+this.eventNamespace,function(){e.refresh()}),"checkbox"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){if(i.disabled)return!1}):"radio"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){if(i.disabled)return!1;o(this).addClass("ui-state-active"),e.buttonElement.attr("aria-pressed","true");var t=e.element[0];a(t).not(t).map(function(){return o(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed","false")}):(this.buttonElement.bind("mousedown"+this.eventNamespace,function(){if(i.disabled)return!1;o(this).addClass("ui-state-active"),u=this,e.document.one("mouseup",function(){u=null})}).bind("mouseup"+this.eventNamespace,function(){if(i.disabled)return!1;o(this).removeClass("ui-state-active")}).bind("keydown"+this.eventNamespace,function(t){if(i.disabled)return!1;t.keyCode!==o.ui.keyCode.SPACE&&t.keyCode!==o.ui.keyCode.ENTER||o(this).addClass("ui-state-active")}).bind("keyup"+this.eventNamespace+" blur"+this.eventNamespace,function(){o(this).removeClass("ui-state-active")}),this.buttonElement.is("a")&&this.buttonElement.keyup(function(t){t.keyCode===o.ui.keyCode.SPACE&&o(this).click()})),this._setOption("disabled",i.disabled),this._resetButton()},_determineButtonType:function(){var t,e,i;this.element.is("[type=checkbox]")?this.type="checkbox":this.element.is("[type=radio]")?this.type="radio":this.element.is("input")?this.type="input":this.type="button","checkbox"===this.type||"radio"===this.type?(t=this.element.parents().last(),e="label[for='"+this.element.attr("id")+"']",this.buttonElement=t.find(e),this.buttonElement.length||(t=t.length?t.siblings():this.element.siblings(),this.buttonElement=t.filter(e),this.buttonElement.length||(this.buttonElement=t.find(e))),this.element.addClass("ui-helper-hidden-accessible"),(i=this.element.is(":checked"))&&this.buttonElement.addClass("ui-state-active"),this.buttonElement.prop("aria-pressed",i)):this.buttonElement=this.element},widget:function(){return this.buttonElement},_destroy:function(){this.element.removeClass("ui-helper-hidden-accessible"),this.buttonElement.removeClass(r+" ui-state-active "+l).removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html()),this.hasTitle||this.buttonElement.removeAttr("title")},_setOption:function(t,e){if(this._super(t,e),"disabled"===t)return this.widget().toggleClass("ui-state-disabled",!!e),this.element.prop("disabled",!!e),void(e&&("checkbox"===this.type||"radio"===this.type?this.buttonElement.removeClass("ui-state-focus"):this.buttonElement.removeClass("ui-state-focus ui-state-active")));this._resetButton()},refresh:function(){var t=this.element.is("input, button")?this.element.is(":disabled"):this.element.hasClass("ui-button-disabled");t!==this.options.disabled&&this._setOption("disabled",t),"radio"===this.type?a(this.element[0]).each(function(){o(this).is(":checked")?o(this).button("widget").addClass("ui-state-active").attr("aria-pressed","true"):o(this).button("widget").removeClass("ui-state-active").attr("aria-pressed","false")}):"checkbox"===this.type&&(this.element.is(":checked")?this.buttonElement.addClass("ui-state-active").attr("aria-pressed","true"):this.buttonElement.removeClass("ui-state-active").attr("aria-pressed","false"))},_resetButton:function(){if("input"!==this.type){var t=this.buttonElement.removeClass(l),e=o("",this.document[0]).addClass("ui-button-text").html(this.options.label).appendTo(t.empty()).text(),i=this.options.icons,s=i.primary&&i.secondary,n=[];i.primary||i.secondary?(this.options.text&&n.push("ui-button-text-icon"+(s?"s":i.primary?"-primary":"-secondary")),i.primary&&t.prepend(""),i.secondary&&t.append(""),this.options.text||(n.push(s?"ui-button-icons-only":"ui-button-icon-only"),this.hasTitle||t.attr("title",o.trim(e)))):n.push("ui-button-text-only"),t.addClass(n.join(" "))}else this.options.label&&this.element.val(this.options.label)}}),o.widget("ui.buttonset",{version:"1.11.4",options:{items:"button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(ui-button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(t,e){"disabled"===t&&this.buttons.button("option",t,e),this._super(t,e)},refresh:function(){var t="rtl"===this.element.css("direction"),e=this.element.find(this.options.items),i=e.filter(":ui-button");e.not(":ui-button").button(),i.button("refresh"),this.buttons=e.map(function(){return o(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(t?"ui-corner-right":"ui-corner-left").end().filter(":last").addClass(t?"ui-corner-left":"ui-corner-right").end().end()},_destroy:function(){this.element.removeClass("ui-buttonset"),this.buttons.map(function(){return o(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy")}}),o.ui.button}); !function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)}(function(I){return function(){I.ui=I.ui||{};var n,H,x=Math.max,T=Math.abs,L=Math.round,o=/left|center|right/,l=/top|center|bottom/,f=/[\+\-]\d+(\.[\d]+)?%?/,s=/^\w+/,h=/%$/,i=I.fn.position;function P(t,i,e){return[parseFloat(t[0])*(h.test(t[0])?i/100:1),parseFloat(t[1])*(h.test(t[1])?e/100:1)]}function D(t,i){return parseInt(I.css(t,i),10)||0}I.position={scrollbarWidth:function(){if(void 0!==n)return n;var t,i,e=I("
    "),o=e.children()[0];return I("body").append(e),t=o.offsetWidth,e.css("overflow","scroll"),t===(i=o.offsetWidth)&&(i=e[0].clientWidth),e.remove(),n=t-i},getScrollInfo:function(t){var i=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),e=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),o="scroll"===i||"auto"===i&&t.widthx(T(o),T(n))?l.important="horizontal":l.important="vertical",c.using.call(this,t,l)}),f.offset(I.extend(r,{using:t}))})},I.ui.position={fit:{left:function(t,i){var e,o=i.within,n=o.isWindow?o.scrollLeft:o.offset.left,l=o.width,f=t.left-i.collisionPosition.marginLeft,s=n-f,h=f+i.collisionWidth-l-n;i.collisionWidth>l?0l?0").text(t).html()},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,tooltipClass:null,track:!1,close:null,open:null},_addDescribedBy:function(t,i){var e=(t.attr("aria-describedby")||"").split(/\s+/);e.push(i),t.data("ui-tooltip-id",i).attr("aria-describedby",d.trim(e.join(" ")))},_removeDescribedBy:function(t){var i=t.data("ui-tooltip-id"),e=(t.attr("aria-describedby")||"").split(/\s+/),o=d.inArray(i,e);-1!==o&&e.splice(o,1),t.removeData("ui-tooltip-id"),(e=d.trim(e.join(" ")))?t.attr("aria-describedby",e):t.removeAttr("aria-describedby")},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.options.disabled&&this._disable(),this.liveRegion=d("
    ").attr({role:"log","aria-live":"assertive","aria-relevant":"additions"}).addClass("ui-helper-hidden-accessible").appendTo(this.document[0].body)},_setOption:function(t,i){var e=this;if("disabled"===t)return this[i?"_disable":"_enable"](),void(this.options[t]=i);this._super(t,i),"content"===t&&d.each(this.tooltips,function(t,i){e._updateContent(i.element)})},_disable:function(){var o=this;d.each(this.tooltips,function(t,i){var e=d.Event("blur");e.target=e.currentTarget=i.element[0],o.close(e,!0)}),this.element.find(this.options.items).addBack().each(function(){var t=d(this);t.is("[title]")&&t.data("ui-tooltip-title",t.attr("title")).removeAttr("title")})},_enable:function(){this.element.find(this.options.items).addBack().each(function(){var t=d(this);t.data("ui-tooltip-title")&&t.attr("title",t.data("ui-tooltip-title"))})},open:function(t){var e=this,i=d(t?t.target:this.element).closest(this.options.items);i.length&&!i.data("ui-tooltip-id")&&(i.attr("title")&&i.data("ui-tooltip-title",i.attr("title")),i.data("ui-tooltip-open",!0),t&&"mouseover"===t.type&&i.parents().each(function(){var t,i=d(this);i.data("ui-tooltip-open")&&((t=d.Event("blur")).target=t.currentTarget=this,e.close(t,!0)),i.attr("title")&&(i.uniqueId(),e.parents[this.id]={element:this,title:i.attr("title")},i.attr("title",""))}),this._registerCloseHandlers(t,i),this._updateContent(i,t))},_updateContent:function(i,e){var t,o=this.options.content,n=this,s=e?e.type:null;if("string"==typeof o)return this._open(e,i,o);(t=o.call(i[0],function(t){n._delay(function(){i.data("ui-tooltip-open")&&(e&&(e.type=s),this._open(e,i,t))})}))&&this._open(e,i,t)},_open:function(t,i,e){var o,n,s,l,a=d.extend({},this.options.position);function r(t){a.of=t,n.is(":hidden")||n.position(a)}e&&((o=this._find(i))?o.tooltip.find(".ui-tooltip-content").html(e):(i.is("[title]")&&(t&&"mouseover"===t.type?i.attr("title",""):i.removeAttr("title")),o=this._tooltip(i),n=o.tooltip,this._addDescribedBy(i,n.attr("id")),n.find(".ui-tooltip-content").html(e),this.liveRegion.children().hide(),e.clone?(l=e.clone()).removeAttr("id").find("[id]").removeAttr("id"):l=e,d("
    ").html(l).appendTo(this.liveRegion),this.options.track&&t&&/^mouse/.test(t.type)?(this._on(this.document,{mousemove:r}),r(t)):n.position(d.extend({of:i},this.options.position)),n.hide(),this._show(n,this.options.show),this.options.show&&this.options.show.delay&&(s=this.delayedShow=setInterval(function(){n.is(":visible")&&(r(a.of),clearInterval(s))},d.fx.interval)),this._trigger("open",t,{tooltip:n})))},_registerCloseHandlers:function(t,e){var i={keyup:function(t){if(t.keyCode===d.ui.keyCode.ESCAPE){var i=d.Event(t);i.currentTarget=e[0],this.close(i,!0)}}};e[0]!==this.element[0]&&(i.remove=function(){this._removeTooltip(this._find(e).tooltip)}),t&&"mouseover"!==t.type||(i.mouseleave="close"),t&&"focusin"!==t.type||(i.focusout="close"),this._on(!0,e,i)},close:function(t){var i,e=this,o=d(t?t.currentTarget:this.element),n=this._find(o);n?(i=n.tooltip,n.closing||(clearInterval(this.delayedShow),o.data("ui-tooltip-title")&&!o.attr("title")&&o.attr("title",o.data("ui-tooltip-title")),this._removeDescribedBy(o),n.hiding=!0,i.stop(!0),this._hide(i,this.options.hide,function(){e._removeTooltip(d(this))}),o.removeData("ui-tooltip-open"),this._off(o,"mouseleave focusout keyup"),o[0]!==this.element[0]&&this._off(o,"remove"),this._off(this.document,"mousemove"),t&&"mouseleave"===t.type&&d.each(this.parents,function(t,i){d(i.element).attr("title",i.title),delete e.parents[t]}),n.closing=!0,this._trigger("close",t,{tooltip:i}),n.hiding||(n.closing=!1))):o.removeData("ui-tooltip-open")},_tooltip:function(t){var i=d("
    ").attr("role","tooltip").addClass("ui-tooltip ui-widget ui-corner-all ui-widget-content "+(this.options.tooltipClass||"")),e=i.uniqueId().attr("id");return d("
    ").addClass("ui-tooltip-content").appendTo(i),i.appendTo(this.document[0].body),this.tooltips[e]={element:t,tooltip:i}},_find:function(t){var i=t.data("ui-tooltip-id");return i?this.tooltips[i]:null},_removeTooltip:function(t){t.remove(),delete this.tooltips[t.attr("id")]},_destroy:function(){var n=this;d.each(this.tooltips,function(t,i){var e=d.Event("blur"),o=i.element;e.target=e.currentTarget=o[0],n.close(e,!0),d("#"+t).remove(),o.data("ui-tooltip-title")&&(o.attr("title")||o.attr("title",o.data("ui-tooltip-title")),o.removeData("ui-tooltip-title"))}),this.liveRegion.remove()}})}); !function(e){"function"==typeof define&&define.amd?define(["jquery","./core"],e):e(jQuery)}(function(b){var r;function e(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},b.extend(this._defaults,this.regional[""]),this.regional.en=b.extend(!0,{},this.regional[""]),this.regional["en-US"]=b.extend(!0,{},this.regional.en),this.dpDiv=a(b("
    "))}function a(e){var t="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return e.delegate(t,"mouseout",function(){b(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&b(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&b(this).removeClass("ui-datepicker-next-hover")}).delegate(t,"mouseover",n)}function n(){b.datepicker._isDisabledDatepicker(r.inline?r.dpDiv.parent()[0]:r.input[0])||(b(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),b(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&b(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&b(this).addClass("ui-datepicker-next-hover"))}function h(e,t){for(var a in b.extend(e,t),t)null==t[a]&&(e[a]=t[a]);return e}return b.extend(b.ui,{datepicker:{version:"1.11.4"}}),b.extend(e.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(e){return h(this._defaults,e||{}),this},_attachDatepicker:function(e,t){var a,i,s;i="div"===(a=e.nodeName.toLowerCase())||"span"===a,e.id||(this.uuid+=1,e.id="dp"+this.uuid),(s=this._newInst(b(e),i)).settings=b.extend({},t||{}),"input"===a?this._connectDatepicker(e,s):i&&this._inlineDatepicker(e,s)},_newInst:function(e,t){return{id:e[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1"),input:e,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:t,dpDiv:t?a(b("
    ")):this.dpDiv}},_connectDatepicker:function(e,t){var a=b(e);t.append=b([]),t.trigger=b([]),a.hasClass(this.markerClassName)||(this._attachments(a,t),a.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp),this._autoSize(t),b.data(e,"datepicker",t),t.settings.disabled&&this._disableDatepicker(e))},_attachments:function(e,t){var a,i,s,r=this._get(t,"appendText"),n=this._get(t,"isRTL");t.append&&t.append.remove(),r&&(t.append=b(""+r+""),e[n?"before":"after"](t.append)),e.unbind("focus",this._showDatepicker),t.trigger&&t.trigger.remove(),"focus"!==(a=this._get(t,"showOn"))&&"both"!==a||e.focus(this._showDatepicker),"button"!==a&&"both"!==a||(i=this._get(t,"buttonText"),s=this._get(t,"buttonImage"),t.trigger=b(this._get(t,"buttonImageOnly")?b("").addClass(this._triggerClass).attr({src:s,alt:i,title:i}):b("").addClass(this._triggerClass).html(s?b("").attr({src:s,alt:i,title:i}):i)),e[n?"before":"after"](t.trigger),t.trigger.click(function(){return b.datepicker._datepickerShowing&&b.datepicker._lastInput===e[0]?b.datepicker._hideDatepicker():(b.datepicker._datepickerShowing&&b.datepicker._lastInput!==e[0]&&b.datepicker._hideDatepicker(),b.datepicker._showDatepicker(e[0])),!1}))},_autoSize:function(e){if(this._get(e,"autoSize")&&!e.inline){var t,a,i,s,r=new Date(2009,11,20),n=this._get(e,"dateFormat");n.match(/[DM]/)&&(t=function(e){for(s=i=a=0;sa&&(a=e[s].length,i=s);return i},r.setMonth(t(this._get(e,n.match(/MM/)?"monthNames":"monthNamesShort"))),r.setDate(t(this._get(e,n.match(/DD/)?"dayNames":"dayNamesShort"))+20-r.getDay())),e.input.attr("size",this._formatDate(e,r).length)}},_inlineDatepicker:function(e,t){var a=b(e);a.hasClass(this.markerClassName)||(a.addClass(this.markerClassName).append(t.dpDiv),b.data(e,"datepicker",t),this._setDate(t,this._getDefaultDate(t),!0),this._updateDatepicker(t),this._updateAlternate(t),t.settings.disabled&&this._disableDatepicker(e),t.dpDiv.css("display","block"))},_dialogDatepicker:function(e,t,a,i,s){var r,n,d,c,o,l=this._dialogInst;return l||(this.uuid+=1,r="dp"+this.uuid,this._dialogInput=b(""),this._dialogInput.keydown(this._doKeyDown),b("body").append(this._dialogInput),(l=this._dialogInst=this._newInst(this._dialogInput,!1)).settings={},b.data(this._dialogInput[0],"datepicker",l)),h(l.settings,i||{}),t=t&&t.constructor===Date?this._formatDate(l,t):t,this._dialogInput.val(t),this._pos=s?s.length?s:[s.pageX,s.pageY]:null,this._pos||(n=document.documentElement.clientWidth,d=document.documentElement.clientHeight,c=document.documentElement.scrollLeft||document.body.scrollLeft,o=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[n/2-100+c,d/2-150+o]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),l.settings.onSelect=a,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),b.blockUI&&b.blockUI(this.dpDiv),b.data(this._dialogInput[0],"datepicker",l),this},_destroyDatepicker:function(e){var t,a=b(e),i=b.data(e,"datepicker");a.hasClass(this.markerClassName)&&(t=e.nodeName.toLowerCase(),b.removeData(e,"datepicker"),"input"===t?(i.append.remove(),i.trigger.remove(),a.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):"div"!==t&&"span"!==t||a.removeClass(this.markerClassName).empty(),r===i&&(r=null))},_enableDatepicker:function(t){var e,a,i=b(t),s=b.data(t,"datepicker");i.hasClass(this.markerClassName)&&("input"===(e=t.nodeName.toLowerCase())?(t.disabled=!1,s.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):"div"!==e&&"span"!==e||((a=i.children("."+this._inlineClass)).children().removeClass("ui-state-disabled"),a.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=b.map(this._disabledInputs,function(e){return e===t?null:e}))},_disableDatepicker:function(t){var e,a,i=b(t),s=b.data(t,"datepicker");i.hasClass(this.markerClassName)&&("input"===(e=t.nodeName.toLowerCase())?(t.disabled=!0,s.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):"div"!==e&&"span"!==e||((a=i.children("."+this._inlineClass)).children().addClass("ui-state-disabled"),a.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=b.map(this._disabledInputs,function(e){return e===t?null:e}),this._disabledInputs[this._disabledInputs.length]=t)},_isDisabledDatepicker:function(e){if(!e)return!1;for(var t=0;td&&ic&&st;)--G<0&&(G=11,ee--);for(e.drawMonth=G,e.drawYear=ee,a=this._get(e,"prevText"),a=B?this.formatDate(a,this._daylightSavingAdjust(new Date(ee,G-q,1)),this._getFormatConfig(e)):a,i=this._canAdjustMonth(e,-1,ee,G)?"
    "+a+"":z?"":""+a+"",s=this._get(e,"nextText"),s=B?this.formatDate(s,this._daylightSavingAdjust(new Date(ee,G+q,1)),this._getFormatConfig(e)):s,r=this._canAdjustMonth(e,1,ee,G)?""+s+"":z?"":""+s+"",n=this._get(e,"currentText"),d=this._get(e,"gotoCurrent")&&e.currentDay?X:H,n=B?this.formatDate(n,d,this._getFormatConfig(e)):n,c=e.inline?"":"",o=U?"
    "+(P?c:"")+(this._isInRange(e,d)?"":"")+(P?"":c)+"
    ":"",l=parseInt(this._get(e,"firstDay"),10),l=isNaN(l)?0:l,h=this._get(e,"showWeek"),u=this._get(e,"dayNames"),p=this._get(e,"dayNamesMin"),g=this._get(e,"monthNames"),_=this._get(e,"monthNamesShort"),f=this._get(e,"beforeShowDay"),k=this._get(e,"showOtherMonths"),D=this._get(e,"selectOtherMonths"),m=this._getDefaultDate(e),y="",M=0;M"+(/all|left/.test(I)&&0===M?P?r:i:"")+(/all|right/.test(I)&&0===M?P?i:r:"")+this._generateMonthYearHeader(e,G,ee,Z,$,0",Y=h?"":"",v=0;v<7;v++)Y+="";for(x+=Y+"",N=this._getDaysInMonth(ee,G),ee===e.selectedYear&&G===e.selectedMonth&&(e.selectedDay=Math.min(e.selectedDay,N)),F=(this._getFirstDayOfMonth(ee,G)-l+7)%7,T=Math.ceil((F+N)/7),A=Q&&this.maxRows>T?this.maxRows:T,this.maxRows=A,K=this._daylightSavingAdjust(new Date(ee,G,1-F)),j=0;j",O=h?"":"",v=0;v<7;v++)R=f?f.apply(e.input?e.input[0]:null,[K]):[!0,""],W=(L=K.getMonth()!==G)&&!D||!R[0]||Z&&K"+(L&&!k?" ":W?""+K.getDate()+"":""+K.getDate()+"")+"",K.setDate(K.getDate()+1),K=this._daylightSavingAdjust(K);x+=O+""}11<++G&&(G=0,ee++),b+=x+="
    "+this._get(e,"weekHeader")+""+p[S]+"
    "+this._get(e,"calculateWeek")(K)+"
    "+(Q?"
    "+(0
    ":""):"")}y+=b}return y+=o,e._keyEvent=!1,y},_generateMonthYearHeader:function(e,t,a,i,s,r,n,d){var c,o,l,h,u,p,g,_,f=this._get(e,"changeMonth"),k=this._get(e,"changeYear"),D=this._get(e,"showMonthAfterYear"),m="
    ",y="";if(r||!f)y+=""+n[t]+"";else{for(c=i&&i.getFullYear()===a,o=s&&s.getFullYear()===a,y+=""}if(D||(m+=y+(!r&&f&&k?"":" ")),!e.yearshtml)if(e.yearshtml="",r||!k)m+=""+a+"";else{for(h=this._get(e,"yearRange").split(":"),u=(new Date).getFullYear(),g=(p=function(e){var t=e.match(/c[+\-].*/)?a+parseInt(e.substring(1),10):e.match(/[+\-].*/)?u+parseInt(e,10):parseInt(e,10);return isNaN(t)?u:t})(h[0]),_=Math.max(g,p(h[1]||"")),g=i?Math.max(g,i.getFullYear()):g,_=s?Math.min(_,s.getFullYear()):_,e.yearshtml+="",m+=e.yearshtml,e.yearshtml=null}return m+=this._get(e,"yearSuffix"),D&&(m+=(!r&&f&&k?"":" ")+y),m+="
    "},_adjustInstDate:function(e,t,a){var i=e.drawYear+("Y"===a?t:0),s=e.drawMonth+("M"===a?t:0),r=Math.min(e.selectedDay,this._getDaysInMonth(i,s))+("D"===a?t:0),n=this._restrictMinMax(e,this._daylightSavingAdjust(new Date(i,s,r)));e.selectedDay=n.getDate(),e.drawMonth=e.selectedMonth=n.getMonth(),e.drawYear=e.selectedYear=n.getFullYear(),"M"!==a&&"Y"!==a||this._notifyChange(e)},_restrictMinMax:function(e,t){var a=this._getMinMaxDate(e,"min"),i=this._getMinMaxDate(e,"max"),s=a&&t=s.getTime())&&(!r||t.getTime()<=r.getTime())&&(!n||t.getFullYear()>=n)&&(!d||t.getFullYear()<=d)},_getFormatConfig:function(e){var t=this._get(e,"shortYearCutoff");return{shortYearCutoff:t="string"!=typeof t?t:(new Date).getFullYear()%100+parseInt(t,10),dayNamesShort:this._get(e,"dayNamesShort"),dayNames:this._get(e,"dayNames"),monthNamesShort:this._get(e,"monthNamesShort"),monthNames:this._get(e,"monthNames")}},_formatDate:function(e,t,a,i){t||(e.currentDay=e.selectedDay,e.currentMonth=e.selectedMonth,e.currentYear=e.selectedYear);var s=t?"object"==typeof t?t:this._daylightSavingAdjust(new Date(i,a,t)):this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay));return this.formatDate(this._get(e,"dateFormat"),s,this._getFormatConfig(e))}}),b.fn.datepicker=function(e){if(!this.length)return this;b.datepicker.initialized||(b(document).mousedown(b.datepicker._checkExternalClick),b.datepicker.initialized=!0),0===b("#"+b.datepicker._mainDivId).length&&b("body").append(b.datepicker.dpDiv);var t=Array.prototype.slice.call(arguments,1);return"string"!=typeof e||"isDisabled"!==e&&"getDate"!==e&&"widget"!==e?"option"===e&&2===arguments.length&&"string"==typeof arguments[1]?b.datepicker["_"+e+"Datepicker"].apply(b.datepicker,[this[0]].concat(t)):this.each(function(){"string"==typeof e?b.datepicker["_"+e+"Datepicker"].apply(b.datepicker,[this].concat(t)):b.datepicker._attachDatepicker(this,e)}):b.datepicker["_"+e+"Datepicker"].apply(b.datepicker,[this[0]].concat(t))},b.datepicker=new e,b.datepicker.initialized=!1,b.datepicker.uuid=(new Date).getTime(),b.datepicker.version="1.11.4",b.datepicker}); !function(e){"function"==typeof define&&define.amd?define(["jquery","./widget"],e):e(jQuery)}(function(o){var u=!1;return o(document).mouseup(function(){u=!1}),o.widget("ui.mouse",{version:"1.11.4",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var t=this;this.element.bind("mousedown."+this.widgetName,function(e){return t._mouseDown(e)}).bind("click."+this.widgetName,function(e){if(!0===o.data(e.target,t.widgetName+".preventClickEvent"))return o.removeData(e.target,t.widgetName+".preventClickEvent"),e.stopImmediatePropagation(),!1}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&this.document.unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(e){if(!u){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(e),this._mouseDownEvent=e;var t=this,s=1===e.which,i=!("string"!=typeof this.options.cancel||!e.target.nodeName)&&o(e.target).closest(this.options.cancel).length;return!(s&&!i&&this._mouseCapture(e))||(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){t.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=!1!==this._mouseStart(e),!this._mouseStarted)?(e.preventDefault(),!0):(!0===o.data(e.target,this.widgetName+".preventClickEvent")&&o.removeData(e.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(e){return t._mouseMove(e)},this._mouseUpDelegate=function(e){return t._mouseUp(e)},this.document.bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),e.preventDefault(),u=!0))}},_mouseMove:function(e){if(this._mouseMoved){if(o.ui.ie&&(!document.documentMode||document.documentMode<9)&&!e.button)return this._mouseUp(e);if(!e.which)return this._mouseUp(e)}return(e.which||e.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=!1!==this._mouseStart(this._mouseDownEvent,e),this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(e){return this.document.unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,e.target===this._mouseDownEvent.target&&o.data(e.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(e)),u=!1},_mouseDistanceMet:function(e){return Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})}); !function(e){"function"==typeof define&&define.amd?define(["jquery","./core","./mouse","./widget"],e):e(jQuery)}(function(r){return r.widget("ui.slider",r.ui.mouse,{version:"1.11.4",widgetEventPrefix:"slide",options:{animate:!1,distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},numPages:5,_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this._calculateNewMax(),this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget ui-widget-content ui-corner-all"),this._refresh(),this._setOption("disabled",this.options.disabled),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var e,t,i=this.options,s=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),a=[];for(t=i.values&&i.values.length||1,s.length>t&&(s.slice(t).remove(),s=s.slice(0,t)),e=s.length;e");this.handles=s.add(r(a.join("")).appendTo(this.element)),this.handle=this.handles.eq(0),this.handles.each(function(e){r(this).data("ui-slider-handle-index",e)})},_createRange:function(){var e=this.options,t="";e.range?(!0===e.range&&(e.values?e.values.length&&2!==e.values.length?e.values=[e.values[0],e.values[0]]:r.isArray(e.values)&&(e.values=e.values.slice(0)):e.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?this.range.removeClass("ui-slider-range-min ui-slider-range-max").css({left:"",bottom:""}):(this.range=r("
    ").appendTo(this.element),t="ui-slider-range ui-widget-header ui-corner-all"),this.range.addClass(t+("min"===e.range||"max"===e.range?" ui-slider-range-"+e.range:""))):(this.range&&this.range.remove(),this.range=null)},_setupEvents:function(){this._off(this.handles),this._on(this.handles,this._handleEvents),this._hoverable(this.handles),this._focusable(this.handles)},_destroy:function(){this.handles.remove(),this.range&&this.range.remove(),this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-widget ui-widget-content ui-corner-all"),this._mouseDestroy()},_mouseCapture:function(e){var t,i,s,a,n,h,l,o=this,u=this.options;return!u.disabled&&(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),t={x:e.pageX,y:e.pageY},i=this._normValueFromMouse(t),s=this._valueMax()-this._valueMin()+1,this.handles.each(function(e){var t=Math.abs(i-o.values(e));(t=this._valueMax())return this._valueMax();var t=0=t&&(s+=0 https://happy-homeworking.com/wp-content/plugins/calculated-fields-form/js/jQuery.stringify.js?ver=pro fbuilderjQuery = (typeof fbuilderjQuery != 'undefined' ) ? fbuilderjQuery : jQuery; fbuilderjQuery(function(){ (function($) { $.extend({ stringifyXX : function stringifyXX(obj) { var enc = function(param) { var escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, meta = { '\b' : '\\b', '\t' : '\\t', '\n' : '\\n', '\f' : '\\f', '\r' : '\\r', '"' : '\\"', '\\' : '\\\\' }; escapable.lastIndex = 0; return escapable.test(param) ? param.replace(escapable, function (a) { var c = meta[a]; return typeof c === 'string' ? c : '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4); }) : param; }; var t = typeof (obj); if (t != "object" || obj === null) { // simple data type if (t == "string") obj = '"' + obj + '"'; return String(obj); } else { // recurse array or object var n, v, json = [], arr = (obj && obj.constructor == Array); for (n in obj) { v = obj[n]; t = typeof(v); if (t!="function" && t!="undefined") { if (t == "string") v = '"' + enc(v) + '"'; else if (t == "object" && v !== null) v = $.stringifyXX(v); json.push((arr ? "" : '"' + n + '":') + String(v)); } } return (arr ? "[" : "{") + String(json) + (arr ? "]" : "}"); } } }); })(fbuilderjQuery); }); // source --> https://happy-homeworking.com/wp-content/plugins/calculated-fields-form/js/jquery.validate.js?ver=5.0.4 /*! * jQuery Validation Plugin v1.17.0 * * https://jqueryvalidation.org/ * * Copyright (c) 2017 Jörn Zaefferer * Released under the MIT license */ fbuilderjQuery=(typeof fbuilderjQuery!='undefined')?fbuilderjQuery:jQuery;(function(factory){if(typeof define==="function"&&define.amd){define(["fbuilderjQuery"],factory);}else if(typeof module==="object"&&module.exports){module.exports=factory(require("fbuilderjQuery"));}else{factory(fbuilderjQuery);}}(function($){$.extend($.fn,{validate:function(options){if(!this.length){if(options&&options.debug&&window.console){console.warn("Nothing selected, can't validate, returning nothing.");} return;} var validator=$.data(this[0],"validator");if(validator){return validator;} this.attr("novalidate","novalidate");validator=new $.validator(options,this[0]);$.data(this[0],"validator",validator);if(validator.settings.onsubmit){this.on("click.validate",":submit",function(event){validator.submitButton=event.currentTarget;if($(this).hasClass("cancel")){validator.cancelSubmit=true;} if($(this).attr("formnovalidate")!==undefined){validator.cancelSubmit=true;}});this.on("submit.validate",function(event){if(validator.settings.debug){event.preventDefault();} function handle(){var hidden,result;if(validator.submitButton&&(validator.settings.submitHandler||validator.formSubmitted)){hidden=$("").attr("name",validator.submitButton.name).val($(validator.submitButton).val()).appendTo(validator.currentForm);} if(validator.settings.submitHandler){result=validator.settings.submitHandler.call(validator,validator.currentForm,event);if(hidden){hidden.remove();} if(result!==undefined){return result;} return false;} return true;} if(validator.cancelSubmit){validator.cancelSubmit=false;return handle();} if(validator.form()){if(validator.pendingRequest){validator.formSubmitted=true;return false;} return handle();}else{validator.focusInvalid();return false;}});} return validator;},valid:function(){var valid,validator,errorList;if($(this[0]).is("form")){valid=this.validate().form();}else{errorList=[];valid=true;validator=$(this[0].form).validate();this.each(function(){valid=validator.element(this)&&valid;if(!valid){errorList=errorList.concat(validator.errorList);}});validator.errorList=errorList;} return valid;},rules:function(command,argument){var element=this[0],settings,staticRules,existingRules,data,param,filtered;if(element==null){return;} if(!element.form&&element.hasAttribute("contenteditable")){element.form=this.closest("form")[0];element.name=this.attr("name");} if(element.form==null){return;} if(command){settings=$.data(element.form,"validator").settings;staticRules=settings.rules;existingRules=$.validator.staticRules(element);switch(command){case"add":$.extend(existingRules,$.validator.normalizeRule(argument));delete existingRules.messages;staticRules[element.name]=existingRules;if(argument.messages){settings.messages[element.name]=$.extend(settings.messages[element.name],argument.messages);} break;case"remove":if(!argument){delete staticRules[element.name];return existingRules;} filtered={};$.each(argument.split(/\s/),function(index,method){filtered[method]=existingRules[method];delete existingRules[method];});return filtered;}} data=$.validator.normalizeRules($.extend({},$.validator.classRules(element),$.validator.attributeRules(element),$.validator.dataRules(element),$.validator.staticRules(element)),element);if(data.required){param=data.required;delete data.required;data=$.extend({required:param},data);} if(data.remote){param=data.remote;delete data.remote;data=$.extend(data,{remote:param});} return data;}});$.extend($.expr.pseudos||$.expr[":"],{blank:function(a){return!$.trim(""+$(a).val());},filled:function(a){var val=$(a).val();return val!==null&&!!$.trim(""+val);},unchecked:function(a){return!$(a).prop("checked");}});$.validator=function(options,form){this.settings=$.extend(true,{},$.validator.defaults,options);this.currentForm=form;this.init();};$.validator.format=function(source,params){if(arguments.length===1){return function(){var args=$.makeArray(arguments);args.unshift(source);return $.validator.format.apply(this,args);};} if(params===undefined){return source;} if(arguments.length>2&¶ms.constructor!==Array){params=$.makeArray(arguments).slice(1);} if(params.constructor!==Array){params=[params];} $.each(params,function(i,n){source=source.replace(new RegExp("\\{"+i+"\\}","g"),function(){return n;});});return source;};$.extend($.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"cpefb_error",pendingClass:"pending",validClass:"valid",errorElement:"label",focusCleanup:false,focusInvalid:true,errorContainer:$([]),errorLabelContainer:$([]),onsubmit:true,ignore:":hidden",ignoreTitle:false,onfocusin:function(element){this.lastActive=element;if(this.settings.focusCleanup){if(this.settings.unhighlight){this.settings.unhighlight.call(this,element,this.settings.errorClass,this.settings.validClass);} this.hideThese(this.errorsFor(element));}},onfocusout:function(element){if(!this.checkable(element)&&(element.name in this.submitted||!this.optional(element))){this.element(element);}},onkeyup:function(element,event){var excludedKeys=[16,17,18,20,35,36,37,38,39,40,45,144,225];if(event.which===9&&this.elementValue(element)===""||$.inArray(event.keyCode,excludedKeys)!==-1){return;}else if(element.name in this.submitted||element.name in this.invalid){this.element(element);}},onclick:function(element){if(element.name in this.submitted){this.element(element);}else if(element.parentNode.name in this.submitted){this.element(element.parentNode);}},highlight:function(element,errorClass,validClass){if(element.type==="radio"){this.findByName(element.name).addClass(errorClass).removeClass(validClass);}else{$(element).addClass(errorClass).removeClass(validClass);}},unhighlight:function(element,errorClass,validClass){if(element.type==="radio"){this.findByName(element.name).removeClass(errorClass).addClass(validClass);}else{$(element).removeClass(errorClass).addClass(validClass);}}},setDefaults:function(settings){$.extend($.validator.defaults,settings);},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",equalTo:"Please enter the same value again.",maxlength:$.validator.format("Please enter no more than {0} characters."),minlength:$.validator.format("Please enter at least {0} characters."),rangelength:$.validator.format("Please enter a value between {0} and {1} characters long."),range:$.validator.format("Please enter a value between {0} and {1}."),max:$.validator.format("Please enter a value less than or equal to {0}."),min:$.validator.format("Please enter a value greater than or equal to {0}."),step:$.validator.format("Please enter a multiple of {0}.")},autoCreateRanges:false,prototype:{init:function(){this.labelContainer=$(this.settings.errorLabelContainer);this.errorContext=this.labelContainer.length&&this.labelContainer||$(this.currentForm);this.containers=$(this.settings.errorContainer).add(this.settings.errorLabelContainer);this.submitted={};this.valueCache={};this.pendingRequest=0;this.pending={};this.invalid={};this.reset();var groups=(this.groups={}),rules;$.each(this.settings.groups,function(key,value){if(typeof value==="string"){value=value.split(/\s/);} $.each(value,function(index,name){groups[name]=key;});});rules=this.settings.rules;$.each(rules,function(key,value){rules[key]=$.validator.normalizeRule(value);});function delegate(event){if(!this.form&&this.hasAttribute("contenteditable")){this.form=$(this).closest("form")[0];this.name=$(this).attr("name");} var validator=$.data(this.form,"validator"),eventType="on"+event.type.replace(/^validate/,""),settings=validator.settings;if(settings[eventType]&&!$(this).is(settings.ignore)){settings[eventType].call(validator,this,event);}} $(this.currentForm).on("focusin.validate focusout.validate keyup.validate",":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], "+"[type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], "+"[type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], "+"[type='radio'], [type='checkbox'], [contenteditable], [type='button']",delegate).on("click.validate","select, option, [type='radio'], [type='checkbox']",delegate);if(this.settings.invalidHandler){$(this.currentForm).on("invalid-form.validate",this.settings.invalidHandler);}},form:function(){this.checkForm();$.extend(this.submitted,this.errorMap);this.invalid=$.extend({},this.errorMap);if(!this.valid()){$(this.currentForm).triggerHandler("invalid-form",[this]);} this.showErrors();return this.valid();},checkForm:function(){this.prepareForm();for(var i=0,elements=(this.currentElements=this.elements());elements[i];i++){this.check(elements[i]);} return this.valid();},element:function(element){var cleanElement=this.clean(element),checkElement=this.validationTargetFor(cleanElement),v=this,result=true,rs,group;if(checkElement===undefined){delete this.invalid[cleanElement.name];}else{this.prepareElement(checkElement);this.currentElements=$(checkElement);group=this.groups[checkElement.name];if(group){$.each(this.groups,function(name,testgroup){if(testgroup===group&&name!==checkElement.name){cleanElement=v.validationTargetFor(v.clean(v.findByName(name)));if(cleanElement&&cleanElement.name in v.invalid){v.currentElements.push(cleanElement);result=v.check(cleanElement)&&result;}}});} rs=this.check(checkElement)!==false;result=result&&rs;if(rs){this.invalid[checkElement.name]=false;}else{this.invalid[checkElement.name]=true;} if(!this.numberOfInvalids()){this.toHide=this.toHide.add(this.containers);} this.showErrors();$(element).attr("aria-invalid",!rs);} return result;},showErrors:function(errors){if(errors){var validator=this;$.extend(this.errorMap,errors);this.errorList=$.map(this.errorMap,function(message,name){return{message:message,element:validator.findByName(name)[0]};});this.successList=$.grep(this.successList,function(element){return!(element.name in errors);});} if(this.settings.showErrors){this.settings.showErrors.call(this,this.errorMap,this.errorList);}else{this.defaultShowErrors();}},resetForm:function(){if($.fn.resetForm){$(this.currentForm).resetForm();} this.invalid={};this.submitted={};this.prepareForm();this.hideErrors();var elements=this.elements().removeData("previousValue").removeAttr("aria-invalid");this.resetElements(elements);},resetElements:function(elements){var i;if(this.settings.unhighlight){for(i=0;elements[i];i++){this.settings.unhighlight.call(this,elements[i],this.settings.errorClass,"");this.findByName(elements[i].name).removeClass(this.settings.validClass);}}else{elements.removeClass(this.settings.errorClass).removeClass(this.settings.validClass);}},numberOfInvalids:function(){return this.objectLength(this.invalid);},objectLength:function(obj){var count=0,i;for(i in obj){if(obj[i]!==undefined&&obj[i]!==null&&obj[i]!==false){count++;}} return count;},hideErrors:function(){this.hideThese(this.toHide);},hideThese:function(errors){errors.not(this.containers).text("");this.addWrapper(errors).hide();},valid:function(){return this.size()===0;},size:function(){return this.errorList.length;},focusInvalid:function(){if(this.settings.focusInvalid){try{$(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin");}catch(e){}}},findLastActive:function(){var lastActive=this.lastActive;return lastActive&&$.grep(this.errorList,function(n){return n.element.name===lastActive.name;}).length===1&&lastActive;},elements:function(){var validator=this,rulesCache={};return $(this.currentForm).find("input, select, textarea, [contenteditable]").not(":submit, :reset, :image, :disabled").not(this.settings.ignore).filter(function(){var name=this.name||$(this).attr("name");if(!name&&validator.settings.debug&&window.console){console.error("%o has no name assigned",this);} if(this.hasAttribute("contenteditable")){this.form=$(this).closest("form")[0];this.name=name;} if(name in rulesCache||!validator.objectLength($(this).rules())){return false;} rulesCache[name]=true;return true;});},clean:function(selector){return $(selector)[0];},errors:function(){var errorClass=this.settings.errorClass.split(" ").join(".");return $(this.settings.errorElement+"."+errorClass,this.errorContext);},resetInternals:function(){this.successList=[];this.errorList=[];this.errorMap={};this.toShow=$([]);this.toHide=$([]);},reset:function(){this.resetInternals();this.currentElements=$([]);},prepareForm:function(){this.reset();this.toHide=this.errors().add(this.containers);},prepareElement:function(element){this.reset();this.toHide=this.errorsFor(element);},elementValue:function(element){var $element=$(element),type=element.type,val,idx;if(type==="radio"||type==="checkbox"){return this.findByName(element.name).filter(":checked").val();}else if(type==="number"&&typeof element.validity!=="undefined"){return element.validity.badInput?"NaN":$element.val();} if(element.hasAttribute("contenteditable")){val=$element.text();}else{val=$element.val();} if(type==="file"){if(val.substr(0,12)==="C:\\fakepath\\"){return val.substr(12);} idx=val.lastIndexOf("/");if(idx>=0){return val.substr(idx+1);} idx=val.lastIndexOf("\\");if(idx>=0){return val.substr(idx+1);} return val;} if(typeof val==="string"){return val.replace(/\r/g,"");} return val;},check:function(element){element=this.validationTargetFor(this.clean(element));var rules=$(element).rules(),rulesCount=$.map(rules,function(n,i){return i;}).length,dependencyMismatch=false,val=this.elementValue(element),result,method,rule,normalizer;if(typeof rules.normalizer==="function"){normalizer=rules.normalizer;}else if(typeof this.settings.normalizer==="function"){normalizer=this.settings.normalizer;} if(normalizer){val=normalizer.call(element,val);if(typeof val!=="string"){throw new TypeError("The normalizer should return a string value.");} delete rules.normalizer;} for(method in rules){rule={method:method,parameters:rules[method]};try{result=$.validator.methods[method].call(this,val,element,rule.parameters);if(result==="dependency-mismatch"&&rulesCount===1){dependencyMismatch=true;continue;} dependencyMismatch=false;if(result==="pending"){this.toHide=this.toHide.not(this.errorsFor(element));return;} if(!result){this.formatAndAdd(element,rule);return false;}}catch(e){if(this.settings.debug&&window.console){console.log("Exception occurred when checking element "+element.id+", check the '"+rule.method+"' method.",e);} if(e instanceof TypeError){e.message+=". Exception occurred when checking element "+element.id+", check the '"+rule.method+"' method.";} throw e;}} if(dependencyMismatch){return;} if(this.objectLength(rules)){this.successList.push(element);} return true;},customDataMessage:function(element,method){return $(element).data("msg"+method.charAt(0).toUpperCase()+ method.substring(1).toLowerCase())||$(element).data("msg");},customMessage:function(name,method){var m=this.settings.messages[name];return m&&(m.constructor===String?m:m[method]);},findDefined:function(){for(var i=0;iWarning: No message defined for "+element.name+""),theregex=/\$?\{(\d+)\}/g;if(typeof message==="function"){message=message.call(this,rule.parameters,element);}else if(theregex.test(message)){message=$.validator.format(message.replace(theregex,"{$1}"),rule.parameters);} return message;},formatAndAdd:function(element,rule){var message=this.defaultMessage(element,rule);this.errorList.push({message:message,element:element,method:rule.method});this.errorMap[element.name]=message;this.submitted[element.name]=message;},addWrapper:function(toToggle){if(this.settings.wrapper){toToggle=toToggle.add(toToggle.parent(this.settings.wrapper));} return toToggle;},defaultShowErrors:function(){var i,elements,error;for(i=0;this.errorList[i];i++){error=this.errorList[i];if(this.settings.highlight){this.settings.highlight.call(this,error.element,this.settings.errorClass,this.settings.validClass);} this.showLabel(error.element,error.message);} if(this.errorList.length){this.toShow=this.toShow.add(this.containers);} if(this.settings.success){for(i=0;this.successList[i];i++){this.showLabel(this.successList[i]);}} if(this.settings.unhighlight){for(i=0,elements=this.validElements();elements[i];i++){this.settings.unhighlight.call(this,elements[i],this.settings.errorClass,this.settings.validClass);}} this.toHide=this.toHide.not(this.toShow);this.hideErrors();this.addWrapper(this.toShow).show();},validElements:function(){return this.currentElements.not(this.invalidElements());},invalidElements:function(){return $(this.errorList).map(function(){return this.element;});},showLabel:function(element,message){var place,group,errorID,v,error=this.errorsFor(element),elementID=this.idOrName(element),describedBy=$(element).attr("aria-describedby");if(error.length){error.removeClass(this.settings.validClass).addClass(this.settings.errorClass);error.html(message);}else{error=$("<"+this.settings.errorElement+">").attr("id",elementID+"-error").addClass(this.settings.errorClass).html(message||"");place=error;if(this.settings.wrapper){place=error.hide().show().wrap("<"+this.settings.wrapper+"/>").parent();} if(this.labelContainer.length){this.labelContainer.append(place);}else if(this.settings.errorPlacement){this.settings.errorPlacement.call(this,place,$(element));}else{place.insertAfter(element);} if(error.is("label")){error.attr("for",elementID);}else if(error.parents("label[for='"+this.escapeCssMeta(elementID)+"']").length===0){errorID=error.attr("id");if(!describedBy){describedBy=errorID;}else if(!describedBy.match(new RegExp("\\b"+this.escapeCssMeta(errorID)+"\\b"))){describedBy+=" "+errorID;} $(element).attr("aria-describedby",describedBy);group=this.groups[element.name];if(group){v=this;$.each(v.groups,function(name,testgroup){if(testgroup===group){$("[name='"+v.escapeCssMeta(name)+"']",v.currentForm).attr("aria-describedby",error.attr("id"));}});}}} if(!message&&this.settings.success){error.text("");if(typeof this.settings.success==="string"){error.addClass(this.settings.success);}else{this.settings.success(error,element);}} this.toShow=this.toShow.add(error);},errorsFor:function(element){var name=this.escapeCssMeta(this.idOrName(element)),describer=$(element).attr("aria-describedby"),selector="label[for='"+name+"'], label[for='"+name+"'] *";if(describer){selector=selector+", #"+this.escapeCssMeta(describer).replace(/\s+/g,", #");} return this.errors().filter(selector);},escapeCssMeta:function(string){return string.replace(/([\\!"#$%&'()*+,./:;<=>?@\[\]^`{|}~])/g,"\\$1");},idOrName:function(element){return this.groups[element.name]||(this.checkable(element)?element.name:element.id||element.name);},validationTargetFor:function(element){if(this.checkable(element)){element=this.findByName(element.name);} return $(element).not(this.settings.ignore)[0];},checkable:function(element){return(/radio|checkbox/i).test(element.type);},findByName:function(name){return $(this.currentForm).find("[name='"+this.escapeCssMeta(name)+"']");},getLength:function(value,element){switch(element.nodeName.toLowerCase()){case"select":return $("option:selected",element).length;case"input":if(this.checkable(element)){return this.findByName(element.name).filter(":checked").length;}} return value.length;},depend:function(param,element){return this.dependTypes[typeof param]?this.dependTypes[typeof param](param,element):true;},dependTypes:{"boolean":function(param){return param;},"string":function(param,element){return!!$(param,element.form).length;},"function":function(param,element){return param(element);}},optional:function(element){var val=this.elementValue(element);return!$.validator.methods.required.call(this,val,element)&&"dependency-mismatch";},startRequest:function(element){if(!this.pending[element.name]){this.pendingRequest++;$(element).addClass(this.settings.pendingClass);this.pending[element.name]=true;}},stopRequest:function(element,valid){this.pendingRequest--;if(this.pendingRequest<0){this.pendingRequest=0;} delete this.pending[element.name];$(element).removeClass(this.settings.pendingClass);if(valid&&this.pendingRequest===0&&this.formSubmitted&&this.form()){$(this.currentForm).submit();if(this.submitButton){$("input:hidden[name='"+this.submitButton.name+"']",this.currentForm).remove();} this.formSubmitted=false;}else if(!valid&&this.pendingRequest===0&&this.formSubmitted){$(this.currentForm).triggerHandler("invalid-form",[this]);this.formSubmitted=false;}},previousValue:function(element,method){method=typeof method==="string"&&method||"remote";return $.data(element,"previousValue")||$.data(element,"previousValue",{old:null,valid:true,message:this.defaultMessage(element,{method:method})});},destroy:function(){this.resetForm();$(this.currentForm).off(".validate").removeData("validator").find(".validate-equalTo-blur").off(".validate-equalTo").removeClass("validate-equalTo-blur");}},classRuleSettings:{required:{required:true},email:{email:true},url:{url:true},date:{date:true},dateISO:{dateISO:true},number:{number:true},digits:{digits:true},creditcard:{creditcard:true}},addClassRules:function(className,rules){if(className.constructor===String){this.classRuleSettings[className]=rules;}else{$.extend(this.classRuleSettings,className);}},classRules:function(element){var rules={},classes=$(element).attr("class");if(classes){$.each(classes.split(" "),function(){if(this in $.validator.classRuleSettings){$.extend(rules,$.validator.classRuleSettings[this]);}});} return rules;},normalizeAttributeRule:function(rules,type,method,value){if(/min|max|step/.test(method)&&(type===null||/number|range|text/.test(type))){if(!/^\s*$/.test(value))value=Number(value);if(isNaN(value)){value=undefined;}} if(value||value===0){rules[method]=value;}else if(type===method&&type!=="range"){rules[method]=true;}},attributeRules:function(element){var rules={},$element=$(element),type=element.getAttribute("type"),method,value;for(method in $.validator.methods){if(method==="required"){value=element.getAttribute(method);if(value===""){value=true;} value=!!value;}else{value=$element.attr(method);} this.normalizeAttributeRule(rules,type,method,value);} if(rules.maxlength&&/-1|2147483647|524288/.test(rules.maxlength)){delete rules.maxlength;} return rules;},dataRules:function(element){var rules={},$element=$(element),type=element.getAttribute("type"),method,value;for(method in $.validator.methods){value=$element.data("rule"+method.charAt(0).toUpperCase()+method.substring(1).toLowerCase());this.normalizeAttributeRule(rules,type,method,value);} return rules;},staticRules:function(element){var rules={},validator=$.data(element.form,"validator");if(validator.settings.rules){rules=$.validator.normalizeRule(validator.settings.rules[element.name])||{};} return rules;},normalizeRules:function(rules,element){$.each(rules,function(prop,val){if(val===false){delete rules[prop];return;} if(val.param||val.depends){var keepRule=true;switch(typeof val.depends){case"string":keepRule=!!$(val.depends,element.form).length;break;case"function":keepRule=val.depends.call(element,element);break;} if(keepRule){rules[prop]=val.param!==undefined?val.param:true;}else{$.data(element.form,"validator").resetElements($(element));delete rules[prop];}}});$.each(rules,function(rule,parameter){rules[rule]=$.isFunction(parameter)&&rule!=="normalizer"?parameter(element):parameter;});$.each(["minlength","maxlength"],function(){if(rules[this]){rules[this]=Number(rules[this]);}});$.each(["rangelength","range"],function(){var parts;if(rules[this]){if($.isArray(rules[this])){rules[this]=[Number(rules[this][0]),Number(rules[this][1])];}else if(typeof rules[this]==="string"){parts=rules[this].replace(/[\[\]]/g,"").split(/[\s,]+/);rules[this]=[Number(parts[0]),Number(parts[1])];}}});if($.validator.autoCreateRanges){if(rules.min!=null&&rules.max!=null){rules.range=[rules.min,rules.max];delete rules.min;delete rules.max;} if(rules.minlength!=null&&rules.maxlength!=null){rules.rangelength=[rules.minlength,rules.maxlength];delete rules.minlength;delete rules.maxlength;}} return rules;},normalizeRule:function(data){if(typeof data==="string"){var transformed={};$.each(data.split(/\s/),function(){transformed[this]=true;});data=transformed;} return data;},addMethod:function(name,method,message){$.validator.methods[name]=method;$.validator.messages[name]=message!==undefined?message:$.validator.messages[name];if(method.length<3){$.validator.addClassRules(name,$.validator.normalizeRule(name));}},methods:{required:function(value,element,param){if(!this.depend(param,element)){return"dependency-mismatch";} if(element.nodeName.toLowerCase()==="select"){var val=$(element).val();return val&&val.length>0;} if(this.checkable(element)){return this.getLength(value,element)>0;} return value.length>0;},email:function(value,element){return this.optional(element)||/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(value);},url:function(value,element){return this.optional(element)||/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})).?)(?::\d{2,5})?(?:[/?#]\S*)?$/i.test(value);},date:function(value,element){return this.optional(element)||!/Invalid|NaN/.test(new Date(value).toString());},dateISO:function(value,element){return this.optional(element)||/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(value);},number:function(value,element){return this.optional(element)||/^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(value);},digits:function(value,element){return this.optional(element)||/^\d+$/.test(value);},minlength:function(value,element,param){var length=$.isArray(value)?value.length:this.getLength(value,element);return this.optional(element)||length>=param;},maxlength:function(value,element,param){var length=$.isArray(value)?value.length:this.getLength(value,element);return this.optional(element)||length<=param;},rangelength:function(value,element,param){var length=$.isArray(value)?value.length:this.getLength(value,element);return this.optional(element)||(length>=param[0]&&length<=param[1]);},min:function(value,element,param){return this.optional(element)||value>=param;},max:function(value,element,param){return this.optional(element)||value<=param;},range:function(value,element,param){return this.optional(element)||(value>=param[0]&&value<=param[1]);},step:function(value,element,param){var type=$(element).attr("type"),errorMessage="Step attribute on input type "+type+" is not supported.",supportedTypes=["text","number","range"],re=new RegExp("\\b"+type+"\\b"),notSupported=type&&!re.test(supportedTypes.join()),decimalPlaces=function(num){var match=(""+num).match(/(?:\.(\d+))?$/);if(!match){return 0;} return match[1]?match[1].length:0;},toInt=function(num){return Math.round(num*Math.pow(10,decimals));},valid=true,decimals;if(notSupported){throw new Error(errorMessage);} decimals=decimalPlaces(param);if(decimalPlaces(value)>decimals||toInt(value)%toInt(param)!==0){valid=false;} return this.optional(element)||valid;},equalTo:function(value,element,param){var target=$(param);if(this.settings.onfocusout&&target.not(".validate-equalTo-blur").length){target.addClass("validate-equalTo-blur").on("blur.validate-equalTo",function(){$(element).valid();});} return value===target.val();},remote:function(value,element,param,method){if(this.optional(element)){return"dependency-mismatch";} method=typeof method==="string"&&method||"remote";var previous=this.previousValue(element,method),validator,data,optionDataString;if(!this.settings.messages[element.name]){this.settings.messages[element.name]={};} previous.originalMessage=previous.originalMessage||this.settings.messages[element.name][method];this.settings.messages[element.name][method]=previous.message;param=typeof param==="string"&&{url:param}||param;optionDataString=$.param($.extend({data:value},param.data));if(previous.old===optionDataString){return previous.valid;} previous.old=optionDataString;validator=this;this.startRequest(element);data={};data[element.name]=value;$.ajax($.extend(true,{mode:"abort",port:"validate"+element.name,dataType:"json",data:data,context:validator.currentForm,success:function(response){var valid=response===true||response==="true",errors,message,submitted;validator.settings.messages[element.name][method]=previous.originalMessage;if(valid){submitted=validator.formSubmitted;validator.resetInternals();validator.toHide=validator.errorsFor(element);validator.formSubmitted=submitted;validator.successList.push(element);validator.invalid[element.name]=false;validator.showErrors();}else{errors={};message=response||validator.defaultMessage(element,{method:method,parameters:value});errors[element.name]=previous.message=message;validator.invalid[element.name]=true;validator.showErrors(errors);} previous.valid=valid;validator.stopRequest(element,valid);}},param));return"pending";}}});var pendingRequests={},ajax;if($.ajaxPrefilter){$.ajaxPrefilter(function(settings,_,xhr){var port=settings.port;if(settings.mode==="abort"){if(pendingRequests[port]){pendingRequests[port].abort();} pendingRequests[port]=xhr;}});}else{ajax=$.ajax;$.ajax=function(settings){var mode=("mode"in settings?settings:$.ajaxSettings).mode,port=("port"in settings?settings:$.ajaxSettings).port;if(mode==="abort"){if(pendingRequests[port]){pendingRequests[port].abort();} pendingRequests[port]=ajax.apply(this,arguments);return pendingRequests[port];} return ajax.apply(this,arguments);};} return $;})); fbuilderjQuery=(typeof fbuilderjQuery!='undefined')?fbuilderjQuery:jQuery;fbuilderjQuery(window).bind('pageshow',function(event){if(typeof event.originalEvent['persisted']!='undefined'&&event.originalEvent['persisted'])location.reload();});fbuilderjQuery.fbuilderjQueryGenerator=function(){if('fbuilderGeneratorFlag'in fbuilderjQuery)return;(function($){$.fbuilder=$.fbuilder||{};$.fbuilder['objName']='fbuilderjQuery';;(function(root){var lib={};lib.cf_logical_version='0.1';lib.IF=function(_if,_then,_else){if(_if){return(typeof _then==='undefined')?true:_then;}else{return(typeof _else==='undefined')?false:_else;}};lib.AND=function(){for(var i=0,h=arguments.length;i=12)?'pm':'am';h=h%12;h=(h==0)?12:h;} h=(h<10)?'0'+h:h;i=(i<10)?'0'+i:i;s=(s<10)?'0'+s:s;return format.replace(/y+/i,y).replace(/m+/i,m).replace(/d+/i,d).replace(/h+/i,h).replace(/i+/i,i).replace(/s+/i,s).replace(/a+/i,a);} return num;};} if(window.SUM==undefined){window.SUM=window.sum=function(){var r=0,t;for(var i in arguments){t=arguments[i]*1;if(!isNaN(t))r+=t;} return r;};} if(window.CONCATENATE==undefined){window.CONCATENATE=window.concatenate=function(){var r='';for(var i in arguments)r+=(new String(arguments[i]));return r;};} if(window.GCD==undefined){window.GCD=window.gcd=function(a,b){if(!b)return a;return GCD(b,a%b);};} if(window.LCM==undefined){window.LCM=window.lcm=function(a,b){return(!a||!b)?0:ABS((a*b)/GCD(a,b));};} if(window.LOGAB==undefined){window.LOGAB=window.logab=function(a,b){return LOG(a)/LOG(b);};} var math_prop=["LN10","PI","E","LOG10E","SQRT2","LOG2E","SQRT1_2","LN2","cos","pow","log","tan","sqrt","asin","abs","max","exp","atan2","atanh","random","acos","atan","min","sin"];for(var i=0,h=math_prop.length;i').text(value).html().replace(/"/g,""").replace(/&lt;/g,'<').replace(/&gt;/g,'>');};$.fbuilder['htmlDecode']=function(value){return(/&(?:#x[a-f0-9]+|#[0-9]+|[a-z0-9]+);?/ig.test(value))?$('
    ').html(value).text():value;};$.fbuilder['escapeSymbol']=function(value){return value.replace(/([\^\$\-\.\,\[\]\(\)\/\\\*\?\+\!\{\}])/g,"\\$1");};$.fbuilder['parseValStr']=function(value,raw){raw=raw||false;value=$.trim(value||'');value=value.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/"/g,'\\"');return($.isNumeric(value))?((raw)?value:value*1):'"'+value+'"';};$.fbuilder['parseVal']=function(value,thousand,decimal){if(!!value==false)return 0;if(/(\d{1,2}[\/\.\-]\d{1,2}[\/\.\-]\d{4})|(\d{4}[\/\.\-]\d{1,2}[\/\.\-]\d{1,2})/.test(value)) return $.fbuilder['parseValStr'](value);thousand=$.fbuilder.escapeSymbol($.trim((!!thousand)?thousand:','));decimal=$.trim((!!!decimal||/^\s*$/.test(decimal))?',':decimal);var t=(new String(value)).replace(new RegExp((/^\s*$/.test(thousand)?'\,':thousand)+'\(\\d{1,2}\)$'),decimal+'$1').replace(new RegExp(thousand,'g'),'').replace(new RegExp($.fbuilder.escapeSymbol(decimal),'g'),'.').replace(/\s/g,''),p=/[+\-]?((\d+(\.\d+)?)|(\.\d+))(?:[eE][+\-]?\d+)?/.exec(t);return(p)?((/^0\d/.test(p[0]))?p[0].substr(1):p[0])*1:$.fbuilder['parseValStr'](value);};$.fbuilder['isMobile']=function(){try{document.createEvent("TouchEvent");return true;} catch(e){return false;}};$.fbuilder['setBrowserHistory']=function(r){if('history'in window){var b='#',s='';for(var id in $.fbuilder.forms){b+=s+'f'+id.replace(/[^\d]/g,'')+'p'+($.fbuilder.forms[id]['currentPage']||0);s='|';} history[(r)?'replaceState':'pushState']({},document.title,b);}};$.fbuilder['manageHistory']=function(onload){var b=(document.URL.split('#')[1]||null),m,f,t,flag=false;if(b){while(m=b.match(/f(\d+)p(\d+)\|?/)){f='_'+m[1];t=onload?0:m[2]*1;b=b.replace(m[0],'');flag=(!(f in $.fbuilder.forms)||t!=$.fbuilder['goToPage']({'formIdentifier':f,'from':0,'to':t}));}}else{for(f in $.fbuilder.forms) if('currentPage'in $.fbuilder.forms[f]) $.fbuilder['goToPage']({'formIdentifier':f,'from':0,'to':0});} if(flag)$.fbuilder.setBrowserHistory(true);};$.fbuilder['goToPage']=function(config){if(('formIdentifier'in config||'form'in config)&&'to'in config){var id=(config['form'])?$('[name="cp_calculatedfieldsf_pform_psequence"]',config['form']).val():config['formIdentifier'],formObj=$.fbuilder.forms[id],_from=(config['from']||formObj['currentPage']||0)*1,_to=config['to']*1,direction=(_from<_to)?1:-1,formDom=$(config['form']||'[id="'+formObj.formId+'"]'),pageDom,i=_from;while(i!=_to){if(direction==1&&!formDom.valid())break;i+=direction;} formObj['currentPage']=i;$(".pbreak:not(.pb"+i+")",formDom).hide().find(".field").addClass("ignorepb");(pageDom=$(".pbreak.pb"+i,formDom)).show().find(".ignorepb").removeClass("ignorepb");if(i!=_from){try {if(!this.isMobile()){var ff=pageDom.find(":focusable:first");if(ff&&!ff.hasClass('hasDatepicker')&&ff.attr('type')!='radio'&&ff.attr('type')!='checkbox'&&ff.closest('[uh]').length==0)ff.focus();} var _wScrollTop=$(window).scrollTop(),_viewportHeight=$(window).height(),_scrollTop=formDom.offset().top;if(_scrollTop<_wScrollTop||(_wScrollTop+_viewportHeight)<_scrollTop) $('html, body').animate({scrollTop:_scrollTop},50);} catch(e){}}else{formDom.validate().focusInvalid();} return i;}};$.fbuilder['showHideDep']=function(config){var processItems=function(items,isNotFirstTime){for(var i=0,h=items.length;i
    ';captcha_tag.remove();} return html;},getSubmitHTML=function(){var submit_tag=$("#cp_subbtn"+opt.identifier+':not(:empty)'),html='';if(submit_tag.length){html+='
    '+submit_tag.html()+'
    ';submit_tag.remove();} return html;};form_tag.addClass(theForm.formtemplate);if(!opt.cached){page_tag=$('
    ');fieldlist_tag.addClass(theForm.formlayout).html(theForm.show()).append(page_tag);for(i;i
    ');fieldlist_tag.append(page_tag);}else{page_tag.append(items[i].show());if(items[i].predefinedClick){page_tag.find("#"+items[i].name).attr({placeholder:items[i].predefined,value:""});} if(items[i].userhelpTooltip){var uh=items[i].jQueryRef();if(items[i].userhelp&&items[i].userhelp.length){if(items[i].tooltipIcon)$('').attr('uh',items[i].userhelp).appendTo($(uh.children('label')[0]||uh));else $(uh.find(".dfield")[0]||uh).attr('uh',items[i].userhelp);} uh.find(".uh").remove();}}}}else{page=fieldlist_tag.find('.pbreak').length;i=items.length;} if(page>0){if(!opt.cached){$(".pb"+page,fieldlist_tag).addClass("pbEnd");$(".pbreak",fieldlist_tag).each(function(index){var code=$(this).html(),bSubmit='';if(index==page){code+=getCaptchaHTML();bSubmit=getSubmitHTML();} $(this).html('
    '+opt.messages.pageof.replace(/\{\s*\d+\s*\}/,(index+1)).replace(/\{\s*\d+\s*\}/,(page+1))+''+code+'
    '+opt.messages.previous+'
    '+opt.messages.next+'
    '+bSubmit+'
    ');});} fieldlist_tag.find(".pbPrevious,.pbNext").bind("keyup",function(evt){if(evt.which==13||evt.which==32)$(this).click();}).bind("click",{'identifier':opt.identifier},function(evt){var _from=($.fbuilder.forms[evt.data.identifier]['currentPage']||0),_inc=($(this).hasClass("pbPrevious"))?-1:1,_p=$.fbuilder['goToPage']({'formIdentifier':evt.data.identifier,'from':_from,'to':_from+_inc}),_pDom=$('.pb'+_p);if(_from!=_p)$.fbuilder.setBrowserHistory();if(_pDom.find('.fields:visible').length==0) if(_inc==-1&&0<_p)_pDom.find('.pbPrevious').click();else if(!_pDom.hasClass('pbEnd'))_pDom.find('.pbNext').click();return false;});}else{if(!opt.cached)$(".pb"+page,fieldlist_tag).append(getCaptchaHTML()+getSubmitHTML());} if(!opt.cached&&opt.setCache){var url=document.location.href,data={'cffaction':'cff_cache','cache':form_tag.html().replace(/\n+/g,''),'form':form_tag.find('[name="cp_calculatedfieldsf_id"]').val()};$.post(url,data,function(data){if(typeof console!='undefined')console.log(data);});} $(document).on('click','#fbuilder .captcha img',function(){var e=$(this);e.attr('src',e.attr('src').replace(/&\d+$/,'')+'&'+Math.floor(Math.random()*1000));});$(form_tag).find('.captcha img').click();$('#fieldlist'+opt.identifier).find(".pbSubmit").bind("keyup",function(evt){if(evt.which==13||evt.which==32)$(this).click();}).bind("click",{'identifier':opt.identifier},function(evt){$(this).closest("form").submit();});if(i>0){theForm.after_show(opt.identifier);for(var i=0;i

    '+this.title+'

    '+this.description+'
    ';},after_show:function(id){var form=$('#cp_calculatedfieldsf_pform'+id);if(typeof $.fn.fbuilder_localstorage!='undefined'&&form.hasClass('persist-form')){form.fbuilder_localstorage();} form.attr('data-evalequations',this.evalequations).attr('data-evalequationsevent',this.evalequationsevent).attr('autocomplete',((this.autocomplete)?'on':'off')).find('input,select').blur(function(){try{$(this).valid();}catch(e){};});if(!this.autocomplete)form.find('input[name*="fieldname"]').attr('autocomplete','new-password');}});var theForm,ffunct={toShow:{},toHide:{},hiddenByContainer:{},getItem:function(name){var regExp=new RegExp((parseInt(name,10)==name)?'fieldname'+name+'_':name+'_',i);for(var i in items){if(items[i].name==name||regExp.test(items[i].name)){return items[i];}} return false;},getItems:function(){return items;},loadData:function(f){var d=window[f];if(typeof d!='undefined'){if(typeof d=='object'&&(typeof d.nodeType!=='undefined'||d instanceof jQuery)){d=jQuery.parseJSON(jQuery(d).val());} else if(typeof d=='string'){d=jQuery.parseJSON(d);} if(d.length==2){this.formId=d[1]['formid'];items=[];for(var i=0;i
    '+this.userhelp+'
    ';},after_show:function(){if(this.regExp!=""&&typeof $['validator']!='undefined'){var parts=this.regExp.match(/(\/)(.*)(\/)([gimy]{0,4})$/i);this.regExp=(parts===null)?new RegExp(this.regExp):new RegExp(parts[2],parts[4].toLowerCase());if(!('pattern'in $.validator.methods)) $.validator.addMethod('pattern',function(value,element,param){try{return this.optional(element)||param.test(value);} catch(err){return true;}});$('#'+this.name).rules('add',{'pattern':this.regExp,messages:{'pattern':this.regExpMssg}});}},val:function(raw){raw=raw||false;var e=$('[id="'+this.name+'"]:not(.ignore)');if(e.length)return $.fbuilder.parseValStr(e.val(),raw);return 0;}});$.fbuilder.controls['fcurrency']=function(){};$.extend($.fbuilder.controls['fcurrency'].prototype,$.fbuilder.controls['ffields'].prototype,{title:"Currency",ftype:"fcurrency",predefined:"",predefinedClick:false,required:false,readonly:false,size:"small",currencySymbol:"$",currencyText:"USD",thousandSeparator:",",centSeparator:".",noCents:false,min:"",max:"",formatDynamically:false,twoDecimals:false,set_min:function(v,rmv){var e=$('[id="'+this.name+'"]');if(rmv)e.removeAttr('min');else e.attr('min',v);e.valid();},set_max:function(v,rmv){var e=$('[id="'+this.name+'"]');if(rmv)e.removeAttr('max');else e.attr('max',v);e.valid();},getFormattedValue:function(value){if(value=='')return value;var me=this,ts=me.thousandSeparator,cs=((cs=$.trim(me.centSeparator))!=='')?cs:'.',v=$.fbuilder.parseVal(value,ts,cs),parts=[],counter=0,str='',sign='';if(!isNaN(v)){if(v<0)sign='-';v=ABS(v);if(this.twoDecimals)v=v.toFixed(2);parts=v.toString().split(".");for(var i=parts[0].length-1;i>=0;i--){counter++;str=parts[0][i]+str;if(counter%3==0&&i!=0)str=ts+str;} parts[0]=str;if(parts[1]){if(parts[1].length==1)parts[1]+='0';} else parts[1]='00';return me.currencySymbol+sign+((me.noCents)?parts[0]:parts.join(cs))+me.currencyText;}else{return value;}},init:function(){if(!/^\s*$/.test(this.min))this._setHndl('min');if(!/^\s*$/.test(this.max))this._setHndl('max');},show:function(){return'
    '+this.userhelp+'
    ';},after_show:function(){var me=this;if(this.formatDynamically){$(document).on('change','[name="'+me.name+'"]',function(){this.value=me.getFormattedValue(this.value);});} if(typeof $['validator']!='undefined'){if(!('cffcurrency'in $.validator.methods)) $.validator.addMethod('cffcurrency',function(v,el){var f=el.id.match(/_\d+$/),esc=$.fbuilder.escapeSymbol,r;e=$.fbuilder['forms'][f[0]].getItem(el.name);r=new RegExp('^\\s*('+esc(e.currencySymbol)+')?\\s*\\-?\\d+('+esc(e.thousandSeparator)+'\\d{3})*'+((e.noCents)?'':'('+e.centSeparator+'\\d+)?')+'\\s*('+esc(e.currencyText)+')?\\s*$','i');return this.optional(el)||r.test(v)||($.isNumeric(v)&&(!e.noCents||v===FLOOR(v)));},$.validator.messages['currency']);$.validator.methods.min=function(v,el,p){var f=el.id.match(/_\d+$/),e;if(f)e=$.fbuilder['forms'][f[0]].getItem(el.name);if(e){v=e.val();if('dformat'in e&&e.dformat=='percent')v*=100;} return this.optional(el)||v>=p;};$.validator.methods.max=function(v,el,p){var f=el.id.match(/_\d+$/),e;if(f)e=$.fbuilder['forms'][f[0]].getItem(el.name);if(e){v=e.val();if('dformat'in e&&e.dformat=='percent')v*=100;} return this.optional(el)||v<=p;};}},val:function(raw){raw=raw||false;var e=$('[id="'+this.name+'"]:not(.ignore)');if(e.length){var v=e.val();if(raw)return($.isNumeric(v))?v:$.fbuilder.parseValStr(v,raw);v=$.trim(v);v=v.replace(new RegExp($.fbuilder['escapeSymbol'](this.currencySymbol),'g'),'').replace(new RegExp($.fbuilder['escapeSymbol'](this.currencyText),'g'),'');return $.fbuilder.parseVal(v,this.thousandSeparator,this.centSeparator);} return 0;}});$.fbuilder.controls['fnumber']=function(){};$.extend($.fbuilder.controls['fnumber'].prototype,$.fbuilder.controls['ffields'].prototype,{title:"Number",ftype:"fnumber",predefined:"",predefinedClick:false,required:false,readonly:false,size:"small",thousandSeparator:"",decimalSymbol:".",min:"",max:"",formatDynamically:false,dformat:"digits",set_min:function(v,rmv){var e=$('[id="'+this.name+'"]');if(rmv)e.removeAttr('min');else e.attr('min',v);e.valid();},set_max:function(v,rmv){var e=$('[id="'+this.name+'"]');if(rmv)e.removeAttr('max');else e.attr('max',v);e.valid();},getFormattedValue:function(value){if(value=='')return value;var ts=this.thousandSeparator,ds=((ds=$.trim(this.decimalSymbol))!=='')?ds:'.',v=$.fbuilder.parseVal(value,ts,ds),s='',counter=0,str='',parts=[];if(!isNaN(v)){if(v<0)s='-';v=ABS(v);parts=v.toString().split(".");for(var i=parts[0].length-1;i>=0;i--){counter++;str=parts[0][i]+str;if(counter%3==0&&i!=0)str=ts+str;} parts[0]=str;return s+parts.join(ds)+((this.dformat=='percent')?'%':'');}else{return value;}},init:function(){if(!/^\s*$/.test(this.min))this._setHndl('min');if(!/^\s*$/.test(this.max))this._setHndl('max');},show:function(){var _type=(this.dformat=='digits'||(this.dformat!='percent'&&/^$/.test(this.thousandSeparator)&&/^\s*(\.\s*)?$/.test(this.decimalSymbol)))?'number':'text';return'
    '+this.userhelp+'
    ';},after_show:function(){var me=this;if((me.formatDynamically&&me.dformat!='digits')||me.dformat=='percent'){$(document).on('change','[name="'+me.name+'"]',function(){this.value=me.getFormattedValue(this.value);});} if(typeof $['validator']!='undefined'){$.validator.methods.number=function(v,el){var f=el.id.match(/_\d+$/),esc=$.fbuilder.escapeSymbol,e,r;if(f)e=$.fbuilder['forms'][f[0]].getItem(el.name);if(!e)e={thousandSeparator:',',decimalSymbol:'.'};r=new RegExp('^\\s*\\-?\\d+('+esc(e.thousandSeparator)+'\\d{3})*('+esc(e.decimalSymbol)+'\\d+)?\\s*\\%?\\s*$','i');return this.optional(el)||r.test(v)||$.isNumeric(v);};$.validator.methods.min=function(v,el,p){var f=el.id.match(/_\d+$/),e;if(f)e=$.fbuilder['forms'][f[0]].getItem(el.name);if(e){v=e.val();if('dformat'in e&&e.dformat=='percent')v*=100;} return this.optional(el)||v>=p;};$.validator.methods.max=function(v,el,p){var f=el.id.match(/_\d+$/),e;if(f)e=$.fbuilder['forms'][f[0]].getItem(el.name);if(e){v=e.val();if('dformat'in e&&e.dformat=='percent')v*=100;} return this.optional(el)||v<=p;};}},val:function(raw){raw=raw||false;var e=$('[id="'+this.name+'"]:not(.ignore)');if(e.length){var v=$.trim(e.val());if(raw)return($.isNumeric(v)&&this.thousandSeparator!='.')?v:$.fbuilder.parseValStr(v,raw);v=$.fbuilder.parseVal(v,this.thousandSeparator,this.decimalSymbol);return(this.dformat=='percent')?v/100:v;} return 0;}});$.fbuilder.controls['fslider']=function(){};$.extend($.fbuilder.controls['fslider'].prototype,$.fbuilder.controls['ffields'].prototype,{title:"Slider",ftype:"fslider",predefined:"",predefinedMin:"",predefinedMax:"",predefinedClick:false,size:"small",thousandSeparator:",",centSeparator:".",min:0,max:100,step:1,range:false,minCaption:"",maxCaption:"",caption:"{0}",_setThousandsSeparator:function(v){v=$.fbuilder.parseVal(v,this.thousandSeparator,this.centSeparator);if(!isNaN(v)){v=v.toString();var parts=v.toString().split("."),counter=0,str='';for(var i=parts[0].length-1;i>=0;i--){counter++;str=parts[0][i]+str;if(counter%3==0&&i!=0)str=this.thousandSeparator+str;} parts[0]=str;if(typeof parts[1]!='undefined'&&parts[1].length==1){parts[1]+='0';} return parts.join(this.centSeparator);}else{return v;}},_setFieldValue:function(){var me=this;if(me.range){var values=$('#'+me.name+'_slider').slider('values');$('#'+me.name).val('['+values[0]+','+values[1]+']');$('#'+me.name+'_caption').html(me.caption.replace(/\{\s*0\s*\}/,me._setThousandsSeparator(values[0])).replace(/\{\s*0\s*\}/,me._setThousandsSeparator(values[1])));}else{var value=$('#'+me.name+'_slider').slider('value');$('#'+me.name).val(value);$('#'+me.name+'_caption').html(me.caption.replace(/\{\s*0\s*\}/,me._setThousandsSeparator(value)));} $('#'+me.name).change();},init:function(){function _toNumber(n){return(new String(n)).replace(/[^\d\.]/g,'')*1;};this.min=(/^\s*$/.test(this.min))?0:$.trim(this.min);this.max=(/^\s*$/.test(this.max))?100:$.trim(this.max);this.step=(/^\s*$/.test(this.step))?1:$.trim(this.step);this.predefined=(/^\s*$/.test(this.predefined))?this.min:_toNumber(this.predefined);this.predefinedMin=(/^\s*$/.test(this.predefinedMin))?this.min:_toNumber(this.predefinedMin);this.predefinedMax=(/^\s*$/.test(this.predefinedMax))?this.max:_toNumber(this.predefinedMax);this._setHndl('min');this._setHndl('max');this._setHndl('step');this.centSeparator=(/^\s*$/.test(this.centSeparator))?'.':$.trim(this.centSeparator);},show:function(){return'
    '+this.minCaption+''+this.maxCaption+'
    '+this.userhelp+'
    ';},set_min:function(v,ignore){var e=$('[id="'+this.name+'_slider"]'),c=this.val(),r=false;if(ignore)v=0;e.slider('option','min',v);if($.isArray(c)){if(c[0]
    '+this.userhelp+'
    ';},val:function(raw){raw=raw||false;var e=$('[id="'+this.name+'"]:not(.ignore)');if(e.length)return $.fbuilder.parseValStr(e.val(),raw);return 0;}});$.fbuilder.controls['fdate']=function(){};$.extend($.fbuilder.controls['fdate'].prototype,$.fbuilder.controls['ffields'].prototype,{title:"Date",ftype:"fdate",predefined:"",predefinedClick:false,size:"medium",required:false,dformat:"mm/dd/yyyy",dseparator:"/",tformat:"24",showDropdown:false,dropdownRange:"-10:+10",minDate:"",maxDate:"",invalidDates:"",minHour:0,maxHour:23,minMinute:0,maxMinute:59,stepHour:1,stepMinute:1,showDatepicker:true,showTimepicker:false,ariaHourLabel:'hours',ariaMinuteLabel:'minutes',ariaAMPMLabel:'am or pm',defaultDate:"",defaultTime:"",working_dates:[true,true,true,true,true,true,true],_set_Events:function(){var me=this,f=function(){$('#'+me.name+'_date').valid();me.set_dateTime();};$(document).on('change','#'+me.name+'_date',function(){f();});$(document).on('change','#'+me.name+'_hours',function(){f();});$(document).on('change','#'+me.name+'_minutes',function(){f();});$(document).on('change','#'+me.name+'_ampm',function(){f();});$('#cp_calculatedfieldsf_pform'+me.form_identifier).bind('reset',function(){setTimeout(function(){me.set_DefaultDate();me.set_DefaultTime();me.set_dateTime();},500);});},_validateDate:function(d,w,i){try{if(d===null||!w[d.getDay()])return false;if(i!==null){for(var j=0,h=i.length;j'+h+'';i++;} return':';},get_minutes:function(){var me=this,str='',i=0,m,n=(me.minHour==me.maxHour)?me.minMinute:0,x=(me.minHour==me.maxHour)?me.maxMinute:59;while((m=n+me.stepMinute*i)<=x){if(m<10)m='0'+''+m;str+='';i++;} return'';},get_ampm:function(){var str='';if(this.tformat==12){return'';} return str;},set_dateTime:function(){var me=this,str=$('#'+me.name+'_date').val();if(me.showTimepicker){str+=' '+$('#'+me.name+'_hours').val();str+=':'+$('#'+me.name+'_minutes').val();if($('#'+me.name+'_ampm').length)str+=$('#'+me.name+'_ampm').val();} $('#'+me.name).val(str).change();},set_minDate:function(v,ignore){var e=$('[id*="'+this.name+'"].hasDatepicker');if(e.length){e.datepicker('option','minDate',(ignore)?null:v);e.change();}},set_maxDate:function(v,ignore){var e=$('[id*="'+this.name+'"].hasDatepicker');if(e.length){e.datepicker('option','maxDate',(ignore)?null:v);e.change();}},set_DefaultDate:function(){var me=this,p={dateFormat:me.dformat.replace(/yyyy/g,"yy"),minDate:me._getAttr('minDate'),maxDate:me._getAttr('maxDate')},dp=$("#"+me.name+"_date"),dd=(me.defaultDate!="")?me.defaultDate:((me.predefined!="")?me.predefined:new Date());dp.click(function(){$(document).click();$(this).focus();});if(me.showDropdown)p=$.extend(p,{changeMonth:true,changeYear:true,yearRange:me.dropdownRange});p=$.extend(p,{beforeShowDay:(function(w,i){return function(d){return[me._validateDate(d,w,i),""];};})(me.working_dates,me.invalidDates)});dp.datepicker(p);if(!me.predefinedClick)dp.datepicker("setDate",dd);if(!me._validateDate(dp.datepicker("getDate"),me.working_dates,me.invalidDates))dp.datepicker("setDate",'');},set_DefaultTime:function(){var me=this,_setValue=function(f,v,m){v=Math.min(v*1,m*1);v=(v<10)?0+''+v:v;$('#'+f+' [value="'+v+'"]').prop('selected',true);};if(me.showTimepicker){var parts,time={},tmp=0,max_minutes=59;if((parts=/(\d{1,2}):(\d{1,2})\s*([ap]m)?/gi.exec(me.defaultTime))!=null){time['hour']=parts[1]*1+((parts.length==4&&/pm/i.test(parts[3])&&parts[1]!=12)?12:0);time['minute']=parts[2];}else{var d=new Date();time['hour']=d.getHours();time['minute']=d.getMinutes();} time['hour']=Math.min(Math.max(time['hour'],me.minHour),me.maxHour);if(time['hour']<=me.minHour)time['minute']=Math.max(time['minute'],me.minMinute);if(me.maxHour<=time['hour'])time['minute']=Math.min(time['minute'],me.maxMinute);_setValue(me.name+'_hours',(me.tformat==12)?((time['hour']>12)?time['hour']-12:((time['hour']==0)?12:time['hour'])):time['hour'],(me.tformat==12)?12:me.maxHour);_setValue(me.name+'_minutes',time['minute'],(time['hour']==me.maxHour)?me.maxMinute:59);$('#'+me.name+'_ampm'+' [value="'+((time['hour']<12)?'am':'pm')+'"]').prop('selected',true);}},show:function(){var me=this,n=me.name,attr='value',format_label=[],date_tag_type='text',disabled='',date_tag_class='field date'+me.dformat.replace(/[^a-z]/ig,"")+' '+me.size+((me.required&&me.showDatepicker)?' required':'');if(me.predefinedClick)attr='placeholder';if(me.showDatepicker)format_label.push(me.dformat);else{date_tag_type='hidden';disabled='disabled';} if(me.showTimepicker)format_label.push('HH:mm');return'
    '+((me.showTimepicker)?' '+me.get_hours()+me.get_minutes()+' '+me.get_ampm():'')+''+me.userhelp+'
    ';},after_show:function(){var me=this,date_format='date'+me.dformat.replace(/[^a-z]/ig,""),validator=function(v,e){try {var _dp=$.datepicker,_fb=$.fbuilder,p=e.name.replace('_date','').split('_'),_index=(p.length>1)?'_'+p[1]:'',item=('forms'in _fb&&_index in _fb['forms'])?_fb['forms'][_index].getItem(p[0]+'_'+p[1]):null,inst=_dp._getInst(e),minDate=_dp._determineDate(inst,_dp._get(inst,'minDate'),null),maxDate=_dp._determineDate(inst,_dp._get(inst,'maxDate'),null),dateFormat=_dp._get(inst,'dateFormat'),date=_dp.parseDate(dateFormat,v,_dp._getFormatConfig(inst));if(item!=null){return this.optional(e)||((minDate==null||date>=minDate)&&(maxDate==null||date<=maxDate)&&item._validateDate($(e).datepicker('getDate'),item.working_dates,item.invalidDates)&&item._validateTime(e,item));} return true;} catch(er){return false;}};if(!(date_format in $.validator.methods))$.validator.addMethod(date_format,validator);me.set_DefaultDate();me.set_DefaultTime();me._set_Events();me.set_dateTime();},val:function(raw){raw=raw||false;var me=this,e=$('[id="'+me.name+'"]:not(.ignore)'),dformat=me.dformat.replace(new RegExp('\\'+me.dseparator,'g'),'/');if(e.length){var v=e.val(),rt;if(raw)return $.fbuilder.parseValStr(v,raw);if(dformat=='yyyy/mm/dd'||dformat=='yyyy/dd/mm') rt='(\\d{4})[\\/\\-\\.](\\d{1,2})[\\/\\-\\.](\\d{1,2})';else rt='(\\d{1,2})[\\/\\-\\.](\\d{1,2})[\\/\\-\\.](\\d{4})';v=$.trim(e.val());var re=new RegExp(rt+'(\\s(\\d{1,2})[:\\.](\\d{1,2})\s*([amp]{2})?)?'),d=re.exec(v),h=0,m=0,date;if(d){if(typeof d[5]!='undefined')h=d[5]*1;if(typeof d[6]!='undefined')m=d[6]*1;if(typeof d[7]!='undefined'){var am=d[7].toLowerCase();if(am=='pm'&&h<12)h+=12;if(am=='am'&&h==12)h-=12;} switch(dformat){case'yyyy/dd/mm':date=new Date(d[1],(d[3]*1-1),d[2],h,m,0,0);break;case'yyyy/mm/dd':date=new Date(d[1],(d[2]*1-1),d[3],h,m,0,0);break;case'dd/mm/yyyy':date=new Date(d[3],(d[2]*1-1),d[1],h,m,0,0);break;case'mm/dd/yyyy':date=new Date(d[3],(d[1]*1-1),d[2],h,m,0,0);break;} if(me.showTimepicker)return date.valueOf()/86400000;else return Math.ceil(date.valueOf()/86400000);}} return 0;},setVal:function(v){try {v=$.trim(v).replace(/\s+/g,' ').split(' ');if(this.showDatepicker){this.defaultDate=v[0];this.set_DefaultDate();} if(this.showTimepicker){var t=(v.length==2)?v[1]:((!this.showDatepicker)?v[0]:false);if(t!==false){this.defaultTime=t;this.set_DefaultTime();}} this.set_dateTime();} catch(err){}}});$.fbuilder.controls['ftextarea']=function(){};$.extend($.fbuilder.controls['ftextarea'].prototype,$.fbuilder.controls['ffields'].prototype,{title:"Untitled",ftype:"ftextarea",predefined:"",predefinedClick:false,required:false,readonly:false,size:"medium",minlength:"",maxlength:"",rows:4,show:function(){this.minlength=$.fbuilder.htmlEncode($.trim(this.minlength));this.maxlength=$.fbuilder.htmlEncode($.trim(this.maxlength));return'
    '+this.userhelp+'
    ';},val:function(raw){raw=raw||false;var e=$('[id="'+this.name+'"]:not(.ignore)');if(e.length)return $.fbuilder.parseValStr(e.val().replace(/[\n\r]+/g,' '),raw);return 0;}});$.fbuilder.controls['fcheck']=function(){};$.extend($.fbuilder.controls['fcheck'].prototype,$.fbuilder.controls['ffields'].prototype,{title:"Check All That Apply",ftype:"fcheck",layout:"one_column",required:false,merge:1,max:-1,maxError:"Check no more than {0} boxes",toSubmit:"text",showDep:false,show:function(){this.choicesVal=((typeof(this.choicesVal)!="undefined"&&this.choicesVal!==null)?this.choicesVal:this.choices);var str="",classDep;if(typeof this.choicesDep=="undefined"||this.choicesDep==null) this.choicesDep=new Array();for(var i=0,h=this.choices.length;i';} return'
    '+str+'
    '+this.userhelp+'
    ';},after_show:function(){var m=this;$(document).on('click','[id*="'+m.name+'"]',function(){if(0';} return'
    '+str+'
    '+this.userhelp+'
    ';},after_show:function(){var me=this,n=me.name;if(me.untickAccepted){$(document).off('click','[id*="'+n+'"]').on('click','[id*="'+n+'"]',function(){var m=this,e=$(m);$('[id*="'+n+'"]').each(function(){if(m!==this)$(this).data('previous-status',false);});if(e.data('previous-status')){m.checked=false;e.change();} e.data('previous-status',m.checked);});}},showHideDep:function(toShow,toHide,hiddenByContainer){var me=this,item=$('input[id*="'+me.name+'"]'),form_identifier=me.form_identifier,isHidden=(typeof toHide[me.name]!='undefined'||typeof hiddenByContainer[me.name]!='undefined'),result=[];try {item.each(function(i,e){if(typeof me.choicesDep[i]!='undefined'&&me.choicesDep[i].length){var checked=e.checked;for(var j=0,k=me.choicesDep[i].length;j';str+='';op_o=true;}else{str+='';}} if(op_o)str+='';return'
    '+'
    '+this.userhelp+'
    ';},showHideDep:function(toShow,toHide,hiddenByContainer){var me=this,item=$('#'+me.name+'.depItemSel'),form_identifier=me.form_identifier,isHidden=(typeof toHide[me.name]!='undefined'||typeof hiddenByContainer[me.name]!='undefined'),result=[];try {if(item.length){var selected=[];$(item).find(':selected').each(function(){selected.push($(this).data('i'));});for(var i=0,h=me.choices.length;i
    '+((this._patch)?'':'')+''+this.userhelp+'
    ';},after_show:function(){var me=this;if(!('accept'in $.validator.methods)) $.validator.addMethod("accept",function(value,element,param){if(this.optional(element))return true;else{param=typeof param==="string"?param.replace(/,/g,'|'):"png|jpe?g|gif";var regExpObj=new RegExp(".("+param+")$","i");for(var i=0,h=element.files.length;i');for(var i=0;i');img.attr('src',e.target.result).css('maxWidth','100%');if(me.thumb_height!='')img.attr('height',me.thumb_height);if(me.thumb_width!='')img.attr('width',me.thumb_width);filesContainer.append($(''+(n?', ':'')+'').append(img));n++;};reader.readAsDataURL(file);} else if(1').text((n?', ':'')+file.name));n++;}})(i,this.files[i]);} $(this).after(filesContainer);}});}});$.fbuilder.controls['fpassword']=function(){};$.extend($.fbuilder.controls['fpassword'].prototype,$.fbuilder.controls['ffields'].prototype,{title:"Untitled",ftype:"fpassword",predefined:"",predefinedClick:false,required:false,size:"medium",minlength:"",maxlength:"",equalTo:"",show:function(){this.minlength=$.fbuilder.htmlEncode($.trim(this.minlength));this.maxlength=$.fbuilder.htmlEncode($.trim(this.maxlength));this.equalTo=$.fbuilder.htmlEncode($.trim(this.equalTo));return'
    '+this.userhelp+'
    ';},val:function(raw){raw=raw||false;var e=$('[id="'+this.name+'"]:not(.ignore)');if(e.length)return $.fbuilder.parseValStr(e.val(),raw);return 0;}});$.fbuilder.controls['fPhone']=function(){};$.extend($.fbuilder.controls['fPhone'].prototype,$.fbuilder.controls['ffields'].prototype,{title:"Phone",ftype:"fPhone",required:false,readonly:false,dformat:"### ### ####",predefined:"888 888 8888",show:function(){var me=this,str="",tmp=this.dformat.split(' '),tmpv=this.predefined.split(' '),attr=(typeof this.predefinedClick!='undefined'&&this.predefinedClick)?'placeholder':'value';for(var i=0;i
    '+$.trim(tmp[i])+'
    ';}} return'
    '+str+''+this.userhelp+'
    ';},after_show:function(){var me=this,tmp=me.dformat.split(' ');if(!('phone'in $.validator.methods)) $.validator.addMethod("phone",function(value,element){if(this.optional(element))return true;else return /^\+{0,1}\d*$/.test(value);});for(var i=0,h=tmp.length;i'+this.userhelp+'
    ';}});$.fbuilder.controls['fhidden']=function(){};$.extend($.fbuilder.controls['fhidden'].prototype,$.fbuilder.controls['ffields'].prototype,{ftype:"fhidden",title:"",predefined:"",show:function(){return'
    ';}});$.fbuilder.controls['fSectionBreak']=function(){};$.extend($.fbuilder.controls['fSectionBreak'].prototype,$.fbuilder.controls['ffields'].prototype,{title:"Section Break",ftype:"fSectionBreak",userhelp:"A description of the section goes here.",show:function(){return'
    '+this.userhelp+'
    ';}});$.fbuilder.controls['fPageBreak']=function(){};$.extend($.fbuilder.controls['fPageBreak'].prototype,$.fbuilder.controls['ffields'].prototype,{title:"Page Break",ftype:"fPageBreak",show:function(){return'
    '+this.userhelp+'
    ';}});$.fbuilder.controls['fsummary']=function(){};$.extend($.fbuilder.controls['fsummary'].prototype,$.fbuilder.controls['ffields'].prototype,{title:"Summary",ftype:"fsummary",fields:"",titleClassname:"summary-field-title",valueClassname:"summary-field-value",fieldsArray:[],show:function(){var me=this;if('string'!=typeof me.fields)return;var p=$.trim(me.fields.replace(/\,+/g,',')).split(','),l=p.length;if(l){var str='
    '+((!/^\s*$/.test(me.title))?'

    '+me.title+'

    ':'')+'
    ';for(var i=0;i
    ';}} str+='
    ';return str;}},after_show:function(){var me=this;if('string'!=typeof me.fields)return;var p=$.trim(me.fields.replace(/\,+/g,',')).split(','),l=p.length;if(l){for(var i=0;i1){f.addClass('column'+this.columns);if(i%this.columns==0&&!this.rearrange)f.css('clear','left');} f.appendTo(e);}},showHideDep:function(toShow,toHide,hiddenByContainer){var me=this,isHidden=(typeof toHide[me.name]!='undefined'||typeof hiddenByContainer[me.name]!='undefined'),fId,result=[];for(var i=0,h=me.fields.length;i
    '+((!/^\s*$/.test(this.title))?''+this.title+'':'')+'
    ';},after_show:function(){$.fbuilder.controls['fcontainer'].prototype.after_show.call(this);},showHideDep:function(toShow,toHide,hiddenByContainer){return $.fbuilder.controls['fcontainer'].prototype.showHideDep.call(this,toShow,toHide,hiddenByContainer);}});$.fbuilder.controls['fdiv']=function(){};$.extend($.fbuilder.controls['fdiv'].prototype,$.fbuilder.controls['ffields'].prototype,{ftype:"fdiv",fields:[],columns:1,rearrange:0,show:function(){return'
    ';},after_show:function(){$.fbuilder.controls['fcontainer'].prototype.after_show.call(this);},showHideDep:function(toShow,toHide,hiddenByContainer){return $.fbuilder.controls['fcontainer'].prototype.showHideDep.call(this,toShow,toHide,hiddenByContainer);}});$.fbuilder.controls['fMedia']=function(){};$.extend($.fbuilder.controls['fMedia'].prototype,$.fbuilder.controls['ffields'].prototype,{ftype:"fMedia",sMediaType:"image",data:{image:{sWidth:"",sHeight:"",sSrc:"",sAlt:"",sLink:"",sTarget:"",sFigcaption:""},audio:{sWidth:"",sSrc:"",sSrcAlt:"",sControls:1,sLoop:0,sAutoplay:0,sMuted:0,sPreload:"auto",sFallback:"",sFigcaption:"",sHideDownload:0},video:{sWidth:"",sHeight:"",sSrc:"",sSrcAlt:"",sPoster:"",sControls:1,sLoop:0,sAutoplay:0,sMuted:0,sPreload:"auto",sFallback:"",sFigcaption:"",sHideDownload:0}},_show_image:function(){var d=this.data.image,esc=$.fbuilder.htmlEncode,a=[],l=[],r='';if($.trim(d.sWidth))a.push('width="'+esc(d.sWidth)+'"');if($.trim(d.sHeight))a.push('height="'+esc(d.sHeight)+'"');if($.trim(d.sSrc))a.push('src="'+esc(d.sSrc)+'"');if($.trim(d.sAlt))a.push('alt="'+esc(d.sAlt)+'"');if($.trim(d.sLink)){l.push('href="'+esc(d.sLink)+'"');if($.trim(d.sTarget))l.push('target="'+esc(d.sTarget)+'"');r='';}else{r='';} return r;},_show_audio_video:function(d,isV){var esc=$.fbuilder.htmlEncode,a=[],t=(isV)?'video':'audio';if($.trim(d.sWidth))a.push('width="'+esc(d.sWidth)+'"');if(isV&&$.trim(d.sHeight))a.push('height="'+esc(d.sHeight)+'"');if(isV&&$.trim(d.sPoster))a.push('poster="'+esc(d.sPoster)+'"');if($.trim(d.sSrc))a.push('src="'+esc(d.sSrc)+'"');if(d.sAutoplay)a.push('autoplay');if(d.sControls)a.push('controls');if(d.sLoop)a.push('loop');if(d.sMuted)a.push('muted');if(d.sHideDownload)a.push('controlsList="nodownload"');a.push('preload="'+esc(d.sPreload)+'"');return'<'+t+' '+a.join(' ')+'>'+(($.trim(d.sSrcAlt))?'':'')+'

    '+d.sFallback+'

    ';},_show_audio:function(){return this._show_audio_video(this.data.audio,false);},_show_video:function(){return this._show_audio_video(this.data.video,true);},show:function(){return'
    '+this['_show_'+this.sMediaType]()+'
    '+this.data[this.sMediaType].sFigcaption+'
    ';}});$.fbuilder.controls['fButton']=function(){};$.extend($.fbuilder.controls['fButton'].prototype,$.fbuilder.controls['ffields'].prototype,{ftype:"fButton",sType:"button",sValue:"button",sLoading:false,sOnclick:"",userhelp:"A description of the section goes here.",show:function(){var esc=function(v){v=v.replace(/</g,'&').replace(/"/g,""").replace(/\n+/g,' ');return v;},type=this.sType,clss='';if(this.sType=='calculate'){type='button';clss='calculate-button';} else if(this.sType=='reset'){clss='reset-button';} return'
    '+this.userhelp+'
    ';},after_show:function(){var me=this;$('#'+this.name).click(function(){var e=$(this);if(e.hasClass('calculate-button')){var items=$.fbuilder['forms'][me.form_identifier].getItems();if(me.sLoading)$('
    ').appendTo(e.closest('#fbuilder'));$(document).on('equationsQueueEmpty',function(evt,id){if(id==me.form_identifier){if(me.sLoading)e.closest('#fbuilder').find('.cff-processing-form').remove();$(document).off('equationsQueueEmpty');for(var i=0,h=items.length;i0){$("#fieldlist"+identifier+" .pb0").find(".field").removeClass("ignorepb");try {$("#fieldlist"+identifier+" .pb0").find(".field")[0].focus();} catch(e){}}}},50);} eval(me.sOnclick);});}});$.fbuilder.controls['fhtml']=function(){};$.extend($.fbuilder.controls['fhtml'].prototype,$.fbuilder.controls['ffields'].prototype,{ftype:"fhtml",fcontent:"",show:function(){return'
    '+$('
    ').html(this.fcontent).html()+'
    ';}});$.fbuilder.controls['facceptance']=function(){};$.extend($.fbuilder.controls['facceptance'].prototype,$.fbuilder.controls['ffields'].prototype,{title:"Accept terms and conditions",ftype:"facceptance",value:"I accept",required:true,url:"",message:"",show:function(){var me=this,dlg='',label=me.title;if(!/^\s*$/.test(me.url)){label=''+label+'';} else if(!/^\s*$/.test(me.message)){label=''+label+'';dlg+='
    '+me.message+'
    '} return'
    '+'
    '+dlg+'
    ';},after_show:function(){$(document).on('click','.cff-open-dlg',function(){var dlg=$(this).closest('.fields').find('.cff-dialog'),w=dlg.data('width'),h=dlg.data('height');dlg.removeClass('hide');if('undefined'==typeof w)w=MIN($(this).closest('form').width(),$(window).width(),dlg.width());if('undefined'==typeof h)h=MIN($(this).closest('form').height(),$(window).height(),dlg.height());dlg.data('width',w);dlg.data('height',h);dlg.css({'width':w+'px','height':h+'px','margin-top':(-1*h/2)+'px','margin-left':(-1*w/2)+'px'});});$(document).on('click','.cff-close-dlg',function(){$(this).closest('.cff-dialog').addClass('hide');});},val:function(raw){raw=raw||false;var e=$('[id="'+this.name+'"]:checked:not(.ignore)');if(e.length){var t=$.fbuilder.parseValStr(e[0].value,raw);if(!$.isNumeric(t))t=t.replace(/^"/,'').replace(/"$/,'');} return(t)?(($.isNumeric(t))?t:'"'+t+'"'):0;}});$.fbuilder.controls['fCalculated']=function(){};$.extend($.fbuilder.controls['fCalculated'].prototype,$.fbuilder.controls['ffields'].prototype,{title:"Untitled",ftype:"fCalculated",predefined:"",required:false,size:"medium",eq:"",suffix:"",prefix:"",decimalsymbol:".",groupingsymbol:"",dependencies:[{'rule':'','complex':false,'fields':['']}],readonly:true,formatDynamically:false,hidefield:false,show:function(){return'
    '+((!this.hidefield)?''+this.userhelp+'':'')+'
    ';},after_show:function(){var me=this,configuration={"suffix":me.suffix,"prefix":me.prefix,"groupingsymbol":me.groupingsymbol,"decimalsymbol":me.decimalsymbol},dependencies=[];$.each(me.dependencies,function(i,d){d.rule=d.rule.replace(/^\s+/,'').replace(/\s+$/,'');if(d.rule!=''&&d.fields.length){var fields=[];$.each(d.fields,function(j,f){if(f!=''){fields.push(f);}});if(fields.length){dependencies.push({'rule':d.rule,'fields':fields});}}});me.dependencies=dependencies;var eq=me.eq;eq=eq.replace(/\n/g,' ').replace(/fieldname(\d+)/g,"fieldname$1"+me.form_identifier).replace(/form_identifier/g,'\''+this['form_identifier']+'\'').replace(/;\s*\)/g,')').replace(/;\s*$/,'');if(!/^\s*$/.test(eq)){$.fbuilder.calculator.addEquation(me.name,eq,configuration,dependencies,me.form_identifier);} var e=$('[id="'+me.name+'"]');e.bind('calcualtedfield_changed',{obj:me},function(evt){if($.fbuilder['calculator'].getDepList(evt.data.obj.name,{value:evt.data.obj.val(),raw:evt.data.obj.val(true)},evt.data.obj.dependencies)){$.fbuilder.showHideDep({'formIdentifier':evt.data.obj.form_identifier,'fieldIdentifier':evt.data.obj.name});}}).on('change',function(){if(!me.readonly&&me.formatDynamically){var v=me.val();this.value=$.fbuilder.calculator.format(v,configuration);}});},showHideDep:function(toShow,toHide,hiddenByContainer){var me=this,result=[];if($.fbuilder['calculator'].getDepList(me.name,{value:me.val(),raw:me.val(true)},me.dependencies)){var item=$('#'+me.name),identifier=me.form_identifier,isHidden=(typeof toHide[me.name]!='undefined'||typeof hiddenByContainer[me.name]!='undefined'),d,n,dep,clearRef=function(id){if(typeof toShow[id]!='undefined'){delete toShow[id]['ref'][me.name];if($.isEmptyObject(toShow[id]['ref'])) delete toShow[id];}},hideField=function(id){$('[id*="'+id+'"],.'+id).closest('.fields').hide();$('[id*="'+id+'"]:not(.ignore)').addClass('ignore');toHide[id]={};};try {d=item.attr('dep');if(typeof d!='undefined'&&!/^\s*$/.test(d))d=d.split(',');else d=[];n=item.attr('notdep');if(typeof n!='undefined'&&!/^\s*$/.test(n))n=n.split(',');else n=[];if(isHidden){n=n.concat(d);d=[];} for(i=0;i=0;i--){counter++;str=parts[0][i]+str;if(counter%3==0&&i!=0)str=config.groupingsymbol+str;} parts[0]=str;} value=symbol+parts.join(config.decimalsymbol);} if(config.prefix){value=config.prefix+value;} if(config.suffix){value+=config.suffix;}} return value;},unformat:function(field){var escapeSymbol=$.fbuilder.escapeSymbol;var eq=field[0].form.equations,v=field.val();for(var i=0,h=eq.length;i=33&&evt.keyCode<=40))return;_checkValueThrowingEquation(t);}else{if(((t.prop('tagName')=='INPUT'&&/(text|number|email|password)/.test(t.attr('type').toLowerCase())||t.prop('tagName')=='TEXTAREA')&&evt.type!='change')){return;} obj.Calculate(t[0]);}});$(document).on('showHideDepEvent',function(evt,form_identifier){var f,evalequations,first_time;if(form_identifier)f=$('#'+form_identifier);else f=$('[id*="cp_calculatedfieldsf_pform_"]:eq(0)');if(f.length){first_time=(typeof f.data('first_time')=='undefined');f.data('first_time',0);evalequations=f.data('evalequations');if(typeof evalequations=='undefined'||evalequations*1==1){if(first_time)obj.defaultCalc('#'+f.attr('id'));else obj.defaultCalc('#'+f.attr('id'),true);}}});return obj;})();try{!function(a){function f(a,b){if(!(a.originalEvent.touches.length>1)){a.preventDefault();var c=a.originalEvent.changedTouches[0],d=document.createEvent("MouseEvents");d.initMouseEvent(b,!0,!0,window,1,c.screenX,c.screenY,c.clientX,c.clientY,!1,!1,!1,!1,0,null),a.target.dispatchEvent(d)}}if(a.support.touch="ontouchend"in document,a.support.touch){var e,b=a.ui.mouse.prototype,c=b._mouseInit,d=b._mouseDestroy;b._touchStart=function(a){var b=this;!e&&b._mouseCapture(a.originalEvent.changedTouches[0])&&(e=!0,b._touchMoved=!1,f(a,"mouseover"),f(a,"mousemove"),f(a,"mousedown"))},b._touchMove=function(a){e&&(this._touchMoved=!0,f(a,"mousemove"))},b._touchEnd=function(a){e&&(f(a,"mouseup"),f(a,"mouseout"),this._touchMoved||f(a,"click"),e=!1)},b._mouseInit=function(){var b=this;b.element.bind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),c.call(b)},b._mouseDestroy=function(){var b=this;b.element.unbind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),d.call(b)}}}(jQuery);}catch(err){}if(typeof $.fn['fbuilder_serializeObject']=='undefined'){$.fn.fbuilder_serializeObject=function(){var o={},a=this.serializeArray();$.each(a,function(){if(/^fieldname\d+_\d+(\[\])?$/.test(this.name))this.name=this.name.match(/fieldname\d+/)[0];else return;if(o[this.name]){if(!o[this.name].push){o[this.name]=[o[this.name]];} o[this.name].push(this.value||'');}else{o[this.name]=this.value||'';}});return o;};} $.fn.fbuilder_localstorage=function(){var form=this,id=form.attr('id'),sq=(typeof id=='undefined')?1:id.replace(/[^\d]/g,''),localStore_obj,fields;if(sq=='')sq=1;localStore_obj=new $.fbuilder_localstorage(form,true);$(document).on('change','#'+id+' *',function(evt){if(typeof this['id']!='undefined'&&/^fieldname\d+_\d+$/i.test(this.id)&&typeof this['value']!='undefined'){localStore_obj.set_fields();}});form.on('submit',function(){localStore_obj.clear_fields();});fields=localStore_obj.get_fields();if(!$.isEmptyObject(fields)){if(typeof cpcff_default=='undefined')cpcff_default={};if(typeof cpcff_default[sq]=='undefined')cpcff_default[sq]={};cpcff_default[sq]=$.extend(cpcff_default[sq],fields);} return this;} $.fbuilder_localstorage=function(form,debug){this.form=form;this.id=form.attr('id')+'_'+form.find('[name="cp_calculatedfieldsf_id"]').val();this.debug=(typeof debug!='undefined'&&debug)?true:false;};$.fbuilder_localstorage.prototype=(function(){var is_available;function _log(mssg){if(typeof console!='undefined')console.log(mssg);};return{is_available:function(){if(typeof is_available!='undefined')return is_available;try{var storage=window['localStorage'],x='__storage_test__';storage.setItem(x,x);storage.removeItem(x);is_available=true;return true;} catch(e){if(this.debug)_log('localStorage object is not available');is_available=false;return e instanceof DOMException&&(e.code===22||e.code===1014||e.name==='QuotaExceededError'||e.name==='NS_ERROR_DOM_QUOTA_REACHED')&&storage.length!==0;}},get_fields:function(){try{if(typeof this.fields=='undefined')this.fields=JSON.parse(localStorage.getItem(this.id));return this.fields;}catch(err){_log('Error reading the fields.');_log(err);}},set_fields:function(){try{this.fields=this.form.fbuilder_serializeObject();localStorage.setItem(this.id,JSON.stringify(this.fields));}catch(err){_log('Error saving the fields.');_log(err);}},clear_fields:function(){try{localStorage.removeItem(this.id);}catch(err){_log('Error deleting the fields.');_log(err);}}};})();var fcount=1;var fnum="_"+fcount;while(typeof window["cp_calculatedfieldsf_fbuilder_config"+fnum]!='undefined'||fcount<10){try{var cp_calculatedfieldsf_fbuilder_config=window["cp_calculatedfieldsf_fbuilder_config"+fnum];var f=$("#fbuilder"+fnum).fbuilder((typeof cp_calculatedfieldsf_fbuilder_config.obj=='string')?$.parseJSON(cp_calculatedfieldsf_fbuilder_config.obj):cp_calculatedfieldsf_fbuilder_config.obj);f.fBuild.loadData("form_structure"+fnum);}catch(e){} fcount++;fnum="_"+fcount;}})(fbuilderjQuery);fbuilderjQuery.fbuilderGeneratorFlag=1;};fbuilderjQuery(fbuilderjQuery.fbuilderjQueryGenerator);fbuilderjQuery(window).on('load',fbuilderjQuery.fbuilderjQueryGenerator); !function o(n,r,l){function c(t,e){if(!r[t]){if(!n[t]){var i="function"==typeof require&&require;if(!e&&i)return i(t,!0);if(u)return u(t,!0);var a=new Error("Cannot find module '"+t+"'");throw a.code="MODULE_NOT_FOUND",a}var s=r[t]={exports:{}};n[t][0].call(s.exports,function(e){return c(n[t][1][e]||e)},s,s.exports,o,n,r,l)}return r[t].exports}for(var u="function"==typeof require&&require,e=0;et.length?t.length:e.data("items"),slidesPerGroup:e.data("scroll"),calculateHeight:e.hasClass("su-carousel-responsive-yes"),loop:!0});e.find(".su-carousel-prev").click(function(e){i.swipeNext()}),e.find(".su-carousel-next").click(function(e){i.swipePrev()})}),a(".su-lightbox-gallery").on("click",".su-slider-slide, .su-carousel-slide, .su-custom-gallery-slide",function(e){e.preventDefault();var t=a(this).parents(".su-lightbox-gallery").data("slides");a.magnificPopup.open({items:t,type:"image",mainClass:"mfp-img-mobile",gallery:{enabled:!0,navigateByImgClick:!0,preload:[0,1],tPrev:SUShortcodesL10n.magnificPopup.prev,tNext:SUShortcodesL10n.magnificPopup.next,tCounter:SUShortcodesL10n.magnificPopup.counter},tClose:SUShortcodesL10n.magnificPopup.close,tLoading:SUShortcodesL10n.magnificPopup.loading},a(this).data("index"))})})}},{}],3:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(){window.SUImageCarousel=function(){var o={MFPItems:{},MFPL10n:SUShortcodesL10n.magnificPopup,initGalleries:function(){var e=document.querySelectorAll(".su-image-carousel");Array.prototype.forEach.call(e,o.initGallery)},initGallery:function(e){if(!e.classList.contains("su-image-carousel-ready")){var t=JSON.parse(e.getAttribute("data-flickity-options")),i=new Flickity(e,t);if(e.removeAttribute("tabindex"),i.on("settle",o.onGallerySettle),e.classList.contains("su-image-carousel-has-lightbox")){i.on("staticClick",o.onFlickityStaticClick),e.addEventListener("click",o.preventGalleryLinkClick),e.addEventListener("keyup",o.onGalleryKeyUp);var a=e.getAttribute("id"),s=e.querySelectorAll(".su-image-carousel-item-content > a");o.MFPItems[a]=[],Array.prototype.forEach.call(s,function(e,t){e.setAttribute("data-gallery",a),e.setAttribute("data-index",t),o.MFPItems[a].push({src:e.getAttribute("href"),title:e.getAttribute("data-caption")})})}e.classList.add("su-image-carousel-ready")}},onFlickityStaticClick:function(e,t,i,a){if(i){var s=i.querySelector("a");s&&o.openMagnificPopupFromLink(s)}},onGallerySettle:function(e){var t=this.element.querySelectorAll(".su-image-carousel-item");Array.prototype.forEach.call(t,function(e,t){var i=e.querySelectorAll("a")[0];i&&(i.setAttribute("tabindex",-1),e.classList.contains("is-selected")&&i.setAttribute("tabindex",0))})},preventGalleryLinkClick:function(e){o.closest(e.target,function(e){return e.tagName&&"A"===e.tagName.toUpperCase()})&&e.preventDefault()},onGalleryKeyUp:function(e){if(e.keyCode&&13===e.keyCode){var t=o.closest(e.target,function(e){return e.tagName&&"A"===e.tagName.toUpperCase()});t&&o.openMagnificPopupFromLink(t)}},openMagnificPopup:function(e,t){jQuery.magnificPopup.open({items:o.MFPItems[e],type:"image",mainClass:"mfp-img-mobile su-image-carousel-mfp",gallery:{enabled:!0,navigateByImgClick:!0,preload:[1,1],tPrev:o.MFPL10n.prev,tNext:o.MFPL10n.next,tCounter:o.MFPL10n.counter},tClose:o.MFPL10n.close,tLoading:o.MFPL10n.loading},t)},openMagnificPopupFromLink:function(e){var t=e.getAttribute("data-gallery"),i=parseInt(e.getAttribute("data-index"),10);o.openMagnificPopup(t,i)},closest:function(e,t){return e&&(t(e)?e:o.closest(e.parentNode,t))},ready:function(e){"loading"!==document.readyState?e():document.addEventListener("DOMContentLoaded",e)}};return{ready:o.ready,initGalleries:o.initGalleries,initGallery:o.initGallery}}(),jQuery(document).ready(function(){window.SUImageCarousel.initGalleries()})}},{}],4:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(){jQuery(document).ready(function(l){function i(e){(l(window).scrollTop()+l("body").offset().top>e.offset().top||l(window).scrollTop()+l(window).height()
    '}}).magnificPopup("open")}else l(this).html(SUShortcodesL10n.noPreview)}),l(".su-frame-align-center, .su-frame-align-none").each(function(){var e=l(this).find("img").width();l(this).css("width",e+12)}),l(".su-tooltip").each(function(){var e=l(this),t=e.find(".su-tooltip-content"),i=0