/*
 A fix for the dreaded iOS orientationchange zoom bug http://adactio.com/journal/5088/. Seems to work!
 Authored by @scottjehl. Props to @wilto for addressing a tilt caveat.
 MIT License.

FOR LATEST, SEE https://github.com/scottjehl/iOS-Orientationchange-Fix
*/
(function(a){function j(){c.setAttribute("content",f),document.body.innerHTML=document.body.innerHTML,g=!0}function k(){c.setAttribute("content",e),g=!1}function l(b){h=Math.abs(a.orientation),i=Math.abs(b.gamma),i>8&&h===0?g&&k():g||j()}var b=a.document;if(!b.querySelectorAll)return;var c=b.querySelectorAll("meta[name=viewport]")[0],d=c&&c.getAttribute("content"),e=d+", maximum-scale=1.0",f=d+", maximum-scale=10.0",g=!0,h=a.orientation,i=0;if(!c)return;a.addEventListener("orientationchange",j,!1),a.addEventListener("deviceorientation",l,!1)})(this);
