!function(e,o){function t(){e(".header__logo").hide(),"logo"==wp.customize("briar_header").get()?e(".header__logo .site-logo").closest(".header__logo").show():e(".header__logo .site-title").closest(".header__logo").show()}function i(e,t){var e=new o.tree.Color(e.replace("#","")),t=new o.tree.Dimension(t,"%");return o.functions.functionRegistry._data.lighten(e,t).toRGB()}function s(e,t){var e=new o.tree.Color(e.replace("#","")),t=new o.tree.Dimension(t,"%");return o.functions.functionRegistry._data.darken(e,t).toRGB()}function n(){var o,t=!1,n=[],r=wp.customize("briar_anchor_color").get(),l="a:hover, a:focus{color: "+r+";}",a=".post-item a{color: "+r+";} .post-item a:hover, .post-item a:focus{border-bottom-color: "+r+";}",d=".error-message a{color: "+r+";}.error-message a:hover, .error-message a:focus{border-bottom-color: "+r+";}.widget a:hover, .widget a:focus{color: "+r+";}",c=wp.customize("briar_header_color").get(),p=".header{border-top-color: "+c+";}.header--borders:before, .header--borders:after{background-color: "+c+";}.header--transparent .header__logo-link{background-color: "+c+";} .header--transparent .header__logo-link:hover, .header--transparent .header__logo-link:focus{color: "+c+";}",h=wp.customize("briar_menu_color").get(),f=".main-nav .menu-item-has-children > .dropdown-nav__link{border-bottom-color: "+h+";}.main-nav .menu-item-has-children > .dropdown-nav__link:focus{border-color: "+h+";}.dropdown-nav{background-color: "+h+";}.dropdown-nav__toggle{background-color: "+h+";border-color: "+h+";}.dropdown-nav__toggle:hover{border-color: "+h+";}.dropdown-nav__toggle:hover span{background: "+h+";}.dropdown-nav__toggle:hover span:after, .dropdown-nav__toggle:hover span:before{background: "+h+";}.dropdown-nav__toggle:focus span, .dropdown-nav__toggle:hover span{background: "+h+";}.dropdown-nav__toggle:focus span:after, .dropdown-nav__toggle:hover span:after, .dropdown-nav__toggle:focus span:before, .dropdown-nav__toggle:hover span:before{background: "+h+";}",g=wp.customize("briar_footer_color").get(),v=".footer:after{background-color: "+g+";}.footer__copyright a:hover, .footer__copyright a:focus{color: "+g+";}",m=wp.customize("briar_logo_color").get(),w=".btn--logo{border-color: "+m+";color: "+m+";}.btn--logo:hover, .btn--logo:focus{background-color: "+m+";}",b=wp.customize("briar_readmore_color").get(),y=".btn--more-posts{border-color: "+b+";color: "+b+";}.btn--more-posts:hover, .btn--more-posts:focus{background-color: "+b+";}",k=wp.customize("briar_comments_button_color").get(),_=".fixed-footer__btn--red{background: "+k+";}.fixed-footer__btn--red:hover, .fixed-footer__btn--red:focus{background: "+i(k,5)+";}",S=wp.customize("briar_comments_submit_button_color").get(),T=".form-submit .submit{background-color: "+S+";}",C=wp.customize("briar_title_hover_color").get(),$=".post-list .post-item__title a:hover, .post-list .post-item__title a:focus{color: "+C+";}",x=wp.customize("briar_prev_next_posts_color").get(),z=".post-list-nav__prev a, .post-list-nav__next a{ background-color: "+x+"; }.post-list-nav__prev a:hover, .post-list-nav__next a:hover, .post-list-nav__prev a:focus, .post-list-nav__next a:focus{background-color: "+s(x,7)+";}",A=wp.customize("briar_search_button_color").get(),O=".search-form__button{background: "+A+";}.search-form__button:hover, .search-form__button:focus{background-color: "+s(A,7)+";}",P=wp.customize("briar_audio_color").get(),j=".mejs-controls .mejs-time-rail .mejs-time-loaded, .mejs-controls .mejs-horizontal-volume-slider .mejs-horizontal-volume-current{background-color: "+P+" !important;}",H=wp.customize("briar_gallery_arrows_color").get(),M=".gallery-slider .slick-arrow:before{background-color: "+H+";}",I=wp.customize("briar_blog_post_pagination_color").get(),L=".pagination li a{background-color: "+I+";}.pagination li:hover, .pagination li:focus{background-color: "+i(I,5)+";}.pagination .current{background-color: "+s(I,4)+";}",D=wp.customize("briar_password_protected_button_color").get(),E='.post-password-form input[type="submit"]{background-color: '+D+';}.post-password-form input[type="submit"]:hover, .post-password-form input[type="submit"]:focus{background-color: '+s(D,7)+";}";void 0!==u[r]&&r==c&&c==h&&h==g&&g==m&&m==b&&b==k&&k==S&&S==x&&x==A&&A==P&&P==H&&H==I&&I==D&&(t=!0),n.push(l),n.push(p),n.push(f),n.push(v),n.push(w),n.push(y),n.push(a),n.push(_),n.push(T),n.push($),n.push(z),n.push(d),n.push(O),n.push(j),n.push(M),n.push(L),n.push(E),o=n.join("\n"),0==t?wp.customize.preview.window[0].parent.wp.customize("briar_custom_style").get()!==o&&wp.customize.preview.window[0].parent.wp.customize("briar_custom_style").set(o):""!==wp.customize.preview.window[0].parent.wp.customize("briar_custom_style").get()&&wp.customize.preview.window[0].parent.wp.customize("briar_custom_style").set(""),e("style#customize-preview-style").html(o)}function r(e){e.bind(n)}wp.customize("blogname",function(o){o.bind(function(o){e("a.site-title").text(o)})}),wp.customize("blogdescription",function(o){o.bind(function(o){e(".featured-hero__title").text(o)})}),wp.customize("briar_header",function(e){t(),e.bind(t)}),wp.customize("briar_header_logo",function(o){o.bind(function(o){e(".header__logo .site-logo img").hide(),o?e(".header__logo .site-logo img:not(.default)").attr("src",o).show():e(".header__logo .site-logo img.default").show()})}),wp.customize("briar_footer_social_buttons",function(o){o.bind(function(o){var t="";e.each(o,function(e,o){t+='
  • \n'}),e("#footer ul.social-nav").html(t)})});var l=function(){var o=e("body").attr("class").split(/\s+/),t="global";return e.inArray("archive",o)>-1&&(t="archive"),e.inArray("category",o)>-1&&(t="category_archive"),e.inArray("search",o)>-1&&(t="search"),e.inArray("error404",o)>-1&&(t="404"),e.inArray("single",o)>-1&&(t="single"),e.inArray("page",o)>-1&&(t="page"),e.inArray("home",o)>-1&&(t="home"),e.inArray("blog",o)>-1&&"page"==wp.customize("show_on_front").get()&&(t="blog"),wp.customize("briar_"+t+"_layout").get()},a=e(".briar-main-class"),d=e(".briar-sidebar-class"),c=function(){if(a.length&&d.length){var o=l();"disabled"==o&&(o=wp.customize("briar_global_layout").get()),a.removeClass("col-md-12 col-md-8 col-md-push-4 col-lg-8 col-md-10 col-lg-offset-2 col-md-offset-1"),d.removeClass("col-md-pull-8").show(),"none"==o?(e("body").hasClass("single")?a.addClass("col-lg-8 col-md-10 col-lg-offset-2 col-md-offset-1"):a.addClass("col-md-12"),d.hide()):(a.addClass("col-md-8"),"left"==o&&(a.addClass("col-md-push-4"),d.addClass("col-md-pull-8"))),e(window).trigger("resize")}},p=function(e){e.bind(c)};wp.customize("briar_global_layout",p),wp.customize("briar_home_layout",p),wp.customize("briar_blog_layout",p),wp.customize("briar_archive_layout",p),wp.customize("briar_category_archive_layout",p),wp.customize("briar_search_layout",p),wp.customize("briar_404_layout",p),wp.customize("briar_single_layout",p),wp.customize("briar_page_layout",p),wp.customize("show_on_front",p),e(document).on("ready",c),e(document).on("click","a",c);var u={"#f15156":"red","#e8813d":"orange","#f5d13d":"yellow","#2980b9":"blue","#b365d3":"violet","#27ae60":"green"};wp.customize("briar_anchor_color",r),wp.customize("briar_header_color",r),wp.customize("briar_menu_color",r),wp.customize("briar_footer_color",r),wp.customize("briar_logo_color",r),wp.customize("briar_readmore_color",r),wp.customize("briar_comments_button_color",r),wp.customize("briar_comments_submit_button_color",r),wp.customize("briar_title_hover_color",r),wp.customize("briar_prev_next_posts_color",r),wp.customize("briar_search_button_color",r),wp.customize("briar_audio_color",r),wp.customize("briar_gallery_arrows_color",r),wp.customize("briar_blog_post_pagination_color",r),wp.customize("briar_password_protected_button_color",r),e(document).on("ready",n)}(jQuery,less);