(function(){var xmlhttp;
if(window.XMLHttpRequest){xmlhttp=new XMLHttpRequest()
}else{xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")
}xmlhttp.onreadystatechange=function(){var jsondata,uagent=navigator.userAgent.toLowerCase(),supportedDeviceList,redirectedDevice,noIOsCookie=!document.cookie.match(/iOsRedirectSkipped=true/i),noMobileCookie=!document.cookie.match(/dontgotomobile/i),origHostname=window.location.hostname;
if(xmlhttp.readyState===4){if(xmlhttp.status===200){try{jsondata=eval("("+xmlhttp.responseText+")")
}catch(e){return 
}supportedDeviceList=jsondata;
for(var i=0,length=supportedDeviceList.length;
i<length;
i+=1){redirectedDevice=supportedDeviceList[i];
if(uagent.indexOf(redirectedDevice.toLowerCase())!=-1){switch(redirectedDevice){case"ipad":if(noIOsCookie){window.location="/static/global/html/4od/ipad.html?redirectUrl="+encodeURIComponent(window.location.href)
}break;
case"iphone":case"ipod":if(noIOsCookie){window.location="/static/global/html/4od/iphone.html?redirectUrl="+encodeURIComponent(window.location.href)
}break;
default:if(noMobileCookie){if(origHostname.indexOf("www")===0){window.location.hostname="m"+origHostname.slice(origHostname.indexOf("."))
}else{window.location.hostname="m."+origHostname
}}}}}}}};
xmlhttp.open("GET","/media/scripts/deviceRedirectList.json",true);
xmlhttp.send(null)
})();
