// Show Video when preview image clicked
var $jQuery = jQuery.noConflict();

$jQuery(function(){
    $jQuery('.slide-play-button').click(function(){
    $jQuery(this).parent().parent().find('.slide-preview').fadeOut(250);     
	});	
});  

  
// Show Play button on hover  
$jQuery(function(){
    $jQuery(".slide-preview").hover(function(){
      $jQuery(this).parent().find('.slide-play-button').fadeIn(250);
    }, function() {
    	 $jQuery(this).parent().find('.slide-play-button').fadeOut(250);
    });
});


// Video Gallery
$jQuery(function(){
    jQuery('#gallery .inside .thumbnail').click(function(){
    
    var videoFrame = $jQuery(this).parent().parent().find("#top").find("#gallery-frame").find("#videoFrame");  
    var videosHidden = $jQuery(this).parent().parent().find("#top").find("#gallery-frame").find("#videosHidden"); 
    
    var whichThumb = $jQuery(this).attr("rel");     
    var theVideo = $jQuery(this).parent().parent().find("." + whichThumb);
    
    //console.log(videoFrame.children());
      
    videosHidden.append(videoFrame.children().fadeOut(0));
        
    videoFrame.empty().append(theVideo.fadeIn(1000));
    
          
    });                                                     
});
      

   



          
          

