(function($) {$.fn.jooria_comment = function(url){
    $(this).click(function() {

    
    	
    //this the data that we will sent it 
    var product = $("#product").val();
    var MasterId = $("#MasterId").val();
	var entryID = $("#entryID").val();
    var name = $("#name").val();
    var mail = $("#mail").val();
    var comment = $("#comment").val();
    var titel = $("#titel").val();
    var spamschutz = $("#spamschutz").val();
	var fbuid = $("#fbuid").val();
    var dataString = 'name='+ name +'&mail='+ mail +'&comment='+ comment+'&entryID='+ entryID+'&fbuid='+ fbuid+'&titel='+ titel+'&spamschutz='+ spamschutz+'&product='+ product+'&MasterId='+ MasterId;

    //cool load system
    $("button.submit").addClass('load');
    $("button.submit").text('');
    
    
    //post it now
    $.ajax({
    type: "POST",
    url: url,	
    data: dataString,
    cache: false,
    success: function(html){
    //this work on non-repeat the errors 
    var error = $("ul#list li:last").attr("class");
    if ( error == "error"){$("ul#list li:last").remove();}
    
    //if there is no comments
    $("div#nocom").replaceWith("<ul id='list'></ul>");
    
    $("ul#list").prepend(html);
    $("ul#list li:last").fadeIn("slow");
    
    //restore the load to the normal
    $("button.submit").removeClass('load');
    $("button.submit").text('Posting Quick Reply');
    }}  
    );
    
    return false;
   
});
    

};
})(jQuery);

