jQuery.extend({

   post: function(url, params) {
        $.ajax({
            url: url,
            type: "POST",
            data: params,
            dataType : "json",
            success: function(data, textStatus){
            	 return php.success(data, textStatus);
		    },
		     
		    error: function (xmlEr, typeEr, except) {
		         	 
		     
		    }
        });
   },

   get: function(url) {
      $.ajax({
         url: url,
         type: "GET",
         dataType : "json",
        	 
         beforeSend: function(){
             	 return php.beforeSend();
         },
        
         success: function(data, textStatus){
             	 return php.success(data, textStatus);
         },
        
         error: function (xmlEr, typeEr, except) {
            	 
        
         },
        
         complete: function (XMLHttpRequest, textStatus) {
              	 return php.complete(XMLHttpRequest, textStatus);
        
         }
         
      });
   }
          
});

function sendForm(id, url)
{
	if (id && url)
	{
	   var qString = $("#" + id).formSerialize();
	   $.get(url + "?" + qString);
	}
}

 