﻿var $j = jQuery.noConflict();
$j(function() {				
	var config = {
		over : function(){
			$j(this).addClass('active');
			$j('.sub-menu', this).show();
		}, 
		timeout : 500, 
		out : function(){
			$j(this).removeClass('active');
			$j('.sub-menu', this).hide();
		}
	};

	$j('#menu-principale > li').each(function(){
		if ($j('a',this).attr('href') == '#') {
			$j(this).hoverIntent(config);
			$j(this).css({ 'cursor': 'pointer'});
			$j('.sub-menu',this).css({ 'cursor': 'auto'});
		}
	});
	
	$j('#access a').each(function() {
		if ($j(this).attr('href') == '#') {
			var text = $j(this).text();
			$j(this).replaceWith(text);
		}
	});
	


	$j('#logo').click(function() {
		window.location.href = "/";
	});
	
});
