jQuery(function(e){"use strict";e.reduxMetaBoxes=e.reduxMetaBoxes||{};e(document).ready(function(){e.reduxMetaBoxes.init()});e.reduxMetaBoxes.init=function(){e.reduxMetaBoxes.notLoaded=true;e.reduxMetaBoxes.checkBoxVisibility();e(".redux-container").each(function(){e(this).parents(".postbox:first").find("h3.hndle").addClass("redux-hndle");e(this).parents(".postbox:first").addClass("redux-metabox");e(this).parents(".postbox:first").addClass("redux-"+redux.args.opt_name);if(redux.args.container_class!==""){e(this).parents(".postbox:first").addClass(redux.args.class)}});e("#page_template").change(function(){e.reduxMetaBoxes.checkBoxVisibility("page_template")});e('input[name="post_format"]:radio').change(function(){e.reduxMetaBoxes.checkBoxVisibility("post_format")});e.redux.initFields()};var t=e(".postbox");t.click(function(){if(!t.hasClass("closed")){e.redux.initFields()}});e("#publishing-action .button, #save-action .button").click(function(){window.onbeforeunload=null});var n;e.reduxMetaBoxes.checkBoxVisibility=function(t){if(reduxMetaboxes.length!==0){e.each(reduxMetaboxes,function(r,i){e.each(i,function(i,s){if(i===t||!t){if(i==="post_format"){n=e("input:radio[name='post_format']:checked").val()}else{n=e("#"+i).val()}if(n){var o=false;e.each(s,function(e,t){if(t===n){o=true}});if(!o&&!e.reduxMetaBoxes.notLoaded){e("#"+r).hide()}else if(!o){e("#"+r).fadeOut("50");e.redux.initFields()}else{e("#"+r).fadeIn("300");e.redux.initFields()}}}})})}}})