!function(a){"use strict";function b(b,c){a.each(b,function(){var a=l.find('[data-vc-shortcode-param-name="'+this+'"]'),b=a.siblings(".mpc-vc-indent");c===!0?(b.addClass(m),a.addClass(m)):(b.removeClass(m),a.removeClass(m))})}function c(){var b=l.find('[data-vc-shortcode-param-name="overlay_section_divider"]').data("param_settings"),c=b.group;a.each(l.find('[data-vc-ui-element="panel-tabs-controls"] li'),function(){var b=a(this);b.find("button").text()==c&&(n===!0?b.addClass(m):b.removeClass(m))})}function d(){var b=l.find('[data-vc-shortcode-param-name="mpc_button__disable"]').data("param_settings"),c=b.group;a.each(l.find('[data-vc-ui-element="panel-tabs-controls"] li'),function(){var b=a(this);b.find("button").text()==c&&(o===!0?b.addClass(m):b.removeClass(m))})}function e(a){var c=["items_section_divider"];b(c,a)}function f(c){var d=l.find('[name="layout"]').val(),e=["title_margin_divider"],f=["overlay_title_section_divider","overlay_title_margin_divider"];"style_8"==d&&c?b(e,!1):b(e,!0),a.inArray(d,["style_1","style_4","style_6","style_7","style_8"])>-1&&!c?b(f,!1):b(f,!0)}function g(c){var d=l.find('[name="layout"]').val(),e=["description_section_divider"],f=["description_font_divider","description_padding_divider","description_margin_divider"],g=["overlay_description_section_divider","overlay_description_padding_divider","overlay_description_margin_divider"];a.inArray(d,["style_1","style_4","style_7","style_8"])>-1||c?b(f,!0):b(f,!1),a.inArray(d,["style_1","style_4","style_7","style_8"])>-1?b(e,!0):b(e,!1),"style_6"==d||c?b(g,!0):b(g,!0)}function h(){var b=l.find('[name="layout"]').val(),c=l.find('[name="meta_layout-option_date"]').is(":checked"),d=l.find('[name="disable_thumbnail"]').is(":checked"),e=!0,f="style_6"!=b||!c;return c?(a.inArray(b,["style_3","style_5","style_6"])>-1&&(e=d&&"style_5"==b),void i(e,f)):(i(e,f),!1)}function i(a,c){var d=l.find('[name="layout"]').val(),e=["date_font_divider","date_border_divider","date_padding_divider","date_margin_divider"],f=["overlay_date_section_divider","overlay_date_padding_divider","overlay_date_margin_divider"];c="style_6"!=d||c,b(e,a),b(f,c)}function j(c){var d=l.find('[name="layout"]').val(),e=["meta_font_divider","meta_margin_divider"],f=["overlay_meta_section_divider","overlay_meta_margin_divider"];b(e,c),a.inArray(d,["style_1","style_4","style_6","style_7","style_8"])>-1&&!c?b(f,!1):b(f,!0)}function k(b,f){e(a.inArray(b,["style_2","style_3","style_5"])>-1?f:!1),"style_9"==b||a.inArray(b,["style_2","style_3","style_5"])>-1&&f?(n=!0,c()):(n=!1,c()),a.inArray(b,["style_2","style_3","style_5","style_9"])==-1?(o=!0,d()):(o=!1,d())}var l=a("#vc_ui-panel-edit-element"),m="vc_dependent-hidden",n=!1,o=!1;l.on("mpc.render",function(){if("mpc_single_post"!=l.attr("data-vc-shortcode"))return"";var b=l.find('[name="layout"]'),i=l.find('[name="meta_layout"]'),m=l.find('[name="title_disable"]'),o=l.find('[name="description_disable"]'),p=l.find('[name="disable_thumbnail"]');b.on("change",function(){k(b.val(),p.is(":checked")),i.trigger("change"),m.trigger("change"),o.trigger("change"),c(),d()}),m.on("change",function(){f(m.is(":checked")),c()}),o.on("change",function(){g(o.is(":checked")),c()}),i.on("change",function(){var a=""==i.val();j(a),h(),c()}),p.on("change",function(){if(a.inArray(b.val(),["style_2","style_3","style_5"])>-1){var d=p.is(":checked");n=d,c(),e(d),i.trigger("change")}}),setTimeout(function(){b.trigger("change")},350)})}(jQuery);