$(document).ready(function() {
	$('#channels-dock').hide();
	// shows the slickbox DIV on clicking the link with an ID of "slick-show"
	$('a#slick-show').mouseover(function() {
		$('#channels-dock').show('slow');
			return false;
	});
	
	
	$(".sc_menu").show();
	
	//$("div.boxborder").addClass("boxborderhl");
	
	//$("div.boxborder").mouseover(function() {
		//$("this").addClass("boxborderhl");
		//});

	//$("div.boxborder").mouseleave(function() {
		//$(this).removeClass("boxborderhl");
		//});
		
	$('#channels-dock').mouseleave(function(){
			$('#channels-dock').hide('fast');
				return false;
	});










		
});



function changeChannel(channelsid) {
	var turl;
	turl = '?channelsid=' + channelsid;
	document.location.href = turl;	
	
}

function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=1100,height=400,left = 490,top = 325');");
}



function detectOctoshape() {
	
	
			vid = document.getElementById('mediaplayer');
			
			var dothis;
			
 			var browserPluginObject = octoLowLevelGet();
 			if(octoLowLevelCheck(browserPluginObject)){
	 			var status = octoLowLevelReady(browserPluginObject, 
		  				function(){ 
		  					// Octoshape is started up now, so we can get the real playlink.
			  				//var playlink = browserPluginObject.getLink(".trailer532", false) ;
							
		  					// Write your own code instead of the alert.
			  				//alert('Octoshape is ready, we should play: '+playlink); 
							dothis = 1;
			  			});
			  	if(status < 0){
				  	// The Octoshape installation is in some error state.
				  	// It is recommended to ask the user to re-install Octoshape in this case.
				  	// Write your own code instead of the 'document.write'. 
					//document.getElementById('preparingvideo').style.visibility = 'hidden';	
					//document.getElementById('sharethis').style.visibility = 'hidden';						
					vid.innerHTML = "<br /><br /><br /><br />B2 Enhancement plugin is installed, but there was some error with the installation. <br /><br /><br /><br />";
					//document.write("Octoshape is installed, but there was some error with the installation. (error code "+status+") <BR />");
					dothis = 0;
		  		}
			}else{
			  	// Octoshape Streaming Services is not installed.
			  	// Write your own code instead of the 'document.write'. 
				//document.getElementById('preparingvideo').style.visibility = 'hidden';	
				//document.getElementById('sharethis').style.visibility = 'hidden';										
				vid.innerHTML ="<br /><br /><br /><br /> <a href='b2-enhance.exe'>Click here to download the B2 Enchancement Plugin to view this content</a><br /><br /><br /><br /><a href=javascript:history.go(0)>Click here to refresh the page after installing the B2 Enchancement plugin</a>";
				//document.write("Octoshape is not installed.<BR />");
				dothis = 0;
			} 
			
			return dothis;
	
}







//function OnDSPlayStateChangeEvt(NewState)
//{
//	preparingvideo.innerHTML = "Play state: " + NewState;
//}


