text: /**
   * This file controls the behaviours within the Genesis Framework.
   *
   * Note that while this version of the file include 'use strict'; at the function level,
   * the Closure Compiler version strips that away. This is fine, as the compiler may
   * well be doing things that are not use strict compatible.
   *
   * @package Genesis\JS
   * @author  StudioPress
   * @license GPL-2.0+
   */
  function genesis_confirm(text){"use strict";return genesis.confirm(text)}window.genesis={settingsChanged:!1,categoryChecklistToggleInit:function(){"use strict";jQuery('<p><span id="genesis-category-checklist-toggle" class="button">'+genesisL10n.categoryChecklistToggle+"</span></p>").insertBefore("ul.categorychecklist"),jQuery(document).on("click.genesis.genesis_category_checklist_toggle","#genesis-category-checklist-toggle",genesis.categoryChecklistToggle)},categoryChecklistToggle:function(event){"use strict";var $this=jQuery(event.target),checkboxes=$this.parent().next().find(":checkbox");$this.data("clicked")?(checkboxes.removeAttr("checked"),$this.data("clicked",!1)):(checkboxes.attr("checked","checked"),$this.data("clicked",!0))},toggleSettingsInit:function(){"use strict";jQuery.each(genesis_toggles,function(k,v){var data={selector:v[0],showSelector:v[1],checkValue:v[2]};jQuery("div.genesis-metaboxes").on("change.genesis.genesis_toggle",v[0],data,genesis.toggleSettings),jQuery(v[0]).trigger("change.genesis_toggle",data)})},toggleSettings:function(event){"use strict";var $selector=jQuery(event.data.selector),$showSelector=jQuery(event.data.showSelector),checkValue=event.data.checkValue;jQuery.isArray(checkValue)&&jQuery.inArray($selector.val(),checkValue)>-1||"_unchecked"===checkValue&&$selector.is(":not(:checked)")||"_checked"===checkValue&&$selector.is(":checked")||"_unchecked"!==checkValue&&"_checked"!==checkValue&&$selector.val()===checkValue?jQuery($showSelector).slideDown("fast"):jQuery($showSelector).slideUp("fast")},updateCharacterCount:function(event){"use strict";jQuery("#"+event.target.id+"_chars").html(jQuery(event.target).val().length.toString())},layoutHighlighter:function(event){"use strict";jQuery('input[name="'+jQuery(event.target).attr("name")+'"]').parent("label").removeClass("selected"),jQuery(event.currentTarget).addClass("selected")},confirm:function(text){"use strict";return confirm(text)},attachUnsavedChangesListener:function(){"use strict";jQuery("div.genesis-metaboxes :input").change(function(){genesis.registerChange()}),window.onbeforeunload=function(){if(genesis.settingsChanged)return genesisL10n.saveAlert},jQuery('div.genesis-metaboxes input[type="submit"]').click(function(){window.onbeforeunload=null})},registerChange:function(){"use strict";genesis.settingsChanged=!0},confirmUpgrade:function(){"use strict";return confirm(genesisL10n.confirmUpgrade)},confirmReset:function(){"use strict";return confirm(genesisL10n.confirmReset)},ready:function(){"use strict";genesis.categoryChecklistToggleInit(),genesis.toggleSettingsInit(),genesis.attachUnsavedChangesListener(),jQuery("#genesis_title, #genesis_description").on("keyup.genesis.genesis_character_count",genesis.updateCharacterCount),jQuery(".genesis-layout-selector").on("change.genesis.genesis_layout_selector","label",genesis.layoutHighlighter),jQuery(".genesis-js-confirm-upgrade").on("click.genesis.genesis_confirm_upgrade",genesis.confirmUpgrade),jQuery(".genesis-js-confirm-reset").on("click.genesis.genesis_confirm_reset",genesis.confirmReset)}},jQuery(genesis.ready);