    // Must come after the video.js library

    // Add VideoJS to all video tags on the page when the DOM is ready
    VideoJS.setupAllWhenReady();


  $(document).ready( function () {
    
   var rep = Math.floor(Math.random() * 4);

   var newvideodatas ='<video controls="controls" autoplay="autoplay" poster="http://www.rodriguezgroup.com/videos/m'+rep+'/preview'+rep+'.jpg" width="1024" height="576"> \
    	<source src="http://www.rodriguezgroup.com/videos/m'+rep+'/movie'+rep+'.mp4" type="video/mp4" /> \
    	<source src="http://www.rodriguezgroup.com/videos/m'+rep+'/movie'+rep+'.webm" type="video/webm" /> \
    	<source src="http://www.rodriguezgroup.com/videos/m'+rep+'/movie'+rep+'.ogv" type="video/ogg" /> \
    	<object type="application/x-shockwave-flash" data="http://releases.flowplayer.org/swf/flowplayer-3.2.1.swf" width="1024" height="576"> \
  		<param name="movie" value="http://releases.flowplayer.org/swf/flowplayer-3.2.1.swf" /> \
  		<param name="allowFullScreen" value="true" /> \
  		<param name="wmode" value="transparent" /> \
		  <param name="flashVars" value="config={\'playlist\':[\'http%3A%2F%2Fwww.rodriguezgroup.com%2Fvideos%2Fm'+rep+'%2Fpreview'+rep+'.jpg\',{\'url\':\'http%3A%2F%2Fwww.rodriguezgroup.com%2Fvideos%2Fm'+rep+'%2Fmovie'+rep+'.mp4\',\'autoPlay\':true}]}" /> \
    	<img alt="Start Video" src="http://www.rodriguezgroup.com/videos/m'+rep+'/preview'+rep+'.jpg" width="1024" height="576" title="No video playback capabilities, please download the video below" /> \
    	</object> \
    </video>';
    
//    alert(newvideodatas);
  
  	$("#videodatas").empty(); 
    $("#videodatas").html(newvideodatas); 
  
  
  } ) ;
 


