$(document).ready(function(){
	$('#mainnavdrop li.headlink').hoverIntent(
		function() { $('ul', this).slideToggle("fast"); },
		function() { $('ul', this).slideToggle("fast");  });
});

$(document).ready(function(){
	$(".btn-slide").click(function(){
		$("#panel").slideToggle("slow");
		$(this).toggleClass("active"); return false;
	});
	
	
	$(".readmore").click(function () { 
      $(this).siblings('div').slideToggle(); 
    });
    
    $(".readmore, .excerpt").removeClass('hidden');
    
   $(".postlist  div.entry").hide();

	 
	 // donate now button an input set
			$('#donateNow').live('click', function(e) {
				e.preventDefault();

});
	 
	 
	 
});


$(document).ready(function(){
    $(".getinfo").live('click', function(){
        var foo = $(this).attr("name");
        $("#"+foo).slideToggle('fast'); 
        return false;
    });
});


$('.toggler').live('click', function(){
	var foo = $(this).attr("name");
  $("#"+foo).slideToggle('slow', function() {

function LoadMapSearch() {
  new GSmapSearchControl(
        document.getElementById("mapsearch"),             // container
        "1600 Amphitheatre Parkway, Mountain View, CA",   // center point
        null                                              // options
        );
}

GSearch.setOnLoadCallback(LoadMapSearch);


  });});




jQuery(document).ready(function(){

	$("a.lightboxclick").click(function(){
		var link;
		link = $(this).attr("href");
		$('.lightbox-content').load(link);
		$(".lightbox").fadeIn("fast");

		$(this).toggleClass("active"); 
		return false;

	});


$(".lightboxdelete").click(function(){
  $('.lightbox').fadeOut("fast");
}).children().click(function(e) {
  e.stopPropogation();
});




});

// radio button select

$(document).ready(function(){
	$("ul.contribute-form li ul.quick-amount input").click( function(){
	 var amt = $(this).val();
		$('.amount').val(amt);

	});	
});
$(document).ready(function(){
	$("ul.contribute-form li ul.quick-number input").click( function(){
	 var amt = $(this).val();
		$('.number').val(amt);

	});
});

$(document).ready(function(){
$('#slideshow') 
.before('<div id="nav">') 
.cycle({ 
    fx:     'scrollRight', 
    speed:  'fast', 
    timeout: 10000, 
    pager:  '#snav' ,
        prev:   '#prev', 
    next:   '#next'
});
});
$('#slideshow').mouseover(function() { 
    $('#slideshow').cycle('pause'); 
});
$('#slideshow').mouseout(function() { 
    $('#slideshow').cycle('resume'); 
});



$(document).ready(function(){

	$("li.crew, li.hotline").hover(function() {
	  $(this).children("em").show();
	}, function() {
	  $(this).children("em").stop().hide();
	});
	
});



$(document).ready(function(){
$('#newsflashnav').show();

	$('#newsflashed') 
	.cycle({ 
	    fx:     'scrollRight', 
	    speed:  'fast', 
	    timeout: 5000, 
	    pager:  '#nfnav' ,
		prev:   '#nfp', 
	    next:   '#nfn'
	});
	$('#newflash li').mouseover(function() { 
	    $('#newflash').cycle('pause'); 
	});
	$('#newflash li').mouseout(function() { 
	    $('#newflash').cycle('resume'); 
	});
});




$(document).ready(function(){

	var donateCheck = getCookie('noDonate');

	if(donateCheck == null){ 

		$('#sticky_footer').fadeIn(); 

    $("#close_donate").live('click', function(e){
			e.preventDefault();
    	$(this).parent().fadeOut();    
    	setCookie('noDonate', '1', 1);

    }); 
    }

$(".viewFunds").live('click', function(e){
			e.preventDefault();
    
    $.get("includes/snowbateFunds.php",
   function(data){
     $('#lightboxText').html(data);
		$(".lightbox").fadeIn("fast");
   });
   
   
});



});


