jQuery.noConflict();

function libAGENTURNET() {
	jQuery('#agentur_net').hover(function() {
		jQuery(this).find('ul li ul').show('slow');
	}, function() {
		jQuery(this).find('ul li ul').hide('slow');
	});

	jQuery('#agentur_net').click(function() {
		// alert(jQuery(this).find('a').attr('href'));
		// window.parent.location = jQuery(this).find('a').attr('href');
		window.open(jQuery(this).find('a').attr('href'));
	});
}

function libMENU() {
	var menuTimer;
	
	jQuery('#main-navigation ul.lev1>li').hover(function() {
		// clearTimeout(menuTimer);
		//var index = jQuery(this).parent().index();
		/*
		jQuery('#main-navigation ul.lev2').each(function() {
			if (index != jQuery(this).parent().index()) {
				jQuery(this).slideUp('slow');
			}
		});
		
		jQuery(this).parent().find('ul.lev2').slideDown('slow');
	
	}, function() {
		menuTimer = setTimeout(function(){
			jQuery('ul.lev2').slideUp('slow');
		}, 2000);
		*/
        jQuery(this).find('ul.lev2').show();
        jQuery(this).find('a').css('z-index','215');
	},
    function() {
        jQuery(this).find('ul.lev2').hide();
        jQuery(this).find('a').css('z-index','101');
    });
	
	/*
	jQuery('ul.lev2').hover(function() {
		clearTimeout(menuTimer);
	}, function() {
		menuTimer = setTimeout(function(){
			jQuery(this).slideUp('slow');
		}, 2000);
	});
	*/
}

jQuery(document).ready(function() {
	libAGENTURNET();
	libMENU();
	
	// Hinweise in Formularen
	jQuery('input[title!=""]').hint();
	jQuery('textarea[title!=""]').hint();
});
