$(function(){ //remove theme stylesheet /* document.getElementsByTagName("link")[0].setAttribute("href",""); */ var deviceBB = "blackberry"; var uagent = navigator.userAgent.toLowerCase(); if ($(document).getUrlParam("redirect")=="mobile"){ /*Do nothing*/ } else { if(navigator.userAgent.match(/iPhone/i) || navigator.userAgent.match(/iPod/i)){ window.location = "http://m.englewoodcommhospital.com"; } else if(navigator.userAgent.match(/iPad/i)){ /*Nada*/; } else if(uagent.search(deviceBB) > -1){ window.location = "http://m.englewoodcommhospital.com"; } } $('#fadeshow').cycle({ fx: 'fade', speed: 1000, timeout: 6000, pause: 1 }); //Autoupdate ER Wait feed autoupdate(); //Refreshes content every 5 mins setInterval("autoupdate()", 300 * 1000); }); function autoupdate(){ $("#pubdate").empty(); $("#wait-time").empty(); $.ajax({ type: "GET", url: "/cpm/rss/wfl_rss_feed.xml", dataType: "xml", success: function(xml){ var hospital = $(xml).find("item:eq(7)"); var pub = hospital.find("pubDate").text(); var wait = hospital.find("description").text(); $("#pubdate").append(pub); $("#wait-time").append(wait); } }); }