// JavaScript Document

// jQuery

$(document).ready(function(){
						   
	/////// about_dropdown functionality ///////
	
	$('#about_dropdown').hide();
	
	$('#about').mouseover(function(){
     	$('#about_dropdown').show();
   	});
	
	$('#about_dropdown').mouseover(function(){
     	$('#about_dropdown').show();
   	});
	
	
	$('#about').mouseout(function(){
     	$('#about_dropdown').hide();
   	});
	
	$('#about_dropdown').mouseout(function(){
     	$('#about_dropdown').hide();
   	});
	
	/////// history_dropdown functionality ///////
	
	$('#history_dropdown').hide();
	
	$('#history').mouseover(function(){
     	$('#history_dropdown').show();
   	});
	
	$('#history_dropdown').mouseover(function(){
     	$('#history_dropdown').show();
   	});
	
	
	$('#history').mouseout(function(){
     	$('#history_dropdown').hide();
   	});
	
	$('#history_dropdown').mouseout(function(){
     	$('#history_dropdown').hide();
   	});
	
	/////// education_dropdown functionality ///////
	
	$('#education_dropdown').hide();
	
	$('#education').mouseover(function(){
     	$('#education_dropdown').show();
   	});
	
	$('#education_dropdown').mouseover(function(){
     	$('#education_dropdown').show();
   	});
	
	
	$('#education').mouseout(function(){
     	$('#education_dropdown').hide();
   	});
	
	$('#education_dropdown').mouseout(function(){
     	$('#education_dropdown').hide();
   	});
	
	/////// support_dropdown functionality ///////
	
	$('#support_dropdown').hide();
	
	$('#support').mouseover(function(){
     	$('#support_dropdown').show();
   	});
	
	$('#support_dropdown').mouseover(function(){
     	$('#support_dropdown').show();
   	});
	
	
	$('#support').mouseout(function(){
     	$('#support_dropdown').hide();
   	});
	
	$('#support_dropdown').mouseout(function(){
     	$('#support_dropdown').hide();
   	});
	
	/////// events_dropdown functionality ///////
	
	$('#events_dropdown').hide();
	
	$('#events').mouseover(function(){
     	$('#events_dropdown').show();
   	});
	
	$('#events_dropdown').mouseover(function(){
     	$('#events_dropdown').show();
   	});
	
	
	$('#events').mouseout(function(){
     	$('#events_dropdown').hide();
   	});
	
	$('#events_dropdown').mouseout(function(){
     	$('#events_dropdown').hide();
   	});
	
	/////// rewrite link for poster on homepage ///////
	
	$('#posters p a').attr('href' , '/?page_id=588');

					   
	/////// sponsors div expands in height ///////
	
	$('#tab_text').toggle(function() {
							  
		$('#sponsors_expandable').animate({height:180}, 500);
		},function(){$('#sponsors_expandable').animate({height:92}, 500);
		
		
	}); // closes footer animation
						   
						   
	$('#tab_text').toggle(function() {
							  
			$('#tab_text').html('<p class="footer_text">CLOSE</p>');
			},function(){$('#tab_text').html('<p class="footer_text">MORE SPONSORS</p>');
			
	}); // closes tab text rewrite
	
	
	/////// adding rel=lightbox-gallery to gallery thumbnails, to allow Slimbox to work ///////
	
	$('#gallery-1 .gallery-item a').attr('rel' , 'lightbox-gallery1');
	$('#gallery-2 .gallery-item a').attr('rel' , 'lightbox-gallery2');
	$('#gallery-3 .gallery-item a').attr('rel' , 'lightbox-gallery3');
	$('#gallery-4 .gallery-item a').attr('rel' , 'lightbox-gallery4');
	$('#gallery-5 .gallery-item a').attr('rel' , 'lightbox-gallery5');
	$('#gallery-6 .gallery-item a').attr('rel' , 'lightbox-gallery6');
	$('#gallery-7 .gallery-item a').attr('rel' , 'lightbox-gallery7');
	$('#gallery-8 .gallery-item a').attr('rel' , 'lightbox-gallery8');
	$('#gallery-9 .gallery-item a').attr('rel' , 'lightbox-gallery9');
	$('#gallery-10 .gallery-item a').attr('rel' , 'lightbox-gallery10');
	
	/////// adding action= to shopping cart form
	
	/*$('form.wpsc_checkout_forms').attr('action' , 'https://www.paypal.com/cgi-bin/webscr');*/
	
	
}); // closes document.ready
