	var defaultvideo;
	var myPlayer;

	$(document).ready(function()
    {

	if ((pagename == '') || (pagename == 'home') || (pagename == 'commercials') || (pagename == 'features')) {
			playvideo(0,0,pagename+"/LAUNCH/launch.m4v"); 	
		}
				
 	});

   
    
function playvideo(row, col, vidlocation){
 
	  if (vidlocation)  
	  {
		  var videofile = "/videos-"+vidlocation;
	  }
	  else 
	  {	  
	  	   var videofile = "/videos-"+pagename+"/"+row+"/"+col+"/video.m4v";	  
	  }
	  
	  $("#allthevideo").html('<video id="thevideo" class="video-js" width="720" height="480" controls preload autoplay><source src="'+videofile+'" type=\'video/mp4; codecs="avc1.42E01E, mp4a.40.2"\'><object id="thevideoflash" class="vjs-flash-fallback" width="720" height="480" type="application/x-shockwave-flash" data="/wp-content/themes/daron/includes/swf/player.swf"><param name="movie" value="/wp-content/themes/daron/includes/swf/player.swf" /><param name="flashvars" value="autostart=true&amp;controlbar=over&amp;file='+videofile+'" /></object></video>');
	  		
     // Using the video's ID or element
      myPlayer = VideoJS.setup("thevideo", {
      	//videojs options
		controlsBelow: false, // Display control bar below video instead of in front of
      	controlsHiding: true, // Hide controls when mouse is not over the video
      	defaultVolume: 0.85, // Will be overridden by user's last volume if available
      	flashVersion: 9, // Required flash version for fallback
      	linksHiding: true, // Hide download links when video is supported
      	flashIsDominant: false // Always use Flash when available
	   });
	  
      myPlayer.play(); // Starts playing the video for this player.	
}  	
