/*! Released under the MIT license (see LICENSE file) © 2017 Marcel Greter (https://github.com/mgreter) Media Query Scope is a library to detect the currently active media queries */; (function(){var c=function(e,d){this.identLevels=e||{};"undefined"!=typeof d&&(this.identLevels["default"]=this.mapToLevel(d));if("undefined"==this.identLevels["default"])throw Error("Missing Default MediaQuery Level");this.onChangeHandlers=[];this.boundResize=!1;this.init()};(function(){function e(a,b){return b.prio-a.prio}function d(){var a=this.currentLevel,b=this.getCurrentLevel();if(a==b)return!0;this.currentLevel=b;for(var d=this.onChangeHandlers,c=0;c").attr("id","media-query-scope").css(c).appendTo("BODY"));this.probe=this.context?jQuery("
").css(c).addClass(this.context).appendTo(this.root):this.root;this.currentLevel=this.getCurrentLevel()};this.mapLevelToIdent=function(a){if(0===arguments.length)throw"needed level param is not given"; for(var b in this.identLevels)if(a==this.identLevels[b])return b;throw"ident is not defined for level: "+a;};this.mapIdentToLevel=function(a){if(0===arguments.length)throw"needed ident param is not given";if("undefined"===typeof this.identLevels[a])throw"level is not defined for ident: "+a;return this.identLevels[a]};this.mapToLevel=function(a){return isNaN(a)?this.mapIdentToLevel(a):a};this.mapToIdent=function(a){return isNaN(a)?a:this.mapLevelToIdent(a)};this.getLevel=function(a){return 0===arguments.length? this.getCurrentLevel():this.mapToLevel(a)};this.getIdent=function(a){return 0===arguments.length?this.getCurrentIdent():this.mapToIdent(a)};this.getCurrentLevel=function(){var a=this.probe.css("z-index");if(a&&"auto"!==a||(a=this.root.css("z-index"))&&"auto"!==a)return parseInt(a,10);throw"no z-index set in css";};this.getCurrentIdent=function(){var a=this.getCurrentLevel();return this.mapLevelToIdent(a)};this.is=function(a){return isNaN(a)?this.getCurrentIdent()===a:this.getCurrentLevel()===a};this.not= function(a){return!this.is(a)};this.lt=function(a){a=this.mapToLevel(a);return this.getCurrentLevel()a};this.ge=function(a){return!this.lt(a)};this.eq=this.is;this.ne=this.not;this.updateLayout=d;this.onChange=function(a,b){a.prio=b||0;this.onChangeHandlers.push(a);this.onChangeHandlers.sort(e);b=this.getLevel("default");if(!this.boundResize)this.boundResize=!0,this.currentLevel=b,a=jQuery.proxy(d, this),jQuery(self).bind("resize",a),this.getCurrentLevel()!=this.currentLevel&&(this.pending=setTimeout(a,0));else if(!this.pending){var c=this.getCurrentLevel();c!=b&&a.call(this,c,b)}}}).call(c.prototype);"undefined"==typeof OCBNET&&(window.OCBNET={});OCBNET.MediaQuery=c})();