$(document).ready(function() {
	
	//Login
	$('#openLogin').click(function() {
	        $("#loginWrapper").animate({marginTop: "0px"}, 'fast' );
		$("input.mainLogin").focus(); 
		$(".openLogin").animate({marginTop: "-50px"}, 'fast' );
		return false;
	});

	$("#closeLogin").click(function(){
		$("#loginWrapper").animate({marginTop: "-32px"}, 'fast');
		$(".openLogin").animate({marginTop: "5px"}, 'fast' );
		return false;
	});


	//Member List Notes
	$('.notesopen').click(function() {
	        $(".notes").show();
	        $(".notesclose").show();
		$("this").hide();
		return false;
	});

	$(".notesclose").click(function(){
	        $(".notes").hide();
	        $(".notesopen").show();
		$("this").hide();
		return false;
	});


        //Tabs
	$(".tabContent").hide(); //Hide all content
	$("ul.tabs a:first").addClass("selected").show(); //Activate first tab
	$(".tabContent:first").show(); //Show first tab content

	$("ul.tabs a").click(function() {

		$("ul.tabs a").removeClass("selected"); //Remove any "selected" class
		$(this).addClass("selected"); //Add "selected" class to selected tab
		$(".tabContent").hide(); //Hide all tab content

		var activeTab = $(this).attr("href"); //Find the href attribute value to identify the active tab + content
		$(activeTab).fadeIn(); //Fade in the active ID content
		return false;
	});


	//Tablesorter
	$("#memberlist").tablesorter( {sortList: [[0,0], [1,0]]} ); 
	$("#eventlist").tablesorter( {sortList: [[0,0], [1,0]]} ); 


	//Slideshow
	$('#slideshow').cycle()

	//Quotes fade
	$('#wideQuotes').cycle()
});
