//index.php (logged out) specific javascript.

$(document).ready(function(){

  //What Is Button
  $('.whatIsButton').bind('click',function(){
	$(this).fadeOut(function(){
		$('#whatIsListWrap').slideDown();
	});
  });
  
  $('#registerButton').click(function(){
	  $.get('includes/core/php/register.php',function(data){
	  	openJQDialog('Register',350,1,1,data);
		$('#SUBMIT_REGISTER').button();
	  });
  });
  
  //Create ajax event - load for the registration form
  $('#SUBMIT_REGISTER').die().live('click',function(){
	  
	  $('#REG_LOAD').ajaxStart(function(){
		  $(this).show();
		  //$('#SUBMIT_REGISTER').attr("disabled","disabled")
	  }).ajaxComplete(function(){
		  $(this).hide();
	  });
	 
	  $.post('includes/core/php/register.php?submit', $('#register_form').serialize(), function(data){
		  $('#W_DIALOG').html(data);
		  $('#SUBMIT_REGISTER').button();
	  });
	  return false;
  });

});
