/* krpanoJS 1.0.8.15 compass plugin (build 2012-08-10) */
var krpanoplugin=function(){function f(b){var g=d?top.orientation:window.orientation;b=b.webkitCompassHeading;var e=false;if(b===undefined)window.removeEventListener("deviceorientation",f);else{if(isNaN(b))b=0;b+=g;if(b!=h){h=a.heading;a.heading=b;e=true}if(a.available==false){a.available=true;a.onavailability!=null&&c.call(a.onavailability,a);a.onavailable!=null&&c.call(a.onavailable,a)}e&&a.onchange!=null&&c.call(a.onchange,a)}}var c=null,a=null,d=false,h=Number.NaN;this.registerplugin=function(b,
g,e){c=b;a=e;if(c.version<"1.0.8.14"||c.build<"2011-03-30")c.trace(3,"compass plugin - too old krpano version (min. 1.0.8.14)");else{d=c._have_top_access;if(d===undefined){d=false;try{if(top&&top.document)d=true}catch(i){}}a.registerattribute("available",false);a.registerattribute("heading",0);a.registerattribute("onavailability",null);a.registerattribute("onavailable",null);a.registerattribute("onchange",null);window.DeviceOrientationEvent&&window.addEventListener("deviceorientation",f)}};this.unloadplugin=
function(){window.removeEventListener("deviceorientation",f);c=a=null}};
