$(document).ready(function() {
});	

//Comment Enter
//////////////////////////////////////////////////////
function login(){ //alert('ppp');
	if($('#liemail').val()==''){
		$('#liResponse').show().html('Enter your Email or Username:').delay(4000).fadeOut(400);
	}else if($('#lipass').val()==''){
		$('#liResponse').show().html('Enter your Password').delay(4000).fadeOut(400);
	}else{
		$.post("includes/php/structure_files/login/logindb.php", {
        liemail: $('#liemail').val(),
		lipass: $('#lipass').val(),
      },
	  function(response){
        setTimeout("finishLogin('liResponse', '"+escape(response)+"')", 400);
      });

    	//return false;
		
	}
	
	//alert(comment);
}

function finishLogin(id, response) {
	if (response=='bad'){
			$('#'+id).delay(200).html('Sorry, please try again...').hide().fadeIn().delay(5000).fadeOut();
		    //alert('pp');
		}else if (response=='good'){
			$('#'+id).delay(200).html('Thank you for logging in...').hide().fadeIn().delay(2000).fadeOut();
			$("#signUp").fadeOut(200).html('<a href="#" onclick="javascript:toggleMenu(\'menu3\');">My Account</a>').hide().delay(500).fadeIn();
			$("#menu3").delay(500).load('includes/php/structure_files/menus/menu3_inner.php?regen=regen');
			$("#loginforminner").delay(3000).fadeOut();
			$("#comAction").html('<a href="javascript:hideToggle(\'newcom\')">Leave a comment!</a>');
			$("#newcom").load('includes/php/structure_files/now_playing/shows/now_playing_comments_new_com.php?regen=regen2');
		}
    //$('#'+id).delay(200).html(unescape(response));
    //$('#newcom').fadeOut();
    //$('#'+id).fadeIn();
}

//////////////////////////////////////////////////////
