$(function () {
	
	$('#more-about').hide();
	//calendarAjax(); 
	$("a.gallery-img").fancybox();
	
	$('#the_gallery').masonry({

    itemSelector: '.box' 
	});
	
	$(".a-sponsor").click(function(event){
		$('.a-sponsor').find('> a.close').hide();
		$('.a-sponsor').find('> a.show').show();
		if($(this).hasClass("domore")){
			$(".a-sponsor").find('> .item-details').hide("fast");
			$(".a-sponsor").removeClass("hidemore").addClass("domore");
			$(this).find('> .close').show();
			$(this).find('> .show').hide();
	        $(this).removeClass("domore").addClass("hidemore");
	        $(this).find('> .item-details').slideDown("fast");
	        
    	}
	    else
	    {
	    	
	        $(this).removeClass("hidemore").addClass("domore");
	        $(this).find('> .item-details').slideUp("fast");
        }
        return false;
    });
    
    $(".the-sponsor").click(function(event){
		$('.the-sponsor').find('> a.close').hide();
		$('.the-sponsor').find('> a.show').show();
		if($(this).hasClass("domore")){
			$(".the-sponsor").find('> .item-details').hide("fast");
			$(".the-sponsor").removeClass("hidemore").addClass("domore");
			$(this).find('> .close').show();
			$(this).find('> .show').hide();
	        $(this).removeClass("domore").addClass("hidemore");
	        $(this).find('> .item-details').slideDown("fast");
	        
    	}
	    else
	    {
	    	
	        $(this).removeClass("hidemore").addClass("domore");
	        $(this).find('> .item-details').slideUp("fast");
        }
        return false;
    });
    
   	$(".close").click(function(event){
   		$(".a-sponsor,.the-sponsor").find('> .item-details').hide("fast");
		$(".a-sponsor,.the-sponsor").removeClass("hidemore").addClass("domore");
		$('.a-sponsor,.the-sponsor').find('> a.close').hide();
		$('.a-sponsor,.the-sponsor').find('> a.show').show();
   		return false;
    });

	$('#gallery-feed').cycle({
		fx: 'fade' // choose your transition type, ex: fade, scrollUp, shuffle, etc...
	});
	
	$('#side-images').cycle({
		fx: 'fade' // choose your transition type, ex: fade, scrollUp, shuffle, etc...
	});
	
	$('#featured-imagery').cycle({
		fx: 'fade' // choose your transition type, ex: fade, scrollUp, shuffle, etc...
	});
	
	
	
	$('#mailing-list input.text').focus(function(){
		if($(this).attr("value") == "enter email address")
		{
			$(this).attr("value", "");
		}
	});
	
	$('#mailing-list input.text').blur(function(){
		if($(this).attr("value") == "")
		{
			$(this).attr("value", "enter email address");
		}
	});
	





});



function calendarAjax () {
	  $('.calendarMonthLinks a').live('click', function() {
	    $('#calendar_holder').fadeOut().load($(this).attr('href')+' #calendar' , function(){
	      $(this).fadeIn();
	  });
	  	return false;
	  });
	}