$(document).ready(function(){
	$("#card_poster_tabs li").click(function(){		
		$("#card_poster_tabs li").removeClass('tab_active');
		$(this).addClass('tab_active');
		
		var tab_id = $(this).attr('id');
		if(tab_id == "card_li")
		{
			$('#cards_tab').show();
			$('#poster_tab').hide();
		}
		else if(tab_id == "poster_li")
		{
			$('#cards_tab').hide();
			$('#poster_tab').show();
		}
	});	

	$("#card_flat_folded li").click(function(){		
		$("#card_flat_folded li").removeClass('tab_active_card');
		$(this).addClass('tab_active_card');
		
		var tab_id = $(this).attr('id');
		if(tab_id == "flat_li")
		{
			$('#flat_cards_wrap').show();
			$('#folded_cards_wrap').hide();
		}
		else if(tab_id == "folded_li")
		{
			$('#flat_cards_wrap').hide();
			$('#folded_cards_wrap').show();
		}
	});	
	
	/*$("input.login-button").click(function(){	
		$('#inv_msg').hide();
		if($('input#username').val()==''){
			alert('please enter user name');
		}
		else if($('input#password').val()==''){
			alert('please enter password');
		}
		else
		{
			$('#inv_msg').show();
		}
		
	});	*/


});

$(document).ready(function(){
	$("#nav-one li").hover(
		function(){ $("ul", this).fadeIn("fast"); }, 
		function() { } 
	);
	if (document.all) {
		$("#nav-one li").hoverClass ("sfHover");
	}
});

$.fn.hoverClass = function(c) {
	return this.each(function(){
		$(this).hover( 
			function() { $(this).addClass(c);  },
			function() { $(this).removeClass(c); }
		);
	});
};
