!function($,e){"use strict";function t(e,t){$("style."+e).length>0?$("style."+e).html(t):$("head").append("<style medial='all' class='"+e+"' type='text/css'>"+t+"</style>")}$("body").on("change_layout_width",function(e,o){var i="";i+=".ct-layout--boxed .ct-site{max-width: "+o+"px}",i.length>0&&t("change_layout_width",i)}),$("body").on("change_grid_width",function(e,o){var i="";i+=".ct-layout--fixed .container-fluid{max-width: "+o+"px}",i.length>0&&t("change_grid_width",i)}),$("body").on("change_header_height",function(e,o){var i="";i+=".ct-layout--without-slider.ct-hero--with-image .ct-header__hero, .ct-layout--without-slider.ct-hero--with-image .ct-header__main-heading{min-height: "+o+"px}",i.length>0&&t("change_header_height",i)}),wp.customize("header_heading_top",function(e){e.bind(function(e){$(".ct-header__main-heading-title").css("padding-top",e/16+"rem")})}),wp.customize("header_heading_bot",function(e){e.bind(function(e){$(".ct-header__main-heading-title").css("padding-bottom",e/16+"rem")})}),wp.customize("heading_alignment",function(e){e.bind(function(e){$("body").removeClass("ct-hero--left ct-hero--center ct-hero--right").addClass("ct-hero--"+e)})}),wp.customize("heading_alignment_text",function(e){e.bind(function(e){$("body").removeClass("ct-hero--text-left ct-hero--text-center ct-hero--text-right").addClass("ct-hero--text-"+e)})}),wp.customize("heading_position",function(e){e.bind(function(e){$("body").removeClass("ct-hero--bottom ct-hero--top ct-hero--middle").addClass("ct-hero--"+e)})}),wp.customize("header_image_repeat",function(e){e.bind(function(e){$("body").removeClass("ct-hero-image--no-repeat ct-hero-image--repeat ct-hero-image--repeat-x ct-hero-image--repeat-y").addClass("ct-hero-image--"+e)})}),wp.customize("header_image_att",function(e){e.bind(function(e){$("body").removeClass("ct-hero-image--scroll ct-hero-image--fixed").addClass("ct-hero-image--"+e)})}),wp.customize("header_image_size",function(e){e.bind(function(e){$("body").removeClass("ct-hero-image--cover ct-hero-image--auto").addClass("ct-hero-image--"+e)})}),wp.customize("header_image_alignment",function(e){e.bind(function(e){$("body").removeClass("ct-hero-image--left-top ct-hero-image--center-top ct-hero-image--right-top ct-hero-image--left-bottom ct-hero-image--center-bottom ct-hero-image--right-bottom ct-hero-image--left-center ct-hero-image--center-center ct-hero-image--right-center").addClass("ct-hero-image--"+e+"-"+wp.customize.instance("header_image_position").get())})}),wp.customize("header_image_position",function(e){e.bind(function(e){$("body").removeClass("ct-hero-image--left-top ct-hero-image--center-top ct-hero-image--right-top ct-hero-image--left-bottom ct-hero-image--center-bottom ct-hero-image--right-bottom ct-hero-image--left-center ct-hero-image--center-center ct-hero-image--right-center").addClass("ct-hero-image--"+wp.customize.instance("header_image_alignment").get()+"-"+e)})}),wp.customize("layout",function(e){e.bind(function(e){e===!0?$("body").removeClass("ct-layout--boxed ct-layout--full").addClass("ct-layout--boxed"):$("body").removeClass("ct-layout--boxed ct-layout--full").addClass("ct-layout--full")})}),wp.customize("layout_fixed",function(e){e.bind(function(e){e===!0?$("body").removeClass("ct-layout--fixed ct-layout--fluid").addClass("ct-layout--fluid"):$("body").removeClass("ct-layout--fixed ct-layout--fluid").addClass("ct-layout--fixed")})}),wp.customize("layout_box_width",function(e){e.bind(function(e){$("body").trigger("change_layout_width",[e])})}),wp.customize("layout_grid_width",function(e){e.bind(function(e){$("body").trigger("change_grid_width",[e])})}),wp.customize("header_height",function(e){e.bind(function(e){$("body").trigger("change_header_height",[e])})})}(jQuery,wp.customize);