!function(window,document,$,undefined){"use strict";parent&&parent.postMessage("site_loaded","*");var app={appp:"undefined"!=typeof window.appp?window.appp:!1,woo:"undefined"!=typeof window.apppwoo?window.apppwoo:!1,snapper:new Snap({element:document.getElementById("page"),disable:"right",hyperextensible:!1,touchToDrag:!1}),spinner:null,scriptsLoaded:{},stylesLoaded:{},xhr:[],scriptsLoadedCount:0,stylesLoadedCount:0,backhref:"",backLoad:!1,history:[],laststate:window.location.href,timeout:!1,isWidth600:!0,$:{},modalID:""};app.cacheSelectors=function(){app.$.body=$("body"),app.$.main=$("#main"),app.$.ajaxModal=$("#ajaxModal"),app.$.modalInside=$(".modal-inside"),app.$.ioModal=$(".io-modal")},app.init=function(){app.cacheSelectors();var a;if(app.appp){if(app.log("window.appp",app.appp),app.log("window.apppwoo",app.woo),(app.isMSIE()||app.isFirefox())&&jQuery("[aria-hidden='true']").css("display","none"),setTimeout(function(){app.scriptLoader(),app.styleLoader(),app.setCurrentNav()},1e3),appp.can_ajax?(window.history.replaceState({},"",window.location.href),(0===app.history.length||app.history.length&&app.history[0].url!=window.location.href)&&app.history.unshift({url:window.location.href}),sessionStorage.urlHistory||(sessionStorage.urlHistory=JSON.stringify(app.history))):($(".pull-left .back").on("click",function(){window.history.back()}),1==window.history.length&&$(".pull-left .back").hide()),app.$.body.append('
").append($.parseHTML(c,document,!0)),e=d.find("#main"),i={title:d.find("title"),navtitle:d.find(".site-title-wrap h1")},j=e.attr("class").replace("site-main",""),k=e.children().unwrap(),l=d.find("#top-menu3"),m=d.find(".pull-left"),n=(d.find(".io-modal"),d.find("#activity-post-form")),o=app.scriptLoader(d.find("script[src]")),p=app.styleLoader(d.find('link[type="text/css"]'));app.$.body.attr("class",j),app.$.main.attr("class",j),f.title.text(i.title.text()),f.navtitle.html(i.navtitle.html()),$("#top-menu3").replaceWith(l),$(".pull-left").replaceWith(m),$("#activity-post-form").replaceWith(n),b.html(k),app.change_url(a),app.timeout=setTimeout(function(){$.each(o,function(a,b){app.log("$.each(scripts)",a,b);var c=app.loadScript(b,!0,function(){app.scriptsLoadedCount++,app.log("script retrieved",b),app.log("scripts retrieved",app.scriptsLoadedCount)});c&&(c.done(function(a,b,c){}).fail(function(a,c,d){app.log("loadScript: Triggered ajaxError handler for: "+b,d)}),app.xhr.push(c))}),$.each(p,function(a,b){app.log("$.each(styles)",a,b),app.loadCSS(b),app.stylesLoadedCount++,app.log("style retrieved",b),app.log("styles retrieved",app.stylesLoadedCount)})},30),$(document).trigger("load_ajax_content_done",$,b,a),app.$.body.trigger("post-load",$,b,a),parent&&parent.postMessage("load_ajax_content_done","*")}).complete(function(a,b){var c;app.$.spinner.fadeOut("fast"),"success"===b&&(app.$.main.animate({scrollTop:0},"fast"),$(d).parents().hasClass("footer-menu")&&(c=$(d).attr("href"),$(".footer-menu li").removeClass("current_page_item"),$(d).parent().addClass("current_page_item"),$("#site-navigation ul.menu li").removeClass("current_page_item"),$('#site-navigation ul.menu a[href="'+c+'"]').parent().addClass("current_page_item")),$(d).parents().hasClass("menu")&&(c=$(d).attr("href"),$("#site-navigation ul.menu li").removeClass("current_page_item"),$(d).parent().addClass("current_page_item"),$(".footer-menu li").removeClass("current_page_item"),$('.footer-menu a[href="'+c+'"]').parent().addClass("current_page_item")))});app.xhr.push(i),app.doingAjax=!1}}}},app.canAjax=function(a){return!1},app.canModal=function(a){return apppresser.appp.can_ajax&&!a.is("a.no-modal, .no-modal a")},app.change_url=function(a){a=a||apppresser.backhref,window.history.pushState({},"",a);var b=JSON.parse(sessionStorage.urlHistory);app.backLoad||(0===b.length||b.length&&b[0].url!=window.location.href)&&b.unshift({url:a}),sessionStorage.urlHistory=JSON.stringify(b),app.backLoad=!1},app.loadL10n=function(html){var inlineScripts=html.find("script[type='text/javascript']").text(),pattern=/\/\* \*\//,matches=inlineScripts.match(pattern),script=matches[1];eval(script)},app.loadScript=function(a,b,c){var d=!1,e=null;return $.isFunction(b)?(e=b,d=c||d):(d=b||d,e=c||e),$.ajax({url:a,type:"GET",dataType:"script",cache:d,success:e})},app.loadCSS=function(a){var b=$("
");$("head").append(b),b.attr({rel:"stylesheet",type:"text/css",href:a})},app.untrailingslashit=function(a){return"/"==a.substr(-1)?a.substr(0,a.length-1):a},app.log=function(){this.appp.debug&&console&&"function"==typeof console.log&&console.log.apply(console,arguments)},app.logGroup=function(a,b){this.appp.debug&&console&&"function"==typeof console.group&&(a===!0?console.groupEnd():"undefined"==typeof a?b?console.group():console.groupCollapsed():b?console.group(a):console.groupCollapsed(a))},app.isMSIE=function(){var a=window.navigator.userAgent,b=a.indexOf("MSIE ");return console.log(a),b>0||navigator.userAgent.match(/Trident.*rv\:11\./)?!0:!1},app.isFirefox=function(){return navigator.userAgent.toLowerCase().indexOf("firefox")>-1},app.newPassword=function(){var a=$(".reset-code-rsp");if(console.log("newPassword"),""===$("#lost_email").val())return a.html("Email required."),!1;a.html('
1>');var b={action:"app-lost-password",email:$("#lost_email").val(),nonce:$("#app_new_password").val()};console.dir(b);var c=$.ajax({type:"post",url:apppCore.ajaxurl,dataType:"json",data:b,success:function(b){console.dir(b),a.html(b.data.message),$("input[type=text]").val(""),$("input[type=password]").val("")},error:function(a){console.log("Password reset error "+a)}});return c},app.changePassword=function(){var a=$("#app-pw").val(),b=$("#app-pwr").val(),c=$("#reset-code").val(),d=$(".psw-msg");if(console.log("changePassword"),a!=b||""===a)return d.html("Passwords do not match."),!1;if(""===c)return d.html("Please enter your reset code."),!1;d.html('');var e={action:"app-validate-password",code:c,password:a,nonce:$("#app_new_password").val()},f=$.ajax({type:"post",url:apppCore.ajaxurl,dataType:"json",data:e,success:function(a){d.html(a.data.message),$("#app-pw").val(""),$("#app-pwr").val(""),a.data.success&&(d.append(" Logging you in..."),setTimeout(function(){window.location.reload()},1e3))}});return f},$("body").on("click","#app-new-password",app.newPassword).on("click","#app-change-password",app.changePassword),app.appendComment=function(a,b){var c;c=$($(".comment-list")?".comment-list":"#comments"),console.log("Append ",c),c.append('")},$("body").on("click","#respond #submit",function(){var a=$(this).closest("#respond").find("#comment"),b=$.trim(a.val());if(""===b)return alert(appp.i18n_required_comment_text),!1;var c=$(this).closest("#respond").find("#rating"),d=c.val();return c.size()>0&&!d&&"yes"===wc_single_product_params.review_rating_required&&""!==b?(alert(wc_single_product_params.i18n_required_rating_text),!1):void 0}),$("body").hasClass("logged-in")&&$(".ajax-comment-form-author, .ajax-comment-form-email, .ajax-comment-form-url").hide(),$("body").on("click",".comment-reply-link",function(){var a=/replytocom=([0-9]*)/,b=a.exec(this.href);$("#ajax-comment-parent").val(b[1]),$(".appp-comment-btn").trigger("click")}).on("click","#ajax-comment-form-submit #submit",function(){var a,b=$("#commentform"),c=$("#comment-status"),d=$(".ajax-comment-form-author #author").val(),e=$(".ajax-comment-form-email #email").val(),f=$(".ajax-comment-form-comment #comment").val(),g=$("#ajax-comment-parent").val(),h=$("body").hasClass("logged-in");if(h)$(".ajax-comment-form-author, .ajax-comment-form-email, .ajax-comment-form-url").hide(),a={comment_post_ID:$("#commentform #comment_post_ID").val(),comment:f,comment_parent:g};else{if(!d||!e||!f)return c.html('Please fill out required fields.
'),!1;a={author:d,email:e,url:$(".ajax-comment-form-url #url").val(),comment_post_ID:$("#commentform #comment_post_ID").val(),comment:f,comment_parent:g}}c.html('
Processing...
');var i=b.attr("action");return $.ajax({type:"post",url:i,data:a,error:function(a,b,d){c.html('
You might have left one of the fields blank, or be posting too quickly
')},success:function(a,e){"success"==e?(c.html('
Thanks for your comment. We appreciate your response.
'),app.appendComment(d,f),setTimeout(function(){$(".io-modal-close").trigger("click")},1500)):(c.html('
Please wait a while before posting your next comment
'),b.find("textarea[name=comment]").val(""))}}),!1}),app.init(),window.apppresser=app}(window,document,jQuery);
'+b+"