/*! device.js 0.1.58 */ (function(){var a,b,c,d,e,f,g,h,i,j;a=window.device,window.device={},c=window.document.documentelement,j=window.navigator.useragent.tolowercase(),device.ios=function(){return device.iphone()||device.ipod()||device.ipad()},device.iphone=function(){return d("iphone")},device.ipod=function(){return d("ipod")},device.ipad=function(){return d("ipad")},device.android=function(){return d("android")},device.androidphone=function(){return device.android()&&d("mobile")},device.androidtablet=function(){return device.android()&&!d("mobile")},device.blackberry=function(){return d("blackberry")||d("bb10")||d("rim")},device.blackberryphone=function(){return device.blackberry()&&!d("tablet")},device.blackberrytablet=function(){return device.blackberry()&&d("tablet")},device.windows=function(){return d("windows")},device.windowsphone=function(){return device.windows()&&d("phone")},device.windowstablet=function(){return device.windows()&&d("touch")},device.fxos=function(){return(d("(mobile;")||d("(tablet;"))&&d("; rv:")},device.fxosphone=function(){return device.fxos()&&d("mobile")},device.fxostablet=function(){return device.fxos()&&d("tablet")},device.meego=function(){return d("meego")},device.mobile=function(){return device.androidphone()||device.iphone()||device.ipod()||device.windowsphone()||device.blackberryphone()||device.fxosphone()||device.meego()},device.tablet=function(){return device.ipad()||device.androidtablet()||device.blackberrytablet()||device.windowstablet()||device.fxostablet()},device.portrait=function(){return 90!==math.abs(window.orientation)},device.landscape=function(){return 90===math.abs(window.orientation)},device.noconflict=function(){return window.device=a,this},d=function(a){return-1!==j.indexof(a)},f=function(a){var b;return b=new regexp(a,"i"),c.classname.match(b)},b=function(a){return f(a)?void 0:c.classname+=" "+a},h=function(a){return f(a)?c.classname=c.classname.replace(a,""):void 0},device.ios()?device.ipad()?b("ios ipad tablet"):device.iphone()?b("ios iphone mobile"):device.ipod()&&b("ios ipod mobile"):device.android()?device.androidtablet()?b("android tablet"):b("android mobile"):device.blackberry()?device.blackberrytablet()?b("blackberry tablet"):b("blackberry mobile"):device.windows()?device.windowstablet()?b("windows tablet"):device.windowsphone()?b("windows mobile"):b("desktop"):device.fxos()?device.fxostablet()?b("fxos tablet"):b("fxos mobile"):device.meego()?b("meego mobile"):b("desktop"),e=function(){return device.landscape()?(h("portrait"),b("landscape")):(h("landscape"),b("portrait"))},i="onorientationchange"in window,g=i?"orientationchange":"resize",window.addeventlistener?window.addeventlistener(g,e,!1):window.attachevent?window.attachevent(g,e):window[g]=e,e()}).call(this);