(function(){'use strict';var g;var l=["-ms-","-moz-","-webkit-",""],m=function(a,c){for(var b,d,e=0;e .gwd-page";c=r(a,"center",0,0)+r(a,"top",0,b)+r(a,"bottom",0,-b)+r(a,"left",c,0)+r(a,"right",-c,0);b=document.createElement("style");void 0!==b.cssText?b.cssText=c:(b.type="text/css",b.innerText=c);document.head.appendChild(b);this.B=b}this.addEventListener("pageload",this.A,!1);document.body.addEventListener("shake",this.u,!0);document.body.addEventListener("tilt", this.v,!0);document.body.addEventListener("rotatetoportrait",this.s,!0);document.body.addEventListener("rotatetolandscape",this.o,!0)};x.prototype.detachedCallback=function(){this.removeEventListener("pageload",this.A,!1);document.body&&(document.body.removeEventListener("shake",this.u,!0),document.body.removeEventListener("tilt",this.v,!0),document.body.removeEventListener("rotatetoportrait",this.s,!0),document.body.removeEventListener("rotatetolandscape",this.o,!0))}; var z=function(a,c,b,d,e,h){if(!(a.b==c||0>c||c>a.a.length-1||a.c)){var f=a.a[a.b],k=a.a[c];a.b=c;a.c=new n(f,k,a.D,b,d,e,h);var v=k.gwdLoad&&!k.gwdIsLoaded();a.m=v;w(k,function(){k.gwdActivate();v?k.gwdLoad():y(this)}.bind(a));a.appendChild(k)}};x.prototype.H=function(a){this.m&&a.target.parentNode==this&&(y(this),this.m=!1)};var y=function(a){u("pagetransitionstart",a);a.c.start()};g=x.prototype; g.F=function(){if(this.c){var a=this.c.j,c=this.c.f;this.c=null;u("pagetransitionend",this,{outgoingPage:a?a:null,incomingPage:c});a&&a.gwdDeactivate();c.gwdPresent()}};g.findPageIndexByAttributeValue=function(a,c){for(var b=this.a.length,d,e=0;e=this.a.length&&(f=a?0:h);z(this,f,c,b,d,e)}; g.goToPreviousPage=function(a,c,b,d,e){var h=this.b,f=this.a.length,k=h-1;0>k&&(k=a?f-1:h);z(this,k,c,b,d,e)};g.goToPage=function(a,c,b,d,e){this.a.length?(a="number"==typeof a?a:this.findPageIndexByAttributeValue("id",a),0<=a&&z(this,a,c,b,d,e)):this.C=a};g.G=function(){return 0<=this.b?this.b:void 0};g.getPages=function(){return this.a};g.getPage=function(a){if("number"!=typeof a){if(!a)return null;a=this.findPageIndexByAttributeValue("id",a)}return 0>a||a>this.a.length-1?null:this.a[a]}; g.getCurrentPage=function(){return this.getPage(this.b)};g.getDefaultPage=function(){var a=this.getAttribute("default-page");return a?this.getPage(this.findPageIndexByAttributeValue("id",a)):this.getPage(0)};g.getOrientationSpecificPage=function(a,c){c=this.getPage(c);var b=c.getAttribute("alt-orientation-page");if(!b)return c;var d=c.isPortrait();a=1==a;b=this.getPage(b);return a==d?c:b};g.h=function(a,c){if(c.target==document.body){var b=this.getPage(this.b);u(a,b,c.detail)}}; g.getElementById=function(a){for(var c=this.a.length,b=0;b