function showMessage(header, text, unhook, theme)
{
	var text;
	var header;
	var unhook;
	
	if(!theme)
	{
		var theme = 'notice';
	}
	
	if(text.length > 0){
				jQuery.jGrowl(text, { 
						 life: 6000, 
						 header: header,
						 theme: theme,
						 closerTemplate: 'close',
						 beforeOpen: function(e,m,o) {	if (unhook == false) { jQuery('.jGrowl-notification').hide(); };	}
						 });
	}

}



jQuery(document).ready(function(){
													

 
if( jQuery('#validate_form').length > 0 )
{
	var action = jQuery('#validate_form').attr('action');
	jQuery('#' + 'validate_form').FormValidate({	phpFile: action + "/", ajax:false	});

}

if( jQuery('#notice').length > 0 )
{
	jQuery.jGrowl(jQuery('#notice').html(), { 
						 sticky: false,
						 closer: true
	});
					

}

 
  });


function add_category(getpost, url)
{

var getpost;
var url;

	jQuery.ajax({ 
	  type: getpost,   
	  url: url,
	  dataType: "html",
	  cache: false,
	  success: function(response)
	  		  {
				jQuery('#product-cat').append(response);
				
							
	  		  },
	 error: function (XMLHttpRequest, textStatus, errorThrown)
	 					{
							jQuery("#product-cat").html(XMLHttpRequest.responseText);
						}
	

	});
	return false;	

}

function hidden(div)
{
	var div;
	jQuery('#' + div).remove();
	return false;
}

