(function($) {
  var cache = [];
  // Arguments are image paths relative to the current page.
  $.preLoadImages = function() {
    var args_len = arguments.length;
    for (var i = args_len; i--;) {
      var cacheImage = document.createElement('img');
      cacheImage.src = arguments[i];
      cache.push(cacheImage);
    }
  }
})(jQuery)
// we will add our javascript code here           

$(document).ready(function(){  

	$("#connected_hide").click(function() {
		$("#connected_nav").slideToggle();
	});
						   
$("#myForm").submit(function(){

var str = $("#myForm").serialize();

$.ajax({
type: "POST",
url: "/signup.php",
data: str,
success: function(msg){

$("#note").ajaxComplete(function(event, request, settings){

if(msg == 'OK') // Message Sent? Show the 'Thank You' message and hide the form
{
result = '<div class="notification_ok">You have been signed up. Thank you!</div>';
$("#sign_up_section").hide();
}
else
{
result = msg;
}

$(this).html(result);

});

}

});

return false;

});

});
// uses jquery fade 
function killIt(item){
		$(function(){
			$('#'+item).fadeOut(1000);
		});
	}	
