// JavaScript Document
var blocCible;

$(document).ready(function() {
		
	var vidID = getParameterByName('vidID');
	if (vidID != "") afficherFull(vidID)
	else {
						   
   $(".videos_bloc_thumb").click(function() {
     
	 afficherFull(this.id);
	 
   });
	}
   
 });


function afficherFull(id) {
$(".videos_bloc_full").hide();
$(".videos_bloc_thumb").show();
blocCible = "#bloc"+id+ " > .videos_bloc_full";
blocThumb = "#bloc"+id+ " > .videos_bloc_thumb";

$.ajax({
  url: "scripts/php/videofull.php",
  cache: false,
  type: "POST",
  data:"vidID=" + id,
  success: function(html){
	$(blocThumb).hide(); 
    $(blocCible).html(html);
	$(blocCible).fadeIn();
  }
});
       
}

function getParameterByName( name ) 
{ 
  name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]"); 
  var regexS = "[\\?&]"+name+"=([^&#]*)"; 
  var regex = new RegExp( regexS ); 
  var results = regex.exec( window.location.href ); 
  if( results == null ) 
    return ""; 
  else 
    return results[1]; 
} 

        
      
      
  
  
    