$(document).ready(function(){
$("#ajax-login-form").submit(function(){

var str = $(this).serialize();

   $.ajax({
   type: "POST",
   url: "http://www.riweddingguide.com/mywedding/do_login.php",
   data: str,
   success: function(msg){
    
$("#login_response").ajaxComplete(function(event, request, settings){

if(msg == 'OK') // Message Sent? Show the 'Thank You' message and hide the form
{
    result = '';
	location.href = "http://www.riweddingguide.com/mywedding/landing.htm";
//result = '<div class="notification_ok">Your message has been sent. Thank you!</div>';
//$("#fields").hide();
}
else
{
result = msg;
}

$(this).html(result);

});

}

 });

return false;

});

});

function displaydiv()
{
    var isdisplay = document.getElementById("dpop").style.display;
    //alert(isdisplay);
    if(isdisplay=="" || isdisplay=="none") {
        document.getElementById("dpop").style.display = "block";
    }
    else {
        document.getElementById("dpop").style.display = "none";          
    }
}

