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('.truncate-text').length > 0 )
{ 
	jQuery('.truncate-text').expander( 
									  {
									  expandText:       'раскрыть весь текст',
									  expandEffect: 	"fadeIn",
									  userCollapseText: 'закрыть',
									  slicePoint:       300
									  }
									   ); 
}
 								

 
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
	});
					

}

 
  });

//jQuery('.help').cluetip({sticky: true, closePosition: 'помощь', arrows: true});


