/*! * jQuery Tiny Pub/Sub * https://github.com/cowboy/jquery-tiny-pubsub * * Copyright (c) 2013 "Cowboy" Ben Alman * Licensed under the MIT license. */ (function ($) { var o = $({}); $.subscribe = function () { o.on.apply(o, arguments); }; $.unsubscribe = function () { o.off.apply(o, arguments); }; $.publish = function () { o.trigger.apply(o, arguments); }; }(jQuery)); window.ET_App = window.ET_App || {}; window.et_pb_extra_load_event_fired = false; (function (exports, $) { var Elements; Elements = { cacheElements: function () { this.$window = $(window); this.$body = $('body'); this.$container = this.$body.find('#page-container'); this.$main_header = this.$container.find('> .header'); this.$main_nav = this.$container.find('#main-header'); this.main_nav_height = this.$main_nav.innerHeight(); this.$top_nav = this.$container.find('#top-header'); this.top_nav_height = this.$top_nav.innerHeight(); this.$content_area = this.$container.find('#main-content'); this.$wpadminbar = this.$body.find('#wpadminbar'); }, init: function () { this.cacheElements(); $.subscribe('et-window.resized', $.proxy(this.hasMainNavHeightChanged, this)); $.subscribe('et-window.resized', $.proxy(this.hasTopNavHeightChanged, this)); }, hasMainNavHeightChanged: function () { var current_nav_height = this.$main_nav.innerHeight(); if (current_nav_height === this.main_nav_height) { return; } this.main_nav_height = current_nav_height; $.publish('et-main_nav.changed_height'); }, hasTopNavHeightChanged: function () { var current_nav_height = this.$top_nav.innerHeight(); if (current_nav_height === this.top_nav_height) { return; } this.top_nav_height = current_nav_height; $.publish('et-top_nav.changed_height'); } }; $(function () { Elements.init(); }); $(window).resize(function () { $.publish('et-window.resized'); }); exports.Elements = Elements; })(ET_App, jQuery); (function (exports, $) { var DynamicStyles; DynamicStyles = { addRule: function (selector, rules) { this.maybeAddStyleElement(); this.elements[selector] = rules; this.render(); }, addStyleElement: function () { $('head').append('