text: /**
   * jQuery Viewporter Plugin 1.0.0
   *
   * Copyright (c) 2015 Chris Mohrhauser
   *
   * Dual licensed under the MIT and GPLv2 licenses:
   *   http://www.opensource.org/licenses/mit-license.php
   *   http://www.gnu.org/licenses/gpl-2.0.html
   */
  (function(g){g.viewporter=function(h){var a=this;a.curr={w:0,h:0};a.settings=g.extend({},{afixTo:"body",addEvents:!0,writeOut:!1,writeTo:"#viewporter_debug",classPrefix:"breakp-",breakPoints:"320 480 640 720 960 1024".split(" "),viewportIni:"1.0",viewportMax:"1.0",viewportScale:"0"},h);a.writeStuff=function(b){g(a.settings.writeTo).html("Page size: width="+b.w+", height="+b.h)};a.getViewportSize=function(){var b=document.querySelector("meta[name=viewport]");if(b){var f=b.getAttribute("content");b.setAttribute("content", "width=device-width, height=device-height, initial-scale=1.0, maximum-scale=1.0, user-scalable=0")}else{var d=document.createElement("meta");d.name="viewport";d.content="width=device-width, height=device-height, initial-scale="+a.settings.viewportIni+", maximum-scale="+a.settings.viewportMax+", user-scalable="+a.settings.viewportScale;document.getElementsByTagName("head")[0].appendChild(d)}var d=window,c=d.document,e={};null!=d.innerWidth&&(e={w:d.innerWidth,h:d.innerHeight});"CSS1Compat"!=document.compatMode|| e.w||(e={w:c.documentElement.clientWidth,h:c.documentElement.clientHeight});e.w||(e={w:c.body.clientWidth,h:c.body.clientHeight});b&&f&&b.setAttribute("content",f);a.curr=e;a.deciferAssert();return e};a.addEvents=function(){window.attachEvent?(window.attachEvent("onresize",function(){v=a.getViewportSize();a.settings.writeOut&&a.writeStuff(v)}),document.attachEvent("onload",function(){v=a.getViewportSize();a.settings.writeOut&&a.writeStuff(v)})):window.addEventListener&&(window.addEventListener("resize", function(){v=a.getViewportSize();a.settings.writeOut&&a.writeStuff(v)},!0),document.addEventListener("load",function(){v=a.getViewportSize();a.settings.writeOut&&a.writeStuff(v)},!0))};a.deciferAssert=function(){var b,f;for(f in a.settings.breakPoints)if(b=f,a.settings.breakPoints[f]>=a.curr.w)break;a.settings.breakPoints[b]<a.curr.w?g(a.settings.afixTo).attr("class",function(b,c){if(c)return c.replace(new RegExp("(^|\\s)"+a.settings.classPrefix+"\\S+","g"),"")}):g(a.settings.afixTo).attr("class", function(b,c){if(c)return c.replace(new RegExp("(^|\\s)"+a.settings.classPrefix+"\\S+","g"),"")}).addClass(a.settings.classPrefix+a.settings.breakPoints[b])};a.settings.addEvents&&a.addEvents();return a.getViewportSize()}})(jQuery);