(function($)
{
	$(function(){
														 
		//var j = jQuery.noConflict();
		
		$("a.blairHover").hover(function(){
			$("div.blair").fadeIn(100);
			}, function(){
			$("div.blair").fadeOut(100);
		});
		
		$("a.jabbaHover").hover(function(){
			$("div.jabba").fadeIn(100);
			}, function(){
			$("div.jabba").fadeOut(100);
		});
		
		$("a.harryHover").hover(function(){
			$("div.harry").fadeIn(100);
			}, function(){
			$("div.harry").fadeOut(100);
		});
	
		// Video voting.
		
		$('#videoVoteList a.watch').click(function(e)
		{
			e.preventDefault();
			
			var path = $(this).parents('.videoItem').find('input[name=path]').val();
			
			GB_showCenter('Watch Video', '../../tour-video-popup.php?path=' + path, 440, 660);
		});
		
		$('#videoVoteList a.vote').click(function(e)
		{
			e.preventDefault();
			
			var videoId = $(this).parents('.videoItem').find('input[name=videoId]').val();
			
			GB_showCenter('Vote for Video', '../../tour-vote-popup.php?id=' + videoId, 730, 500);
			
			// Clear all vote buttons and change them to view votes.
			$('a.vote').html('').text('view votes');
		});
		
		$('#GB_overlay').live('click', function(e)
		{
			GB_hide();
		});
		
		// Finalist Videos.
		
		$('#finalistVideos a').click(function(e)
		{
			e.preventDefault();
			
			var path = $(this).parents('.popupLink').find('input[name=path]').val();
			
			GB_showCenter('Watch Video', '../../tour-video-popup.php?path=' + path, 440, 660);
		});
		
	});
})(jQuery);
