var RadioNG = {
	
	Reload: function(){
		window.location.reload();
	},
	
	EnhancePage: function() {
		RadioNG.service = 'radionangaidheal';
		RadioNG.Add.scheduleSwitcherRollovers();
		RadioNG.Add.listenAgain();
		},

		
	Add: {
		scheduleSwitcherRollovers: function(){
			 //console.log("schedule switcher function invoked");
			 var $ = glow.dom.get, scheduleBtns = $(".schedule ul.prog-btns a");
				scheduleBtns.each(function(){
						glow.events.addListener(this, "mouseover", function() {
							 //console.log(this);
							 scheduleBtns.removeClass("active");
							 $(this).addClass("active"); 
						});
				});

		}, 
		listenAgain: function(){
			// console.log("listen again link function invoked");
			 var $ = glow.dom.get, listenAgainLinks = $("a.listenagain");
				listenAgainLinks.each(function(){
						glow.events.addListener(this, "click", function(e) {
							e.preventDefault();
							radioscotlandPlayerPopup(this.href);
						});
				});
		}
	}
};	


function radionangaidhealPlayerPopup(URL){
	window.open(URL,'aod','width=512,height=270,toolbar=no,personalbar=no,location=no,directories=no,statusbar=no,menubar=no,status=no,resizable=yes,left=60,screenX=60,top=100,screenY=100');
}

function radioscotlandPlayerPopup(URL){
	window.open(URL,'aod','width=512,height=270,toolbar=no,personalbar=no,location=no,directories=no,statusbar=no,menubar=no,status=no,resizable=yes,left=60,screenX=60,top=100,screenY=100');
}		