cached_html = null;

// Place your application-specific JavaScript functions and classes here
// This file is automatically included by javascript_include_tag :defaults
$(document).ready(function() {
	
	function requestInformation() {
		$("#new_dialog").dialog('destroy');
	    $("#new_dialog").remove();
	    // If we haven't cached the form page yet, we're going to do it now with a synchronous ajax call.
	    if (cached_html == null)
	    {
	      $.ajax({async: false, type: "GET", url: "/requests/contacts/new", dataType: "script"});
	    }

	    return false;
	}
	
	$('.more1').click(function(e) {				
		return requestInformation() ;
	}); 
	
	$('.request_information').click(function(e) {				
		return requestInformation();
	});
	
	
});

