	$(function() {
    $('#masthead').crossSlide({
      sleep: 4,
      loop: 1,
      shuffle: true,
      fade: 6
    }, [
        
        { src: '/wp-content/themes/hub/img/banners/masthead1.jpg'},
        { src: '/wp-content/themes/hub/img/banners/masthead2.jpg'},
        { src: '/wp-content/themes/hub/img/banners/masthead3.jpg'},
        { src: '/wp-content/themes/hub/img/banners/masthead5.jpg'}
      
    ]);
  });

   
 //RSS link/click function
$(function() {
			$("#rss, #twitter, #facebook, #blog-title").click(function(){
				window.location=$(this).find("a").attr("href");return false; // href attribute value
			});

   });

//Comments list
	$(function(){
	
	$("#comments-list li").each(function (i) {
		i = i+1;
		$(this).prepend('<span class="commentnumber"> #'+i+'</span>');
   });
	  });

$(function() {
   
        $('div#directions > p').hide();
   
      });



 //RSS link/click function
$(function() {
			$(".submit-apply").click(function(){
				window.location="http://spreadsheets.google.com/viewform?key=pPcCjBuhslAsnh8vNkIy2VQ&hl=en"; // href attribute value
			});

   });

function equalHeight(group) {
    tallest = 0;
    //Find out which box is the tallest
    group.each(function() {
        thisHeight = $(this).height();
        if(thisHeight > tallest) {
            tallest = thisHeight;
        }
    });
    group.height(tallest);
}

$(function(){$("#mailList").validate({
                      
		messages: {
		emailList: "Forget something?"
		},
		submitHandler: function(form) {							
	
	$('#mailList').submit( function(){
		//hide the form
		$('#mailList').hide();
		
		//show the loading bar
		$('.loader').append($('.bar')); 
		$('.bar').css({display:'block'});
		
		//send the ajax request  
		$.get('/wp-content/themes/hub/mail.php',{emailList:$('#emailList').val()},
	
		//return the data
		function(data){
			//hide the graphic
			$('.bar').css({display:'none'}); 
			$('.loader').append(data);  
		});	
	
		//stay on the page					
		return false;	
	});
	               }
				   });
						

                }) ;//End of validate 







