$((function(){var ajaxSetup={url:PF.obj.config.json_api,cache:!1,dataType:"json",data:{auth_token:PF.obj.config.auth_token}};void 0!==PF.obj.config.session_id&&(ajaxSetup.data.session_id=PF.obj.config.session_id),$.ajaxSetup(ajaxSetup),$(window).bind("beforeunload",(function(){if("continue"!=$("form",PF.obj.modal.selectors.root).data("beforeunload"))return $(PF.obj.modal.selectors.root).is(":visible")&&PF.fn.form_modal_has_changed()?PF.fn._s("All the changes that you have made will be lost if you continue."):void 0})),$(window).bind("hashchange",(function(){"#edit"!=window.location.hash||$(PF.obj.modal.selectors.root).exists()||$("[data-modal=edit]").first().click()})),PF.fn.bindtipTip();var resizeTimer,scrollTimer,width=$(window).width(),State;if($(window).on("resize",(function(){PF.fn.growl.fixPosition(),PF.fn.modal.fixScrollbars();var device=PF.fn.getDeviceName(),handled=["phone","phablet"],desktop=["tablet","laptop","desktop"];clearTimeout(void 0),clearTimeout(scrollTimer),scrollTimer=setTimeout((function(){$(".follow-scroll-wrapper, .follow-scroll-placeholder").removeClass("position-fixed").attr("style",""),$("html").hasScrollBar().vertical&&(PF.obj.follow_scroll.set(!0),PF.obj.follow_scroll.process(!0))}),25);var new_device=PF.fn.getDeviceName(),cols_fn;((new_device!==device&&$.inArray(device,handled)>=0&&-1==$.inArray(new_device,handled)||$.inArray(device,desktop)>=0&&-1==$.inArray(new_device,desktop))&&PF.fn.close_pops(),$(".top-bar").css("top",""),$(PF.fn.topMenu.vars.menu).css("height",$(window).height()),$("body").css({position:"",height:""}),$(".antiscroll").removeClass("jsly").data("antiscroll",""),$(".antiscroll-inner").css({height:"",width:"",maxheight:""}),PF.fn.list_fluid_width(),width!==$(window).width())&&($("[data-action=top-bar-menu-full]","#top-bar").hasClass("current")&&PF.fn.topMenu.hide(0),PF.fn.listing.columnizer(!0,0),$(PF.obj.listing.selectors.list_item).show());width=$(window).width()})),$(document).on("click","html",(function(){PF.fn.close_pops()})),$("html").hasClass("no-svg")&&$("img.replace-svg").replace_svg(),$(document).on("keydown",".numeric-input",(function(e){e.keydown_numeric()})),$(document).on("click","[data-scrollto]",(function(e){var target=$(this).data("scrollto"),$target=$(target.match(/^\#|\./)?target:"#"+target);$target.exists()?PF.fn.scroll($target):console.log("PF scrollto error: target doesn't exists",$target)})),$(document).on("click focus","[data-login-needed], [data-user-logged=must]",(function(e){if(!PF.fn.is_user_logged())return e.preventDefault(),e.stopPropagation(),window.location.href=PF.obj.vars.urls.login,!1})),$(document).on("click","[data-trigger]",(function(e){if(e.isPropagationStopped())return!1;var trigger=$(this).data("trigger"),$target=$(trigger.match(/^\#|\./)?trigger:"#"+trigger);$target.exists()?(e.stopPropagation(),e.preventDefault(),$target.closest(PF.obj.modal.selectors.root).length||PF.fn.modal.close(),$target.click()):console.log("PF trigger error: target doesn't exists",$target)})),$("form[method=post]").each((function(){$("input[name=auth_token]",this).exists()||$(this).append($("",{type:"hidden",name:"auth_token",value:PF.obj.config.auth_token}))})),$(document).on("click",".clear-form",(function(){$(this).closest("form")[0].reset()})),$(document).on("submit","form[data-action=validate]",(function(e){var type=$(this).data("type"),errors=!1,$validate;if($(this).find("[required], [data-validate]").each((function(){var input_type=$(this).attr("type"),pattern=$(this).attr("pattern"),errorFn=function(el){$(el).highlight(),errors=!0};if($(this).is("[required]")&&""==$(this).val()){if($(this).is(":hidden")){var $hidden_target=$($($(this).data("highlight")).exists()?$(this).data("highlight"):"#"+$(this).data("highlight"));$($hidden_target).highlight()}errorFn(this)}if(void 0===pattern&&0==/mail|url/.test(input_type))return!0;pattern&&((pattern=new RegExp(pattern)).test($(this).val())||errorFn(this)),"email"!=input_type||$(this).val().isEmail()||errorFn(this)})),errors)return PF.fn.growl.expirable(PF.fn._s("Check the errors in the form to continue.")),!1})),$(document).on("change","select[data-combo]",(function(){var $combo=$("#"+$(this).data("combo"));$combo.exists()&&$combo.children(".switch-combo").hide();var $combo_container=$("#"+$(this).closest("select").data("combo")),$combo_target=$("[data-combo-value~="+$("option:selected",this).attr("value")+"]",$combo_container);$combo_target.exists()&&$combo_target.show().find("[data-required]").each((function(){$(this).attr("required","required")})),$(".switch-combo",$combo_container).each((function(){$(this).is(":visible")||$("[required]",this).attr("data-required",!0).removeAttr("required")}))})),$(document).on("keyup",(function(e){$this=$(e.target),27==e.keyCode&&$(PF.obj.modal.selectors.root).is(":visible")&&!$this.is(":input")&&$("[data-action=cancel],[data-action=close-modal]",PF.obj.modal.selectors.root).first().click()})),$(document).on("change",":input",(function(e){PF.fn.growl.close()})),$(document).on("keyup",":input",(function(e){$(".input-warning",$(this).closest(".input-label")).html("")})),$(document).on("blur",":input",(function(){var this_val=$.trim($(this).prop("value"));$(this).prop("value",this_val)})),$(document).on("click",":input[data-focus=select-all]",(function(){this.select()})),$(document).on("keyup change blur",":input[type=password]",(function(){var password=testPassword($(this).val()),$parent=$(this).closest("div");""==$(this).val()&&(password.percent=0,password.verdict=""),$("[data-content=password-meter-bar]",$parent).attr("data-veredict",password.verdict.replace(/ /g,"-")).width(password.percent),$("[data-text=password-meter-message]",$parent).removeClass("red-warning").text(""!==password.verdict?PF.fn._s(password.verdict):"")})),$(document).on("click","[rel=popup-link], .popup-link",(function(e){e.preventDefault();var href=$(this)[void 0!==$(this).attr("href")?"attr":"data"]("href");if(void 0!==href)return"mailto"==href.substring(0,6)&&PF.fn.isDevice(["phone","phablet"])?(window.location=href,!1):void PF.fn.popup({href:href})})),$(window).scroll((function(){PF.obj.follow_scroll.process()})),$(document).on("click","[data-modal=simple],[data-modal=html]",(function(){var $target=$("[data-modal="+$(this).data("target")+"], #"+$(this).data("target")).first();PF.fn.modal.call({template:$target.html(),buttons:!1})})),$(document).on("submit",PF.obj.modal.selectors.root+" form",(function(e){return!$(this).data("prevented")&&(void 0!==$(this).attr("method")&&void 0)})),$(document).on("click","[data-modal=edit],[data-modal=form],[data-confirm]",(function(e){e.preventDefault();var $this=$(this),$target;$this.is("[data-confirm]")?($target=$this,PF.obj.modal.type="confirm"):(0==($target=$("[data-modal="+$this.data("target")+"], #"+$this.data("target")).first()).length&&($target=$("[data-modal=form-modal], #form-modal").first()),0==$target.length&&console.log("PF Error: Modal target doesn't exists."),PF.obj.modal.type=$this.data("modal"));var args=$this.data("args"),submit_function=window[$target.data("submit-fn")],cancel_function=window[$target.data("cancel-fn")],onload_function=window[$target.data("load-fn")],submit_done_msg=$target.data("submit-done"),ajax={url:$target.data("ajax-url")||(void 0!==$target.data("is-xhr")?PF.obj.config.json_api:null),deferred:window[$target.data("ajax-deferred")]};if("function"!=typeof submit_function&&$target.data("submit-fn")){var submit_fn_split=$target.data("submit-fn").split(".");submit_function=window;for(var i=0;i

'+PF.fn._s("All the changes that you have made will be lost if you continue.")+'

'+PF.fn._s("or")+' '+PF.fn._s("continue anyway")+"
"),$(PF.obj.modal.selectors.changes_confirm).css("margin-top",-$(PF.obj.modal.selectors.changes_confirm).outerHeight(!0)/2).hide().fadeIn("fast")}else PF.fn.modal.close(),"#edit"==window.location.hash&&(window.location.hash="")},load:function(){"function"==typeof load_function&&load_function()},callback:function(){},ajax:ajax};PF.fn.modal.call($.extend(default_options,inline_options))}})),PF.fn.is_user_logged()||$("[data-login-needed]:input, [data-user-logged=must]:input").each((function(){$(this).attr("readonly",!0)})),$(document).on("keydown",PF.obj.modal.selectors.root+" input",(function(e){var $this=$(e.target),key=e.charCode||e.keyCode;13===key?13==key&&$("[data-action=submit]",PF.obj.modal.selectors.root).exists()&&!$this.is(".prevent-submit")&&$("[data-action=submit]",PF.obj.modal.selectors.root).click():PF.fn.growl.close()})),window.location.hash&&"#edit"==window.location.hash&&$("[data-modal=edit]").first().click(),$(document).on("click","[data-action=top-bar-menu-full]",(function(){var hasClass=$("[data-action=top-bar-menu-full]","#top-bar").hasClass("current");PF.fn.topMenu[hasClass?"hide":"show"]()})),$(document).on("click","[data-action=top-bar-search]",(function(){$("[data-action=top-bar-search-input]",".top-bar").removeClass("hidden").show(),$("[data-action=top-bar-search-input]:visible input").first().focus(),is_ios()&&!$(this).closest(PF.fn.topMenu.vars.menu).exists()&&$(".top-bar").css("position","absolute"),$("[data-action=top-bar-search]",".top-bar").hide()})),$(document).on("click",".input-search .icon-search",(function(e){$("input",e.currentTarget.offsetParent).focus()})),$(document).on("click",".input-search .icon-close, .input-search [data-action=clear-search]",(function(e){var $input=$("input",e.currentTarget.offsetParent);""==$input.val()?$(this).closest("[data-action=top-bar-search-input]").exists()&&($("[data-action=top-bar-search-input]",".top-bar").hide(),$("[data-action=top-bar-search]",".top-bar").removeClass("opened").show(),is_ios()&&"fixed"!==$(this).closest("#top-bar").css("position")&&$(".top-bar").css("position","fixed")):($(this).closest("[data-action=top-bar-search-input]").exists()||$(this).hide(),$input.val("").change())})),$(document).on("keyup change","input.search",(function(e){var $input=$(this),$div=$(this).closest(".input-search");if(!$(this).closest("[data-action=top-bar-search-input]").exists()){var todo=""==$input.val()?"hide":"show";$(".icon-close, [data-action=clear-search]",$div)[todo]()}})),$(document).on("click mouseenter",".pop-btn",(function(e){if(!PF.fn.isDevice(["phone","phablet"])||"mouseenter"!=e.type&&!$(this).hasClass("pop-btn-desktop")){var $this_click=$(e.target),$pop_btn,$pop_box,devices=$.makeArray(["phone","phablet"]),$this=$(this);if(("mouseenter"!=e.type||$(this).hasClass("pop-btn-auto"))&&!$(this).hasClass("disabled")&&(!$this_click.closest(".current").exists()||PF.fn.isDevice("phone")||$this_click.closest(".pop-btn-show").exists())){if(PF.fn.growl.close(),e.stopPropagation(),$pop_btn=$(this),$pop_box=$(".pop-box",$pop_btn),$pop_btn.addClass("opened"),$(".pop-box-inner",$pop_box).css("max-height",""),PF.fn.isDevice(devices)){var text=$(".btn-text,.text,.pop-btn-text",$pop_btn).first().text();void 0!==text&&""!=text||(text=PF.fn._s("Select")),$(".pop-box-header",$pop_box).exists()||$pop_box.prepend($("
",{class:"pop-box-header",html:text+''}))}else $(".pop-box-header",$pop_box).remove(),$pop_box.css({bottom:""});if($pop_box.hasClass("anchor-center")&&void 0===$pop_box.data("guidstr")&&(PF.fn.isDevice(devices)?$pop_box.css("margin-left",""):$pop_box.css("margin-left",-$pop_box.width()/2)),$this_click.is("[data-change]")&&($("li",$pop_box).removeClass("current"),$this_click.closest("li").addClass("current"),$("[data-text-change]",$pop_btn).text($("li.current a",$pop_box).text()),e.preventDefault()),$pop_box.exists()){var $this=e.istriggered?$(e.target):$(this);if(!($pop_box.is(":visible")&&$(e.target).closest(".pop-box-inner").exists()&&$this.hasClass("pop-keep-click"))){$(".pop-box:visible").not($pop_box).hide().closest(".pop-btn").removeClass("opened");var callback=function($pop_box){if($pop_box.is(":visible"))if(PF.fn.isDevice(devices))$(".antiscroll-inner",$pop_box).height("100%");else{var posMargin=$pop_box.css("marginLeft");void 0!==posMargin&&(posMargin=parseFloat(posMargin),$pop_box.css("marginLeft",""));var cutoff=$pop_box.getWindowCutoff();if(cutoff&&(cutoff.left||cutoff.right)&&cutoff.right'+selectors.join()+" { left: "+posArrow+"px; }").appendTo("head")}else $pop_box.css("marginLeft",posMargin+"px");$(".antiscroll-wrap:not(.jsly):visible",$pop_box).addClass("jsly").antiscroll()}else{var guidstr=$pop_box.attr("data-guidstr");$pop_box.css("marginLeft","").removeClass(guidstr).removeAttr("data-guidstr").closest(".pop-btn").removeClass("opened"),void 0!==guidstr&&$("style#"+guidstr).remove()}};if(PF.fn.isDevice(devices)){$(this).is("[data-action=top-bar-notifications]")&&$pop_box.css({height:$(window).height()});var pop_box_h=$pop_box.height()+"px",menu_top=parseInt($(".top-bar").outerHeight())+parseInt($(".top-bar").css("top"))+parseInt($(".top-bar").css("margin-top"))+parseInt($(".top-bar").css("margin-bottom"))+"px";$pop_box.is(":visible")?($("#pop-box-mask").css({opacity:0}),$pop_box.css({transform:"none"}),$this.closest(PF.fn.topMenu.vars.menu).exists()&&($(".top-bar").css({transform:"none"}),$(PF.fn.topMenu.vars.menu).css({height:$(window).height()+parseInt(menu_top)})),setTimeout((function(){$pop_box.hide().attr("style",""),$("#pop-box-mask").remove(),callback($pop_box),$this.closest(PF.fn.topMenu.vars.menu).exists()&&($(PF.fn.topMenu.vars.menu).css({height:""}),$(PF.fn.topMenu.vars.menu).animate({scrollTop:PF.fn.topMenu.vars.scrollTop},PF.obj.config.animation.normal/2))}),PF.obj.config.animation.normal),$("body").data("hasOverflowHidden")||$("body").removeClass("overflow-hidden")):($("#pop-box-mask").remove(),$pop_box.parent().prepend($("
",{id:"pop-box-mask",class:"fullscreen soft-black"}).css({zIndex:400,display:"block"})),PF.fn.topMenu.vars.scrollTop=$(PF.fn.topMenu.vars.menu).scrollTop(),setTimeout((function(){$("#pop-box-mask").css({opacity:1}),setTimeout((function(){$pop_box.show().css({bottom:"-"+pop_box_h,maxHeight:$(window).height(),zIndex:1e3,transform:"translate(0,0)"}),setTimeout((function(){$pop_box.css({transform:"translate(0,-"+pop_box_h+")"})}),1),setTimeout((function(){callback($pop_box)}),PF.obj.config.animation.normal),$("body").hasClass("overflow-hidden")?$("body").data("hasOverflowHidden",1):$("body").addClass("overflow-hidden"),$this.closest(PF.fn.topMenu.vars.menu).exists()&&($(".top-bar").css({transform:"translate(0, -"+menu_top+")"}),$(PF.fn.topMenu.vars.menu).css({height:$(window).height()+parseInt(menu_top)})),$(".pop-box-inner",$pop_box).css("height",$pop_box.height()-$(".pop-box-header",$pop_box).outerHeight(!0))}),1)}),1))}else $pop_box[$pop_box.is(":visible")?"hide":"show"](0,(function(){callback($pop_box)}))}}}}})).on("mouseleave",".pop-btn",(function(){if(PF.fn.isDevice(["laptop","desktop"])){var $pop_btn=$(this),$pop_box=$(".pop-box",$pop_btn);!$pop_btn.hasClass("pop-btn-auto")||PF.fn.isDevice(["phone","phablet"])&&$pop_btn.hasClass("pop-btn-auto")||(!PF.fn.isDevice(["phone","phablet","tablet"])&&$(this).hasClass("pop-btn-delayed")&&$(this).removeClass("pop-btn-auto"),$pop_box.hide().closest(".pop-btn").removeClass("opened"))}})),$(".pop-btn-delayed").delayedAction({delayedAction:function($element){var $el;PF.fn.isDevice(["phone","phablet","tablet"])||$(".pop-box-inner",$element).is(":hidden")&&$element.addClass("pop-btn-auto").click()},hoverTime:2e3}),window.location.hash,$(".content-tabs").exists()){var $tab=$("a",".content-tabs .current");History.replaceState({href:$tab.attr("href"),"data-tab":$tab.data("tab"),pushed:"tabs",statenum:0},null,null)}void 0===History.getState().data&&History.replaceState({scrollTop:0},document.title,window.location.href),History.Adapter.bind(window,"popstate",(function(){var State=History.getState();State.data&&void 0!==State.data.scrollTop&&$(window).scrollTop()!==State.data.scrollTop&&$(window).scrollTop(State.data.scrollTop)})),$("a",".content-tabs").click((function(e){if(1==$(this).data("link")&&$(this).data("tab",!1),$(this).closest(".current,.disabled").exists())e.preventDefault();else if(void 0!==$(this).data("tab")){var dataTab={};if($.each(this.attributes,(function(){dataTab[this.name]=this.value})),dataTab.pushed="tabs","classic"!=$("#"+dataTab["data-tab"]).data("load")){if(window.location.hash){var url=window.location.href;url=url.replace(window.location.hash,"")}History.pushState(dataTab,document.title,void 0!==url?url:$(this).attr("href")),e.preventDefault()}var $tab_menu=$("[data-action=tab-menu]",$(this).closest(".header"));$tab_menu.find("[data-content=current-tab-label]").text($(this).text()),$tab_menu.is(":visible")&&$tab_menu.click()}})),$(document).on("click","[data-action=tab-menu]",(function(){var $tabs=$(this).closest(".header").find(".content-tabs"),visible=$tabs.is(":visible"),$this=$(this);visible||($tabs.data("classes",$tabs.attr("class")),$tabs.removeClass((function(index,css){return(css.match(/\b\w+-hide/g)||[]).join(" ")})),$tabs.hide()),visible||$this.removeClass("current"),$tabs[visible?"hide":"show"](),visible&&($tabs.css("display","").addClass($tabs.data("classes")),$this.addClass("current"))})),$(window).bind("statechange",(function(e){var dataTab;PF.fn.growl.close(),(dataTab=History.getState().data)&&"tabs"==dataTab.pushed&&PF.fn.show_tab(dataTab["data-tab"])})),$(document).on("click",".list-item a",(function(e){""!=$(this).attr("src")&&History.replaceState({scrollTop:$(window).scrollTop()},document.title,window.location.href)})),$(document).on("click","[data-action=load-more]",(function(e){$(this).closest(".content-listing-more").hide(),!PF.fn.is_listing()||$(this).closest(PF.obj.listing.selectors.content_listing).is(":hidden")||$(this).closest("#content-listing-template").exists()||PF.obj.listing.calling||(PF.fn.listing.queryString.stock_new(),PF.obj.listing.query_string.seek=$(this).attr("data-seek"),PF.obj.listing.query_string.page=$(PF.obj.listing.selectors.content_listing_visible).data("page"),PF.obj.listing.query_string.page++,PF.fn.listing.ajax(),e.preventDefault())})),$(PF.obj.listing.selectors.list_item).length>0&&(PF.fn.listing.show(),$(window).scroll((function(){var $loadMore=$(PF.obj.listing.selectors.content_listing_load_more,PF.obj.listing.selectors.content_listing_visible).find("button[data-action=load-more]");$loadMore.length>0&&$(window).scrollTop()+$(window).innerHeight()>$(document).height()-300&&0==PF.obj.listing.calling&&$loadMore.click()}))),$(document).on("click",PF.obj.modal.selectors.root+" [data-switch]",(function(){var $this_modal=$(this).closest(PF.obj.modal.selectors.root);$("[data-view=switchable]",$this_modal).hide(),$("#"+$(this).attr("data-switch"),$this_modal).show()})),$(document).on("click","[data-toggle]",(function(){var $target=$("[data-content="+$(this).data("toggle")+"]"),show=!$target.is(":visible");$(this).html($(this).data("html-"+(show?"on":"off"))),$target.toggle()})),$(document).on("click","[data-action=cookie-law-close]",(function(){var $cookie=$(this).closest("#cookie-law-banner"),cookieName=void 0!==$cookie.data("cookie")?$cookie.data("cookie"):"PF_COOKIE_LAW_DISPLAY";Cookies.set(cookieName,0,{expires:365}),$cookie.remove()})),Clipboard=new Clipboard("[data-action=copy]",{text:function(trigger){var $target=$(trigger.getAttribute("data-action-target")),text;return($target.is(":input")?$target.val():$target.text()).trim()}}),Clipboard.on("success",(function(e){var $target;$(e.trigger.getAttribute("data-action-target")).highlight(),e.clearSelection()}))}));var PF={fn:{},str:{},obj:{}};PF.obj.config={base_url:"",json_api:"/json/",listing:{items_per_page:24},animation:{easingFn:"ease",normal:400,fast:250}},PF.obj.l10n={},PF.fn._s=function(string,s){var string;return void 0===string?string:(void 0!==PF.obj.l10n&&void 0!==PF.obj.l10n[string]?void 0===(string=PF.obj.l10n[string][0])&&(string=string):string=string,string=string.toString(),void 0!==s&&(string=sprintf(string,s)),string)},PF.fn._n=function(singular,plural,n){var string;return string=void 0===(string=void 0!==PF.obj.l10n&&void 0!==PF.obj.l10n[singular]?PF.obj.l10n[singular][1==n?0:1]:1==n?singular:plural)?singular:string.toString(),void 0!==n&&(string=sprintf(string,n)),string},PF.fn.extend_lang=function(strings){$.each(PF.obj.lang_strings,(function(i,v){void 0!==strings[i]&&$.extend(PF.obj.lang_strings[i],strings[i])}))},PF.fn.get_url_vars=function(){for(var match,pl=/\+/g,search=/([^&=]+)=?([^&]*)/g,decode=function(s){return decodeURIComponent(escape(s.replace(pl," ")))},query=window.location.search.substring(1),urlParams={};match=search.exec(query);)urlParams[decode(match[1])]=decode(match[2]);return urlParams},PF.fn.get_url_var=function(name){return PF.fn.get_url_vars()[name]},PF.fn.is_user_logged=function(){return $("#top-bar-user").exists()},PF.fn.generate_random_string=function(len){void 0===len&&(len=5);for(var text="",possible="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",i=0;i").text($.trim(value)).html()},PF.fn.htmlDecode=function(value){return $("
").html($.trim(value)).text()},PF.fn.nl2br=function(str){var breakTag="
";return(str+"").replace(/([^>\r\n]?)(\r\n|\n\r|\r|\n)/g,"$1
$2")},PF.fn.versionCompare=function(v1,v2,operator){this.php_js=this.php_js||{},this.php_js.ENV=this.php_js.ENV||{};var i=0,x=0,compare=0,vm={dev:-6,alpha:-5,a:-5,beta:-4,b:-4,RC:-3,rc:-3,"#":-2,p:1,pl:1},prepVersion=function(v){return(v=(v=(""+v).replace(/[_\-+]/g,".")).replace(/([^.\d]+)/g,".$1.").replace(/\.{2,}/g,".")).length?v.split("."):[-8]};for(numVersion=function(v){return v?isNaN(v)?vm[v]||-7:parseInt(v,10):0},v1=prepVersion(v1),v2=prepVersion(v2),x=Math.max(v1.length,v2.length),i=0;iv2[i]){compare=1;break}}if(!operator)return compare;switch(operator){case">":case"gt":return compare>0;case">=":case"ge":return compare>=0;case"<=":case"le":return compare<=0;case"==":case"=":case"eq":return 0===compare;case"<>":case"!=":case"ne":return 0!==compare;case"":case"<":case"lt":return compare<0;default:return null}},PF.fn.baseName=function(str){var base=new String(str).substring(str.lastIndexOf("/")+1);return-1!=base.lastIndexOf(".")&&(base=base.substring(0,base.lastIndexOf("."))),base},PF.fn.guid=function(){var d=(new Date).getTime();return"undefined"!=typeof performance&&"function"==typeof performance.now&&(d+=performance.now()),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(c){var r=(d+16*Math.random())%16|0;return d=Math.floor(d/16),("x"===c?r:3&r|8).toString(16)}))},PF.fn.md5=function(string){return SparkMD5.hash(string)},PF.fn.dataURItoBlob=function(dataURI){var byteString;byteString=dataURI.split(",")[0].indexOf("base64")>=0?atob(dataURI.split(",")[1]):unescape(dataURI.split(",")[1]);for(var mimeString=dataURI.split(",")[0].split(":")[1].split(";")[0],ia=new Uint8Array(byteString.length),i=0;i0|-(value<0),isHalf=value%1==.5*sgn,f=Math.floor(value),isHalf)switch(mode){case"PHP_ROUND_HALF_DOWN":value=f+(sgn<0);break;case"PHP_ROUND_HALF_EVEN":value=f+f%2*sgn;break;case"PHP_ROUND_HALF_ODD":value=f+!(f%2);break;default:value=f+(sgn>0)}return(isHalf?value:Math.round(value))/m},String.prototype.getBytes=function(){var units=["KB","MB","GB","TB","PB","EB","ZB","YB"],suffix=this.toUpperCase().substr(-2);if(-1==units.indexOf(suffix))return this;var pow_factor=units.indexOf(suffix)+1;return parseFloat(this)*Math.pow(1e3,pow_factor)},String.prototype.formatBytes=function(round){var bytes=parseInt(this),units=["KB","MB","GB","TB","PB","EB","ZB","YB"];if(!$.isNumeric(this))return!1;if(bytes<1e3)return bytes+" B";if(void 0===round)var round=2;for(var i=0;i=acceptable_shortness&&stop_chars.indexOf(s[i])>=0));i++);return reverse?short_s.split("").reverse().join(""):short_s}return shortString(url,chunk_l,!1)+"..."+shortString(url,chunk_l,!0)},jQuery.extend({compare:function(a,b){var obj_str="[object Object]",arr_str="[object Array]",a_type=Object.prototype.toString.apply(a),b_type;return a_type===Object.prototype.toString.apply(b)&&(a_type===obj_str?$.compareObject(a,b):a_type===arr_str?$.compareArray(a,b):a===b)},compareArray:function(arrayA,arrayB){var a,b,i,a_type,b_type;if(arrayA===arrayB)return!0;if(arrayA.length!=arrayB.length)return!1;for(a=jQuery.extend(!0,[],arrayA),b=jQuery.extend(!0,[],arrayB),a.sort(),b.sort(),i=0,l=a.length;i0},jQuery.fn.replace_svg=function(){this.attr("src")&&$(this).each((function(){$(this).attr("src",$(this).attr("src").replace(".svg",".png"))}))},jQuery.fn.is_fluid=function(){return!0},jQuery.fn.bindFormData=function(){return $(":input",this).each((function(){var safeVal=PF.fn.htmlEncode($(this).val());if($(this).is("input")&&(this.setAttribute("value",this.value),this.checked?this.setAttribute("checked","checked"):this.removeAttribute("checked")),$(this).is("textarea")&&$(this).html(safeVal),$(this).is("select")){var index=this.selectedIndex,i=0;$(this).children("option").each((function(){i++!=index?this.removeAttribute("selected"):this.setAttribute("selected","selected")}))}})),this},jQuery.fn.formValues=function(data){var els=$(":input",this);return"object"!=typeof data?(data={},$.each(els,(function(){this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/color|date|datetime|datetime-local|email|month|range|search|tel|time|url|week|text|number|hidden|password/i.test(this.type))&&(this.name.match(/^.*\[\]$/)&&this.checked?(void 0===data[this.name]&&(data[this.name]=[]),data[this.name].push($(this).val())):data[this.name]=$(this).val())})),data):($.each(els,(function(){this.name.match(/^.*\[\]$/)&&"object"==typeof data[this.name]?$(this).prop("checked",-1!==data[this.name].indexOf($(this).val())):this.name&&data[this.name]?/checkbox|radio/i.test(this.type)?$(this).prop("checked",data[this.name]==$(this).val()):$(this).val(data[this.name]):/checkbox|radio/i.test(this.type)&&$(this).removeProp("checked")})),$(this))},jQuery.fn.storeformData=function(dataname){return void 0===dataname&&void 0!==$(this).attr("id")&&(dataname=$(this).attr("id")),void 0!==dataname&&$(this).data(dataname,$(this).formValues()),this},jQuery.fn.is_sameformData=function(dataname){var $this=$(this);return void 0===dataname&&(dataname=$this.attr("id")),jQuery.compare($this.formValues(),$this.data(dataname))},jQuery.Event.prototype.keydown_numeric=function(){var e=this;if(e.shiftKey)return e.preventDefault(),!1;var key=e.charCode||e.keyCode,target=e.target,value=""==$(target).val()?0:parseInt($(target).val());return 13==key||(46==key||8==key||9==key||27==key||65==key&&!0===e.ctrlKey||key>=35&&key<=40||void((key<48||key>57)&&(key<96||key>105)&&e.preventDefault()))},PF.fn.is_canvas_supported=function(){var elem=document.createElement("canvas");return!(!elem.getContext||!elem.getContext("2d"))},PF.fn.is_validity_supported=function(){var i;return"object"==typeof document.createElement("input").validity},PF.fn.getScrollBarWidth=function(){var inner=document.createElement("p");inner.style.width="100%",inner.style.height="200px";var outer=document.createElement("div");outer.style.position="absolute",outer.style.top="0px",outer.style.left="0px",outer.style.visibility="hidden",outer.style.width="200px",outer.style.height="150px",outer.style.overflow="hidden",outer.appendChild(inner),document.body.appendChild(outer);var w1=inner.offsetWidth;outer.style.overflow="scroll";var w2=inner.offsetWidth;return w1==w2&&(w2=outer.clientWidth),document.body.removeChild(outer),w1-w2},PF.str.ScrollBarWidth=PF.fn.getScrollBarWidth(),PF.fn.top_notifications_viewed=function(){var $top_bar_notifications=$("[data-action=top-bar-notifications]"),$notifications_lists=$(".top-bar-notifications-list",$top_bar_notifications),$notifications_count=$(".top-btn-number",$top_bar_notifications);$(".persistent",$top_bar_notifications).exists()?$notifications_count.text($(".persistent",$top_bar_notifications).length).addClass("on"):$notifications_count.removeClass("on")},PF.fn.bindtipTip=function($target,options){void 0===$target&&($target=$("body")),$target instanceof jQuery==0&&($target=$($target));var bindtipTipoptions={delay:0,content:!1,fadeIn:0};void 0!==options&&(void 0!==options.delay&&(bindtipTipoptions.delay=options.delay),void 0!==options.content&&(bindtipTipoptions.content=options.content),void 0!==options.content&&(bindtipTipoptions.fadeIn=options.fadeIn)),"tooltip"!==$target.attr("rel")&&($target=$("[rel=tooltip]",$target)),$target.each((function(){if((void 0!==$(this).attr("href")||void 0!==$(this).data("href"))&&PF.fn.isDevice(["phone","phablet","tablet"]))return!0;var position=void 0===$(this).data("tiptip")?"bottom":$(this).data("tiptip");PF.fn.isDevice(["phone","phablet"])&&(position="top"),$(this).tipTip({delay:bindtipTipoptions.delay,defaultPosition:position,content:bindtipTipoptions.content,fadeIn:bindtipTipoptions.fadeIn,fadeOut:0})}))},PF.fn.form_modal_has_changed=function(){if(!$(PF.obj.modal.selectors.root).is(":hidden")&&void 0!==$("html").data("modal-form-values")){var data_stored=$("html").data("modal-form-values"),data_modal=PF.fn.deparam($(":input:visible",PF.obj.modal.selectors.root).serialize()),has_changed=!1,keys=$.extend({},data_stored,data_modal);for(var k in keys)if(data_stored[k]!==data_modal[k]){has_changed=!0;break}return has_changed}},PF.fn.is_listing=function(){return $(PF.obj.listing.selectors.content_listing).exists()},PF.fn.is_tabs=function(){return $(".content-tabs").exists()},jQuery.fn.shake=function(callback){return this.each((function(init){var jqNode=$(this),jqNode_position=jqNode.css("position");jqNode_position.match("relative|absolute|fixed")||jqNode.css({position:"relative"});var jqNode_left=parseInt(jqNode.css("left"));if(jqNode_left.toString().isNumeric()||(jqNode_left=0),!jqNode.is(":animated")){for(var x=1;x<=2;x++)jqNode.animate({left:jqNode_left-10},0).animate({left:jqNode_left},30).animate({left:jqNode_left+10},30).animate({left:jqNode_left},30);"static"!==jqNode_position&&jqNode.css({position:jqNode_position})}})),"function"==typeof callback&&callback(),this},jQuery.fn.highlight=function(color){if(this.is(":animated")||!this.exists())return this;void 0===color&&(color="yellow");var fadecolor=color;switch(color){case"yellow":fadecolor="#FFFBA2";break;case"red":fadecolor="#FF7F7F";break;default:fadecolor=color}var base_background_color=$(this).css("background-color"),base_background=$(this).css("background");return $(this).css({background:"",backgroundColor:fadecolor}).animate({backgroundColor:base_background_color},800,(function(){$(this).css("background","")})),this},jQuery.fn.pf_slideDown=function(speed,callback){var default_speed="normal",this_length=$(this).length,css_prechanges,css_animation,animation_speed;return"function"==typeof speed&&(callback=speed,speed="normal"),void 0===speed&&(speed="normal"),$(this).each((function(index){var this_css_top=parseInt($(this).css("top")),to_top=this_css_top>0?this_css_top:0;0==speed?(css_prechanges={display:"block",opacity:0},css_animation={opacity:1},animation_speed=jQuery.speed("fast").duration):(css_prechanges={top:-$(this).outerHeight(!0),opacity:1,display:"block"},css_animation={top:to_top},animation_speed=jQuery.speed(speed).duration),$(this).data("originalTop",$(this).css("top")),$(this).css(css_prechanges).animate(css_animation,animation_speed,(function(){index==this_length-1&&"function"==typeof callback&&callback()}))})),this},jQuery.fn.pf_slideUp=function(speed,callback){var default_speed="normal",this_length=$(this).length;return"function"==typeof speed&&(callback=speed,speed="normal"),void 0===speed&&(speed="normal"),$(this).each((function(index){$(this).animate({top:-$(this).outerHeight(!0)},jQuery.speed(speed).duration,(function(){$(this).css({display:"none",top:$(this).data("originalTop")}),index==this_length-1&&"function"==typeof callback&&callback()}))})),this},jQuery.fn.is_in_viewport=function(){var rect=$(this)[0].getBoundingClientRect();return rect.top>=0&&rect.left>=0&&rect.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&rect.right<=(window.innerWidth||document.documentElement.clientWidth)},jQuery.fn.getWindowCutoff=function(){var rect={top:$(this).offset().top,left:$(this).offset().left,width:$(this).outerWidth(),height:$(this).outerHeight()};rect.right=rect.left+rect.width,rect.bottom=rect.top+rect.height;var detected=!1,cutoff={top:rect.top>0?0:rect.top,right:document.body.clientWidth-rect.right,bottom:document.body.clientHeight-rect.bottom,left:rect.left>0?0:rect.left};for(var key in cutoff)cutoff[key]<0?detected=!0:cutoff[key]=0;return detected?cutoff:null},PF.fn.scroll=function(target,callback){if("function"==typeof target)var callback=target,target="";var pxtop=parseInt($("body").css("margin-top"));0==pxtop&&$(".top-bar-placeholder").exists()&&(pxtop=$(".top-bar-placeholder").height()),$(target).exists()||(target="html"),$("body,html").animate({scrollTop:$(target).offset().top-pxtop},"normal",(function(){"function"==typeof callback&&callback()}))},PF.fn.close_pops=function(e){$(".pop-box:visible").each((function(){$(this).closest(".pop-btn").click()}))},PF.fn.growl={selectors:{root:"#growl"},str:{timeout:null,timeoutcall:!1},call:function(options){if(void 0!==options&&("string"==typeof options&&(options={message:options}),void 0!==options.message)){var growl_options,$growl,growl_class,growl_color;for(key in growl_options={message:options.message,insertTo:"body",where:"before",color:"default",css:{},classes:"",expires:0,callback:function(){}})void 0!==options[key]&&(key.match("/^(callback)$/")?"function"==typeof options[key]&&(growl_options[key]=options[key]):growl_options[key]=options[key]);if($(growl_options.insertTo).exists()||(growl_options.insertTo="body"),$(PF.fn.growl.selectors.root).exists()){if($(PF.fn.growl.selectors.root).text()==growl_options.message)return void $(PF.fn.growl.selectors.root).shake();$(PF.fn.growl.selectors.root).remove()}switch($growl=$('
'+growl_options.message+'
').css(growl_options.css).addClass(growl_options.classes),growl_class="body"!==growl_options.insertTo?"static":"",growl_options.color){case"dark":growl_color="dark";break;default:growl_color=""}if($growl.addClass(growl_class+" "+growl_color),"before"==growl_options.where?$(growl_options.insertTo).prepend($growl.hide()):$(growl_options.insertTo).append($growl.hide()),$(".fullscreen").is(":visible")&&$growl.css({"z-index":parseInt($(".fullscreen").css("z-index"))+1}),$(PF.obj.modal.selectors.root).is(":visible")){var $modal_box=$(PF.obj.modal.selectors.box,PF.obj.modal.selectors.root);$growl.show(),$growl.css("top",($("#top-bar").outerHeight(!0)-$growl.outerHeight(!0))/2),PF.fn.growl.fixPosition(),$growl.hide()}$growl.pf_slideDown("static"==growl_class?0:200,(function(){"function"==typeof growl_options.callback&&growl_options.callback()})),$(document).on("click",".growl",(function(e){(PF.fn.isDevice(["phone","phablet"])||$(e.target).is("[data-action=close]"))&&PF.fn.growl.close(!0)})),growl_options.expires>0&&("number"==typeof this.str.timeout&&clearTimeout(this.str.timeout),this.str.timeout=setTimeout((function(){PF.fn.growl.str.timeoutcall=!0,PF.fn.growl.close()}),growl_options.expires)),console.log(growl_options.message)}},expirable:function(msg,time){void 0!==msg&&(void 0===time&&(time=5e3),PF.fn.growl.call({message:msg,expires:time}))},close:function(forced,callback){var $growl=$(PF.fn.growl.selectors.root);forced&&(this.str.timeout=null,this.str.timeoutcall=!1,clearTimeout(this.str.timeout)),$growl.exists()&&("number"!=typeof this.str.timeout||this.str.timeoutcall)&&$growl.fadeOut("fast",(function(){$(this).remove(),"function"==typeof callback&&callback()}))},fixPosition:function(){var $growl=$(PF.fn.growl.selectors.root);if($growl.exists()&&$(PF.obj.modal.selectors.root).exists()&&("scrollbar"!=$growl.data("fixedPosition")||!$(PF.obj.modal.selectors.root).hasScrollBar().vertical)){var offsetX_modal,offsetX_growl,growlCompensate=$(PF.obj.modal.selectors.box).offset().left-$growl.offset().left,marginLeft=growlCompensate<0?"-="+Math.abs(growlCompensate):"-"+parseInt($growl.css("width"))/2;PF.fn.isDevice(["phone","phablet"])||$growl.css("marginLeft",marginLeft+"px"),$growl.data("fixedPosition",$(PF.obj.modal.selectors.root).hasScrollBar().vertical?"scrollbar":"no-scrollbar")}}},PF.obj.modal={type:"",selectors:{root:"#fullscreen-modal",box:"#fullscreen-modal-box",body:"#fullscreen-modal-body",login:"[data-modal=login]",changes_confirm:"#fullscreen-changes-confirm",btn_container:".btn-container",close_buttons:".close-modal,.cancel-modal,[data-action=cancel],[data-action-close]",submit_button:"[data-action=submit]",growl_placeholder:"#fullscreen-growl-placeholder"},ajax:{url:"",deferred:{}},locked:!1,form_data:{},XHR:{},prevented:!1},PF.obj.modal.$close_buttons=$(PF.obj.modal.selectors.close_buttons,PF.obj.modal.selectors.root),PF.obj.modal.$submit_button=$(PF.obj.modal.selectors.submit_button,PF.obj.modal.selectors.root),PF.fn.modal={str:{transition:"all "+PF.obj.config.animation.fast+"ms ease"},call:function(options){var modal_options,modal_base_template,modal_message;if(void 0!==options&&(void 0!==options.template&&void 0===options.type&&(options.type="html"),void 0!==options.title&&void 0!==options.message||"login"===options.type||"html"===options.type)){for(key in PF.fn.growl.close(),modal_options={forced:!1,type:"confirm",title:options.title,message:options.message,html:!1,template:options.template,buttons:!0,button_submit:PF.fn._s("Submit"),txt_or:PF.fn._s("or"),button_cancel:PF.fn._s("cancel"),ajax:{url:null,data:null,deferred:{}},confirm:function(){},cancel:function(){PF.fn.modal.close()},load:function(){},callback:function(){}})void 0!==options[key]&&(/^cancel|confirm|callback$/.test(key)?"function"==typeof options[key]&&(modal_options[key]=options[key]):modal_options[key]=options[key]);void 0!==options.ajax&&!options.ajax.url&&options.ajax.deferred&&(modal_options.ajax.url=PF.obj.config.json_api),"login"==modal_options.type&&(modal_options.buttons=!1),"confirm"==modal_options.type&&(modal_options.button_submit=PF.fn._s("Confirm"));var overlay_background="soft-black";$("html").hasClass("tone-dark")&&(overlay_background="black");var modal_base_template=['
%MODAL_BODY%
%MODAL_BUTTONS%
'].join(""),modal_buttons=modal_options.buttons?['
',modal_options.txt_or,'',modal_options.button_cancel,"
"].join(""):"",modalBodyHTML;switch("login"==modal_options.type&&(modal_options.template=void 0===modal_options.template?$(PF.obj.modal.selectors.login).html():modal_options.template),modal_options.type){case"html":case"login":modalBodyHTML=modal_options.template;break;case"confirm":default:modal_message=modal_options.message,modal_options.html||(modal_message="

"+modal_message+"

"),modalBodyHTML="

"+modal_options.title+"

"+modal_message}if(void 0!==modalBodyHTML){if(modal_base_template=modal_base_template.replace("%MODAL_BODY%",modalBodyHTML).replace("%MODAL_BUTTONS%",modal_buttons).replace(/template-tooltip/g,"tooltip"),$(PF.obj.modal.selectors.root).remove(),$("body").data("overflow-hidden",$("body").hasClass("overflow-hidden")),$("body").prepend(modal_base_template).addClass("overflow-hidden"),this.fixScrollbars(),$("[rel=tooltip]",PF.obj.modal.selectors.root).each((function(){PF.fn.bindtipTip(this,{content:$(this).data("title")})})),$(":button, input[type=submit], input[type=reset]",PF.obj.modal.selectors.root).length>0){var $form=$("form",PF.obj.modal.selectors.root);$form.exists()?($form.append($($(PF.obj.modal.selectors.btn_container,PF.obj.modal.selectors.root).html()).wrapInner(PF.obj.modal.selectors.btn_container.replace(".",""))),$(PF.obj.modal.selectors.btn_container,PF.obj.modal.selectors.root).each((function(){$(this).closest("form").exists()||$(this).remove()}))):$(PF.obj.modal.selectors.box,PF.obj.modal.selectors.root).wrapInner("
")}modal_options.callback(),$(PF.obj.modal.selectors.box).css({transform:"scale(0.7)",opacity:0,transition:PF.fn.modal.str.transition}),$(PF.obj.modal.selectors.root).css({display:"block"}),setTimeout((function(){$(PF.obj.modal.selectors.root).css({opacity:1}),$(PF.obj.modal.selectors.box).css({transform:"scale(1)",opacity:1}),"undefined"!=typeof PFrecaptchaCallback&&PFrecaptchaCallback(),setTimeout((function(){$("html").data("modal-form-values",PF.fn.deparam($(":input:visible",PF.obj.modal.selectors.root).serialize())),"function"==typeof modal_options.load&&modal_options.load()}),PF.obj.config.animation.fast)}),1),$(PF.obj.modal.selectors.root).click((function(e){var $this=$(e.target),_this=this;if(!PF.obj.modal.locked)if($this.closest(PF.obj.modal.selectors.changes_confirm).exists()&&($this.is(PF.obj.modal.selectors.close_buttons)||$this.is(PF.obj.modal.selectors.submit_button)))$(PF.obj.modal.selectors.changes_confirm).remove(),$this.is(PF.obj.modal.selectors.close_buttons)?$(PF.obj.modal.selectors.box,this).fadeIn("fast",(function(){$(this).css("transition",PF.fn.modal.str.transition)})):PF.fn.modal.close();else if($this.closest(".clickable").exists()&&!$this.is(PF.obj.modal.selectors.close_buttons)||(PF.fn.growl.close(),modal_options.cancel()),$this.is(PF.obj.modal.selectors.submit_button)){if(!1===modal_options.confirm())return;var modal_submit_continue=!0;if($("input, textarea, select",PF.obj.modal.selectors.root).not(":input[type=button], :input[type=submit], :input[type=reset]").length>0&&!PF.fn.form_modal_has_changed()&&!modal_options.forced&&(modal_submit_continue=!1),modal_submit_continue)if(modal_options.ajax.url){var $btn_container=$(PF.obj.modal.selectors.btn_container,PF.obj.modal.selectors.root),modal_loading_msg;switch(PF.obj.modal.locked=!0,$btn_container.first().clone().height($btn_container.height()).html("").addClass("loading").appendTo(PF.obj.modal.selectors.root+" form"),$btn_container.hide(),PF.obj.modal.$close_buttons.hide(),PF.obj.modal.type){case"edit":modal_loading_msg=PF.fn._s("Saving");break;case"confirm":case"form":default:modal_loading_msg=PF.fn._s("Sending")}PF.fn.loading.inline($(PF.obj.modal.selectors.btn_container+".loading",PF.obj.modal.selectors.root),{size:"small",message:modal_loading_msg,valign:"center"}),$(PF.obj.modal.selectors.root).disableForm(),(!$.isEmptyObject(PF.obj.modal.form_data)||void 0!==options.ajax&&void 0===options.ajax.data)&&(modal_options.ajax.data=PF.obj.modal.form_data),PF.obj.modal.XHR=$.ajax({url:modal_options.ajax.url,type:"POST",data:modal_options.ajax.data}).complete((function(XHR){if(PF.obj.modal.locked=!1,200==XHR.status){var success_fn=void 0!==modal_options.ajax.deferred&&void 0!==modal_options.ajax.deferred.success?modal_options.ajax.deferred.success:null;"function"==typeof success_fn?PF.fn.modal.close((function(){"function"==typeof success_fn&&success_fn(XHR)})):"object"==typeof success_fn&&("function"==typeof success_fn.before&&success_fn.before(XHR),"function"==typeof success_fn.done&&success_fn.done(XHR))}else if($(PF.obj.modal.selectors.root).enableForm(),$(PF.obj.modal.selectors.btn_container+".loading",PF.obj.modal.selectors.root).remove(),$btn_container.css("display",""),void 0!==modal_options.ajax.deferred&&"function"==typeof modal_options.ajax.deferred.error)modal_options.ajax.deferred.error(XHR);else{var message=PF.fn._s("An error occurred. Please try again later.");PF.fn.growl.call(message)}}))}else PF.fn.modal.close(modal_options.callback())}}))}else console.log("PF Error: Modal content is empty")}},confirm:function(options){options.type="confirm",void 0===options.title&&(options.title=PF.fn._s("Confirm action")),PF.fn.modal.call(options)},simple:function(options){"string"==typeof options&&(options={message:options}),void 0===options.buttons&&(options.buttons=!1),void 0===options.title&&(options.title=PF.fn._s("information")),PF.fn.modal.call(options)},fixScrollbars:function(){if($(PF.obj.modal.selectors.root).exists()){var $targets={padding:$(".top-bar, .fixed, .position-fixed"),margin:$("html")},properties={};PF.str.ScrollBarWidth>0&&$("html").hasScrollBar().vertical&&!$("body").data("overflow-hidden")?(properties.padding=PF.str.ScrollBarWidth+"px",properties.margin=PF.str.ScrollBarWidth+"px"):(properties.padding="",properties.margin=""),$targets.padding.css({paddingRight:properties.padding}),$targets.margin.css({marginRight:properties.margin})}},close:function(callback){$(PF.obj.modal.selectors.root).exists()&&(PF.fn.growl.close(!0),$("[rel=tooltip]",PF.obj.modal.selectors.root).tipTip("hide"),$(PF.obj.modal.selectors.box).css({transform:"scale(0.5)",opacity:0}),$(PF.obj.modal.selectors.root).css({opacity:0}),setTimeout((function(){PF.str.ScrollBarWidth>0&&$("html").hasScrollBar().vertical&&$(".top-bar, .fixed, .position-fixed").css({paddingRight:""}),$("html").css({marginRight:""}),$("body").data("overflow-hidden")||$("body").removeClass("overflow-hidden"),$("body").removeData("overflow-hidden"),$(PF.obj.modal.selectors.root).remove(),"function"==typeof callback&&callback()}),PF.obj.config.animation.normal))}},PF.fn.popup=function(options){var settings={height:options.height||500,width:options.width||650,scrollTo:0,resizable:0,scrollbars:0,location:0};settings.top=screen.height/2-settings.height/2,settings.left=screen.width/2-settings.width/2;var settings_="";for(var key in settings)settings_+=key+"="+settings[key]+",";settings_=settings_.slice(0,-1),window.open(options.href,"Popup",settings_)},PF.fn.list_fluid_width=function(){if($("body").is_fluid()){var $content_listing=$(PF.obj.listing.selectors.content_listing_visible),$pad_content_listing=$(PF.obj.listing.selectors.pad_content,$content_listing),$list_item=$(PF.obj.listing.selectors.list_item,$content_listing),list_item_width=$list_item.outerWidth(!0),list_item_gutter=$list_item.outerWidth(!0)-$list_item.width();PF.obj.listing.content_listing_ratio=parseInt(($content_listing.width()+list_item_gutter)/list_item_width),$list_item.lengthPF.obj.config.animation.normal?$target.fadeIn(PF.obj.config.animation.normal):$target.show():$target.fadeIn(PF.obj.config.animation.normal)}))})):$targets.show(),PF.obj.listing.calling=!1;var visible_loading=$(PF.obj.listing.selectors.content_listing_loading,$content_listing).exists()&&$(PF.obj.listing.selectors.content_listing_loading,$content_listing).is_in_viewport();void 0===PF.obj.listing.show_load_more&&(PF.obj.listing.show_load_more=visible_loading),$(PF.obj.listing.selectors.content_listing_loading,$content_listing)[(visible_loading?"add":"remove")+"Class"]("visibility-hidden"),$(PF.obj.listing.selectors.content_listing_load_more,$content_listing)[PF.obj.listing.show_load_more?"show":"hide"]();var State=History.getState();State.data&&void 0!==State.data.scrollTop&&($(window).scrollTop(),State.data.scrollTop),"function"==typeof callback&&callback()}))}))},PF.fn.listing.removeLoader=function(obj){var remove=[PF.obj.listing.selectors.content_listing_load_more,PF.obj.listing.selectors.content_listing_loading];$(PF.obj.listing.selectors.content_listing_pagination,$content_listing).is("[data-type=endless]")&&remove.push(PF.obj.listing.selectors.content_listing_pagination),$.each(remove,(function(i,v){$(v,obj).remove()}))},PF.fn.listing.queryString={stock_load:function(){var $content_listing=$(PF.obj.listing.selectors.content_listing_visible),params=PF.fn.deparam($content_listing.data("params"));for(var k in PF.obj.listing.params_hidden=void 0!==$content_listing.data("params-hidden")?PF.fn.deparam($content_listing.data("params-hidden")):null,void 0===PF.obj.listing.query_string.action&&(PF.obj.listing.query_string.action=$content_listing.data("action")||"list"),void 0===PF.obj.listing.query_string.list&&(PF.obj.listing.query_string.list=$content_listing.data("list")),void 0===PF.obj.listing.query_string.sort&&(void 0!==params&&void 0!==params.sort?PF.obj.listing.query_string.sort=params.sort:PF.obj.listing.query_string.sort=$(":visible"+PF.obj.listing.selectors.sort).data("sort")),void 0===PF.obj.listing.query_string.page&&(PF.obj.listing.query_string.page=1),$content_listing.data("page",PF.obj.listing.query_string.page),$(PF.obj.listing.selectors.content_listing+"[data-load=ajax]").each((function(){var $sortable_switch=$("[data-tab="+$(this).attr("id")+"]"+PF.obj.listing.selectors.sort),dataParams=PF.fn.deparam($(this).data("params")),dataParamsHidden=PF.fn.deparam($(this).data("params-hidden")),params={q:dataParams&&dataParams.q?dataParams.q:null,list:$(this).data("list"),sort:$sortable_switch.exists()?$sortable_switch.data("sort"):dataParams&&dataParams.sort?dataParams.sort:null,page:dataParams&&dataParams.page?dataParams.page:1};for(var k in dataParamsHidden&&dataParamsHidden.list&&delete params.list,params)params[k]||delete params[k]})),params)0==/action|list|sort|page/.test(k)&&(PF.obj.listing.query_string[k]=params[k]);if(void 0!==PF.obj.listing.params_hidden){for(var k in PF.obj.listing.params_hidden)0==/action|list|sort|page/.test(k)&&(PF.obj.listing.query_string[k]=PF.obj.listing.params_hidden[k]);PF.obj.listing.query_string.params_hidden=PF.obj.listing.params_hidden,PF.obj.listing.params_hidden.params_hidden=null}},stock_new:function(){var $content_listing=$(PF.obj.listing.selectors.content_listing_visible),params=PF.fn.deparam($content_listing.data("params"));$content_listing.data("offset")?PF.obj.listing.query_string.offset=$content_listing.data("offset"):delete PF.obj.listing.query_string.offset,PF.obj.listing.query_string.action=$content_listing.data("action")||"list",PF.obj.listing.query_string.list=$content_listing.data("list"),void 0!==params&&void 0!==params.sort?PF.obj.listing.query_string.sort=params.sort:PF.obj.listing.query_string.sort=$(":visible"+PF.obj.listing.selectors.sort).data("sort"),PF.obj.listing.query_string.page=1},stock_current:function(){this.stock_new(),PF.obj.listing.query_string.page=$(PF.obj.listing.selectors.content_listing_visible).data("page")}},PF.fn.listing.queryString.stock_load(),PF.fn.listing.ajax=function(){if(1!=PF.obj.listing.calling){PF.obj.listing.calling=!0;var $content_listing=$(PF.obj.listing.selectors.content_listing_visible),$pad_content_listing=$(PF.obj.listing.selectors.pad_content,$content_listing),$content_listing_load_more=$(PF.obj.listing.selectors.content_listing_load_more,$content_listing);$content_listing_load_more.hide(),$(PF.obj.listing.selectors.content_listing_loading,$content_listing).removeClass("visibility-hidden").show(),PF.obj.listing.XHR=$.ajax({type:"POST",data:$.param($.extend({},PF.obj.listing.query_string,$.ajaxSettings.data))}).complete((function(XHR){var response=XHR.responseJSON,removePagination=function(){$(PF.obj.listing.selectors.content_listing_loading+","+PF.obj.listing.selectors.content_listing_pagination+":not([data-visibility=visible])",$content_listing).remove()},setEmptyTemplate=function(){$content_listing.data("empty","true").html(PF.obj.listing.template.empty),$("[data-content=list-selection][data-tab="+$content_listing.attr("id")+"]").addClass("disabled")};if(4==XHR.readyState&&void 0!==response){if($("[data-content=list-selection][data-tab="+$content_listing.attr("id")+"]").removeClass("disabled"),200!==XHR.status){var response_output=void 0!==response.error&&void 0!==response.error.message?response.error.message:"Bad request";PF.fn.growl.call("Error: "+response_output),$content_listing.data("load","")}if(void 0!==response.html&&""!=response.html||0!=$(PF.obj.listing.selectors.list_item,$content_listing).length||setEmptyTemplate(),void 0===response.html||""==response.html)return removePagination(),PF.obj.listing.calling=!1,void("function"==typeof PF.fn.listing_end&&PF.fn.listing_end());$content_listing.data({load:"",page:PF.obj.listing.query_string.page});var url_object=$.extend({},PF.obj.listing.query_string);for(var k in PF.obj.listing.params_hidden)void 0!==url_object[k]&&delete url_object[k];for(var k in delete url_object.action,url_object)url_object[k]||delete url_object[k];if(-1==document.URL.indexOf("?"+$.param(url_object))){var url=window.location.href;url=url.split("?")[0].replace(/\/$/,"")+"/?"+$.param(url_object),window.location.hash&&(url=url.replace(window.location.hash,"")),History.pushState({pushed:"pagination",scrollTop:$(window).scrollTop()},document.title,url)}$("a[data-tab="+$content_listing.attr("id")+"]").attr("href",document.URL),$pad_content_listing.append(response.html),$("[data-action=load-more]",$content_listing_load_more).attr("data-seek",response.seekEnd),PF.fn.listing.show(response,(function(){$(PF.obj.listing.selectors.content_listing_loading,$content_listing).addClass("visibility-hidden")}))}else PF.obj.listing.calling=!1,$content_listing.data("load",""),removePagination(),0==$(PF.obj.listing.selectors.list_item,$content_listing).length&&setEmptyTemplate(),0!==XHR.readyState&&PF.fn.growl.call(PF.fn._s("An error occurred. Please try again later."));"function"==typeof PF.fn.listing.ajax.callback&&PF.fn.listing.ajax.callback(XHR)}))}},PF.fn.listing.columnizerQueue=function(){$(PF.obj.listing.selectors.content_listing+":hidden").data("queued",!0)},PF.fn.listing.refresh=function(animation_time){PF.fn.listing.columnizer(!0,animation_time,!1),$(PF.obj.listing.selectors.list_item).show()};var width=$(window).width();function sprintf(){var e=/%%|%(\d+\$)?([-+\'#0 ]*)(\*\d+\$|\*|\d+)?(\.(\*\d+\$|\*|\d+))?([scboxXuideEfFgG])/g,t=arguments,n=0,r=t[n++],i=function(e,t,n,r){n||(n=" ");var i=e.length>=t?"":new Array(1+t-e.length>>>0).join(n);return r?e+i:i+e},s=function(e,t,n,r,s,o){var u=r-e.length;return u>0&&(e=n||!s?i(e,r,o,n):e.slice(0,t.length)+i("",u,"0",!0)+e.slice(t.length)),e},o=function(e,t,n,r,o,u,a){var f=e>>>0;return e=(n=n&&f&&{2:"0b",8:"0",16:"0x"}[t]||"")+i(f.toString(t),u||0,"0",!1),s(e,n,r,o,a)},u=function(e,t,n,r,i,o){return null!=r&&(e=e.slice(0,r)),s(e,"",t,n,i,o)},a=function(e,r,a,f,l,c,h){var p,d,v,m,g;if("%%"===e)return"%";for(var y=!1,b="",w=!1,E=!1,S=" ",x=a.length,T=0;a&&T-1?6:"d"===h?0:void 0,g=r?t[r.slice(0,-1)]:t[n++],h){case"s":return u(String(g),y,f,c,w,S);case"c":return u(String.fromCharCode(+g),y,f,c,w);case"b":return o(g,2,E,y,f,c,w);case"o":return o(g,8,E,y,f,c,w);case"x":return o(g,16,E,y,f,c,w);case"X":return o(g,16,E,y,f,c,w).toUpperCase();case"u":return o(g,10,E,y,f,c,w);case"i":case"d":return p=+g||0,g=(d=(p=Math.round(p-p%1))<0?"-":b)+i(String(Math.abs(p)),c,"0",!1),s(g,d,y,f,w);case"e":case"E":case"f":case"F":case"g":case"G":return d=(p=+g)<0?"-":b,v=["toExponential","toFixed","toPrecision"]["efg".indexOf(h.toLowerCase())],m=["toString","toUpperCase"]["eEfFgG".indexOf(h)%2],g=d+Math.abs(p)[v](c),s(g,d,y,f,w)[m]();default:return e}};return r.replace(e,a)} /*! * imagesLoaded PACKAGED v4.1.0 * JavaScript is all like "You images are done yet or what?" * MIT License */function testPassword(e){var t=0,n="weak",r="",i=0;return e.length<5?(t+=3,r=r+"3 points for length ("+e.length+")\n"):e.length>4&&e.length<8?(t+=6,r=r+"6 points for length ("+e.length+")\n"):e.length>7&&e.length<16?(t+=12,r=r+"12 points for length ("+e.length+")\n"):e.length>15&&(t+=18,r=r+"18 point for length ("+e.length+")\n"),e.match(/[a-z]/)&&(t+=1,r+="1 point for at least one lower case char\n"),e.match(/[A-Z]/)&&(t+=5,r+="5 points for at least one upper case char\n"),e.match(/\d+/)&&(t+=5,r+="5 points for at least one number\n"),e.match(/(.*[0-9].*[0-9].*[0-9])/)&&(t+=5,r+="5 points for at least three numbers\n"),e.match(/.[!,@,#,$,%,^,&,*,?,_,~]/)&&(t+=5,r+="5 points for at least one special char\n"),e.match(/(.*[!,@,#,$,%,^,&,*,?,_,~].*[!,@,#,$,%,^,&,*,?,_,~])/)&&(t+=5,r+="5 points for at least two special chars\n"),e.match(/([a-z].*[A-Z])|([A-Z].*[a-z])/)&&(t+=2,r+="2 combo points for upper and lower letters\n"),e.match(/([a-zA-Z])/)&&e.match(/([0-9])/)&&(t+=2,r+="2 combo points for letters and numbers\n"),e.match(/([a-zA-Z0-9].*[!,@,#,$,%,^,&,*,?,_,~])|([!,@,#,$,%,^,&,*,?,_,~].*[a-zA-Z0-9])/)&&(t+=2,r+="2 combo points for letters, numbers and special chars\n"),0==e.length&&(t=0),n=t<16?"very weak":t>15&&t<25?"weak":t>24&&t<35?"average":t>34&&t<45?"strong":"stronger",{score:t,ratio:i=Math.round(Math.min(100,100*t/45))/100,percent:100*i+"%",verdict:n,log:r}}PF.fn.listing.columnizer=function(forced,animation_time,hard_forced){var device_to_columns={phone:1,phablet:3,tablet:4,laptop:5,desktop:6,largescreen:7};if("boolean"!=typeof forced)var forced=!1;if(void 0===PF.obj.listing.mode&&(forced=!0),"boolean"!=typeof hard_forced)var hard_forced=!1,default_hard_forced=!0;else var default_hard_forced=!1;if(!hard_forced&&default_hard_forced&&(width!==$(window).width()||forced)&&(hard_forced=!0),void 0===animation_time)var animation_time=PF.obj.config.animation.normal;var $container=$("#content-listing-tabs").exists()?$(PF.obj.listing.selectors.content_listing_visible,"#content-listing-tabs"):$(PF.obj.listing.selectors.content_listing),$pad_content_listing=$(PF.obj.listing.selectors.pad_content,$container),list_mode="responsive",$list_item=$(forced||hard_forced?PF.obj.listing.selectors.list_item:PF.obj.listing.selectors.list_item+":not(.jsly)",$container);if($container.addClass("jsly"),void 0!==PF.obj.config.listing.device_to_columns&&(device_to_columns=$.extend({},device_to_columns,PF.obj.config.listing.device_to_columns)),$container.data("device-columns")&&(device_to_columns=$.extend({},device_to_columns,$container.data("device-columns"))),PF.obj.listing.mode=list_mode,PF.obj.listing.device=PF.fn.getDeviceName(),$list_item.exists()){if(void 0===$container.data("columns")||forced||hard_forced){var $list_item_1st;for($list_item.first().css("width",""),PF.obj.listing.columns=new Array,PF.obj.listing.columns_number=device_to_columns[PF.fn.getDeviceName()],i=0;i6?"small-cols":""),$pad_content_listing.css("width","100%");var delay=0;$list_item.each((function(index){$(this).addClass("jsly");var $list_item_img=$(".list-item-image",this),$list_item_src=$(".list-item-image img",this),$list_item_thumbs=$(".list-item-thumbs",this),isJslyLoaded=$list_item_src.hasClass("jsly-loaded");$list_item_src.show(),hard_forced&&($(this).css({top:"",left:"",height:"",position:""}),$list_item_img.css({maxHeight:"",height:""}),$list_item_src.removeClass("jsly").css({width:"",height:""}).parent().css({marginLeft:"",marginTop:""}),$("li",$list_item_thumbs).css({width:"",height:""}));var width_responsive=1==PF.obj.listing.columns_number?"100%":parseInt(1/PF.obj.listing.columns_number*($container.width()-10*(PF.obj.listing.columns_number-1))+"px");if($(this).css("width",width_responsive),PF.obj.listing.current_column>PF.obj.listing.columns_number&&(PF.obj.listing.current_column=1),$(this).attr("data-col",PF.obj.listing.current_column),!$list_item_src.exists()){var empty=!0;$list_item_src=$(".image-container .empty",this)}var already_shown=$(this).is(":visible");$list_item.show();var isFixed=$list_item_img.hasClass("fixed-size"),image={w:parseInt($list_item_src.attr("width")),h:parseInt($list_item_src.attr("height"))};if(image.ratio=image.w/image.h,hard_forced&&PF.obj.listing.columns_number>1?($list_item_src.css({width:"auto",height:"auto"}),$(".image-container:not(.list-item-avatar-cover)",this).css({width:"",height:"auto"})):image.w>$container.width()&&($(".image-container:not(.list-item-avatar-cover)",this).css(image.ratio<1?{maxWidth:"100%",height:"auto"}:{height:"100%",width:"auto"}),$list_item_src.css(image.ratio<1?{maxWidth:"100%",height:"auto"}:{height:"100%",width:"auto"})),empty||$list_item_img.css("min-height")&&!$list_item_src.hasClass("jsly")){var list_item_img_min_height=parseInt($list_item_img.css("height")),col={w:$(this).width(),h:isFixed?$(this).width():null},magicWidth=Math.min(image.w,image.w1||1==image.ratio)?(image.h=Math.min(image.h,image.w=3||image.ratio<1||1==image.ratio?image.h=image.w/image.ratio:(image.h=Math.min(image.h,image.w),image.w=image.h*image.ratio),empty&&(image.h=col.w),$list_item_img.css({height:image.h});$list_item_src.css({width:image.w,height:image.h}),0==$list_item_src.width()&&$list_item_src.css({width:magicWidth,height:magicWidth/image.ratio}),$(".image-container",this).is(".list-item-avatar-cover")&&$list_item_src.css(isFixed?{width:"auto",height:"100%"}:{width:"100%",height:"auto"}),0!==$list_item_src.height()&&($list_item_img.height()>$list_item_src.height()||isFixed)&&$list_item_src.parent().css({marginTop:($list_item_img.outerHeight()-$list_item_src.height())/2}),$list_item_img.width()<$list_item_src.width()&&$list_item_src.parent().css({marginLeft:-($list_item_src.outerWidth()-$list_item_img.width())/2+"px"});var list_item_src_pitfall_x=Math.max(2*$list_item_src.position().left,0),list_item_src_pitfall_y=Math.max(2*$list_item_src.position().top,0);if(PF.obj.listing.columns_number>6&&(list_item_src_pitfall_x>0||list_item_src_pitfall_y>0)){var pitfall_ratio_x=list_item_src_pitfall_x/$list_item_img.width(),pitfall_ratio_y=list_item_src_pitfall_y/$list_item_img.height(),pitfall={};pitfall_ratio_x<=.25&&pitfall_ratio_y<=.25&&(pitfall_ratio_x>pitfall_ratio_y?(pitfall.width=list_item_src_pitfall_x+$list_item_img.width(),pitfall.height=pitfall.width/image.ratio):(pitfall.height=list_item_src_pitfall_y+$list_item_src.height(),pitfall.width=pitfall.height*image.ratio),$list_item_src.css(pitfall),$list_item_src.parent().css({marginLeft:-($list_item_src.width()-$list_item_img.width())/2,marginTop:0}))}$list_item_thumbs.exists()&&$("li",$list_item_thumbs).css({width:100/$("li",$list_item_thumbs).length+"%"}).css({height:$("li",$list_item_thumbs).width()}),already_shown||$list_item.hide()}if(!$list_item_src.hasClass("jsly")&&$(this).is(":hidden")&&$(this).css("top","100%"),PF.obj.listing.columns[PF.obj.listing.current_column]+=$(this).outerHeight(!0),1==PF.obj.listing.columns_number)$(this).removeClass("position-absolute");else{$(this).is(":animated")&&(animation_time=0),$(this).addClass("position-absolute");var new_left=$(this).outerWidth(!0)*(PF.obj.listing.current_column-1),must_change_left=parseInt($(this).css("left"))!=new_left;must_change_left&&(animate_grid=!0,$(this).animate({left:new_left},animation_time));var new_top=PF.obj.listing.columns[PF.obj.listing.current_column]-$(this).outerHeight(!0);parseInt($(this).css("top"))!=new_top&&(animate_grid=!0,$(this).animate({top:new_top},animation_time),must_change_left&&(delay=1))}if(already_shown&&$list_item.show(),isJslyLoaded||$list_item_src.addClass("jsly").hide().imagesLoaded((function(i){$(i.elements).show().addClass("jsly-loaded")})),isFixed)PF.obj.listing.current_column++;else{for(var minCol,minH,currentH,i=1;i<=PF.obj.listing.columns_number;i++){if(currentH=PF.obj.listing.columns[i],void 0===minH&&(minH=currentH,minCol=i),0==PF.obj.listing.columns[i]){minCol=i;break}currentHcontent_listing_height&&(content_listing_height=v)})),content_listing_height>10&&(content_listing_height-=10),PF.obj.listing.width=$container.width(),void 0!==PF.obj.listing.height)var old_listing_height=PF.obj.listing.height;PF.obj.listing.height=content_listing_height;var do_listing_h_resize=void 0!==old_listing_height&&old_listing_height!==PF.obj.listing.height;do_listing_h_resize||($pad_content_listing.height(content_listing_height),PF.fn.list_fluid_width()),do_listing_h_resize&&($pad_content_listing.height(old_listing_height),setTimeout((function(){$pad_content_listing.animate({height:content_listing_height},animation_time,(function(){PF.fn.list_fluid_width()}))}),animation_time*delay)),$container.data("list-mode",PF.obj.listing.mode),$(PF.obj.listing.selectors.content_listing_visible).data("queued",!1)}},PF.fn.loading={spin:{small:{lines:11,length:0,width:3,radius:7,speed:1,trail:45,blocksize:20},normal:{lines:11,length:0,width:5,radius:10,speed:1,trail:45,blocksize:30},big:{lines:11,length:0,width:7,radius:13,speed:1,trail:45,blocksize:40},huge:{lines:11,length:0,width:9,radius:16,speed:1,trail:45,blocksize:50}},inline:function($target,options){if(void 0!==$target){if($target instanceof jQuery==0)var $target=$($target);var defaultoptions={size:"normal",color:$("body").css("color"),center:!1,position:"absolute",shadow:!1,valign:"top"};if(void 0===options)options=defaultoptions;else for(var k in defaultoptions)void 0===options[k]&&(options[k]=defaultoptions[k]);var size=PF.fn.loading.spin[options.size];PF.fn.loading.spin[options.size].color=options.color,PF.fn.loading.spin[options.size].shadow=options.shadow,$target.html(''+(void 0!==options.message?''+options.message+"":"")).css({"line-height":PF.fn.loading.spin[options.size].blocksize+"px"}),$(".loading-indicator",$target).css({width:PF.fn.loading.spin[options.size].blocksize,height:PF.fn.loading.spin[options.size].blocksize}).spin(PF.fn.loading.spin[options.size]),options.center&&$(".loading-indicator",$target.css("textAlign","center")).css({position:options.position,top:"50%",left:"50%",marginTop:-PF.fn.loading.spin[options.size].blocksize/2,marginLeft:-PF.fn.loading.spin[options.size].blocksize/2}),"center"==options.valign&&$(".loading-indicator,.loading-text",$target).css("marginTop",($target.height()-PF.fn.loading.spin[options.size].blocksize)/2+"px"),$(".spinner",$target).css({top:PF.fn.loading.spin[options.size].blocksize/2+"px",left:PF.fn.loading.spin[options.size].blocksize/2+"px"})}},fullscreen:function(){$("body").append('
'+PF.fn._s("loading")+"
"),$(".fullscreen-loader","#pf-fullscreen-loader").spin(PF.fn.loading.spin.huge),$("#pf-fullscreen-loader").css("opacity",1)},destroy:function($target){var $loader_fs=$("#pf-fullscreen-loader"),$loader_os=$("#pf-onscreen-loader");"fullscreen"==$target&&($target=$loader_fs),"onscreen"==$target&&($target=$loader_os),void 0!==$target?$target.remove():($loader_fs.remove(),$loader_os.remove())}},jQuery.fn.disableForm=function(){return $(this).data("disabled",!0),$(":input",this).each((function(){$(this).attr("disabled",!0)})),this},jQuery.fn.enableForm=function(){return $(this).data("disabled",!1),$(":input",this).removeAttr("disabled"),this},PF.obj.follow_scroll={Y:0,y:0,$node:$(".follow-scroll"),node_h:0,base_h:$(".follow-scroll").outerHeight(),set:function(reset){reset&&(PF.obj.follow_scroll.base_h=$(".follow-scroll").outerHeight());var exists=PF.obj.follow_scroll.$node.closest(".follow-scroll-wrapper").exists();exists&&PF.obj.follow_scroll.$node.closest(".follow-scroll-wrapper").css("position","static"),PF.obj.follow_scroll.y=PF.obj.follow_scroll.$node.exists()?PF.obj.follow_scroll.$node.offset().top:null,PF.obj.follow_scroll.node_h=PF.obj.follow_scroll.$node.outerHeight(),exists&&PF.obj.follow_scroll.$node.closest(".follow-scroll-wrapper").css("position","")},checkDocumentHeight:function(){var lastHeight=document.body.clientHeight,newHeight,timer;!function run(){newHeight=document.body.clientHeight,lastHeight!=newHeight&&PF.obj.follow_scroll.set(),lastHeight=newHeight,timer=setTimeout(run,200)}()}},PF.obj.follow_scroll.set(),PF.obj.follow_scroll.process=function(forced){if(forced&&(PF.obj.follow_scroll.node_h=PF.obj.follow_scroll.base_h),PF.obj.follow_scroll.$node.exists()){var $parent=PF.obj.follow_scroll.$node.closest("[data-content=follow-scroll-parent]");$parent.exists()||($parent=PF.obj.follow_scroll.$node.closest(".content-width"));var $wrapper=PF.obj.follow_scroll.$node.closest(".follow-scroll-wrapper"),top=PF.obj.follow_scroll.node_h,cond=$(window).scrollTop()>PF.obj.follow_scroll.y-top;if("fixed"!==$("#top-bar").css("position")&&(PF.obj.follow_scroll.Y-=$(window).scrollTop(),PF.obj.follow_scroll.Y<0&&(PF.obj.follow_scroll.Y=0),cond=cond&&$(window).scrollTop()>PF.obj.follow_scroll.y),!(cond&&$wrapper.hasClass("position-fixed")||!cond&&!$wrapper.hasClass("position-fixed"))){if($wrapper.exists()||(PF.obj.follow_scroll.$node.wrapAll('