/**
 * @author Advisa Dev Team
 * @version GDC 1.1.1 - UTF8
 * @copyright __ADVISA__, 21 May, 2010
 * @package TEMPLATE / Custom JavaScript functions
 **/


$(document).ready( function() {
	
	/**
	 * HOMEPAGE : Affichage actualités
	 */
	/*$(".sub-menu li a").click( function() {
		$.get(	ajaxURL+'plugins/article/blog.php',
				{	url: $(this).attr('href'),
					do_ajax: true
				},
				function(data) {
					
				}
		);
		return false;
	});*/
	
	/**
	 * PICTURES : Affichage actualités
	 */
	if ( $('.zoom-pic').length > 0 )
	{
		$('.zoom-pic').fancybox();
	}
	
	/**
	 * FORMULAIRE : Messages d'erreur
	 */
	if ( $("#errorPad") )
	{
		$("#errorPad").click(function(){
			$(this).fadeOut();
			$("#erlogPad").fadeOut();
		});
		$("#erlogPad").click(function(){
			$(this).fadeOut();
			$("#errorPad").fadeOut();
		});
	}
	
	if ( $('.tools a') )
	{
		$('.tools a').mouseover( function () {
			$("#toolLegend").append($(this).attr('title'));
		});
		$('.tools a').mouseout( function () {
			$("#toolLegend").html('');
		});
	}
	
	
	
	
});

function backButton() {
	window.history.back();
}
