var firstTime=false;var saveCallbackFunction=null;var should_load_after_callback=false;pixflow_control_loading();jQuery(document).ready(function($){"use strict";var $t=true;$(".accordion-section-content").niceScroll({horizrailenabled:false,cursorcolor:"rgba(204, 204, 204, 0.2)",cursorborder:"1px solid rgba(204, 204, 204, 0.2)",cursorwidth:"2px",railoffset:{top:0,left:10}});pixflow_create_add_element_btn();pixflow_themeVersion();var settingSvg='';var saveCountDown,settingCountDown,pannelFlag=false;function pixflow_hidePannel(){"use strict";if(pannelFlag){$("body").click();var $target_el=$(".customizer-btn.setting .cd-dropdown-wrapper");$target_el.removeClass("active-dropdown-view");setTimeout(function(){$target_el.css({display:"none"})},900)}}$(".customizer-btn.setting").click(function(){var $target_el=$(this).find(".cd-dropdown-wrapper");$target_el.css({display:"block"});setTimeout(function(){$target_el.addClass("active-dropdown-view")},10)});$(".customizer-btn.setting").mouseleave(function(){settingCountDown=setTimeout(function(){pannelFlag=true;pixflow_hidePannel()},500)});$(".customizer-btn.setting").mouseenter(function(){pannelFlag=false});$(".customizer-btn.setting").mouseover(function(){clearTimeout(settingCountDown)});$("#save-btn").mouseleave(function(){saveCountDown=setTimeout(function(){$("#save-btn .cd-dropdown-wrapper .circle").css("transition-duration","1ms")},500)});$("#save-btn").mouseover(function(){clearTimeout(saveCountDown)});$("body").click(function(){$(".cd-dropdown-wrapper ul li .cd-dropdown-option").css({"background-image":"none"})});$(".cd-dropdown-wrapper ul li:not(.description)").click(function(e){e.stopPropagation();$(".cd-dropdown ul li .circle").removeClass("expand");$(this).find(".circle").addClass("expand")});$("#customize-preview .customizer-btn .cd-dropdown-wrapper").mousemove(function(){$(this).prev().css({display:"none",top:"5px",opacity:"0"})});var customizerLoader=$('
'+'
'+'loading
"+"");$(".customizer-loading").css("display","block");customizerLoader.appendTo("body");var leave_customizer_msg="You're about to leave Site Setting",edit_content_msg="You're about to edit content",add_element_msg="You're about to add element";$(".md-shortcode-bt-customizer,"+".customizer-options-menu a.dashboard,"+".customizer-options-menu a.builder,"+".customizer-options-menu .close a").click(function(e){var $that=$(this);if($("#save").attr("value")!="Saved"){should_load_after_callback=true;saveCallbackFunction=function(){var href=$that.attr("href");if(typeof href=="undefined"||href==""){window.location=wp.customize.previewer.previewUrl()+"?mbuilder=true"}else{window.location=$that.attr("href")}};if($that.hasClass("md-shortcode-bt-customizer")){var leave_msg=add_element_msg}else if($that.hasClass("builder")){var leave_msg=edit_content_msg}else{var leave_msg=leave_customizer_msg}pixflow_messageBox(leave_msg,"","Would you mind save your changes before leaving?","Update First",function(){$(window).unbind("beforeunload");$("#save-btn").click()},"Just Leave",function(){$(window).unbind("beforeunload");var href=$that.attr("href");if(typeof href=="undefined"||href==""){window.location=wp.customize.previewer.previewUrl()+"?mbuilder=true"}else{window.location=$that.attr("href")}},function(){return false});e.preventDefault();return false}});$(".customizer-btn.builder").click(function(){if(should_load_after_callback){saveCallbackFunction=function(){if(wp.customize.previewer.previewUrl().search(/[?]/)==-1){window.location=wp.customize.previewer.previewUrl()+"?mbuilder=true"}else{window.location=wp.customize.previewer.previewUrl()+"&mbuilder=true"}}}else{if(wp.customize.previewer.previewUrl().search(/[?]/)==-1){window.location=wp.customize.previewer.previewUrl()+"?mbuilder=true"}else{window.location=wp.customize.previewer.previewUrl()+"&mbuilder=true"}}});$("li.close a.customizer-btn").attr("href",wp.customize.previewer.previewUrl())});function pixflow_themeVersion(){var mdThemeVersion=customizerValues.md_theme_version;$("#customize-controls").append('