$(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.capitalregionalmedicalcenter.com"; } else if(navigator.userAgent.match(/iPad/i)){ /*Nada*/; } else if(uagent.search(deviceBB) > -1){ window.location = "http://m.capitalregionalmedicalcenter.com"; } } //Banner rotate $('#fadeshow').cycle({ fx: 'fade', speed: 1000, timeout: 6000, pause: 1 }); //Refreshes ER Feed content every 5 mins autoupdate(); setInterval("autoupdate()", 300 * 1000); }); //ER Feed function autoupdate(){ $("#pubdate").empty(); $("#time1").empty(); $("#time2").empty(); $.ajax({ type: "GET", url: "/cpm/rss/rss_feed.xml", dataType: "xml", success: function(xml){ var hospital = $(xml).find("item:eq(0)").find("description").text(); var hospital2 = $(xml).find("item:eq(7)").find("description").text(); var pub = $(xml).find("item:eq(0)").find("pubDate").text(); $("#pubdate").append(pub); $("#time1").append(hospital+' Capital'); $("#time2").append(hospital2+' Gadsden'); } }); }