jQuery.noConflict();
jQuery(document).ready(function(){

	jQuery('#mailRegistration').addClass('closed');
	/* switch off level 3 nav so when javascript is enabled level 3 is set to what it should be */
		jQuery('div.level3TurnOn').removeClass('level3TurnOn');
		jQuery('ul#topNavigation li').removeClass('turnOn');
		jQuery.smoothAnchors("slow");
		
	jQuery('#getEmailUpdates').hover(function() {
			jQuery('#mailRegistration').animate({
				opacity: 1,
				left: 0,
				height: 'toggle'
			}, 200, function() {
			// Animation complete.
			});
		}	
	);
	
	jQuery.anchorMovement = {
		   current: "#a1",
		   misc: ''
		};
		
		
		/* fetch the current anchor location */
		jQuery.anchorMovement.misc = window.location;
		if (document.location.hash.substring(1) != '') {
			jQuery.anchorMovement.current = '#'+document.location.hash.substring(1);
		}
		
   		jQuery('a').click( function() {
			if (jQuery(this).attr('href').substring(0,1) == '#')
			{
				jQuery.anchorMovement.current = jQuery(this).attr('href');
			}
		});
	
		/* start run hoverintent when hovering over top navigation */
		jQuery('#topNavigation > li').hoverIntent( {
			sensitivity: 3, // number = sensitivity threshold (must be 1 or higher)    
			interval: 0, // number = milliseconds for onMouseOver polling interval    
			over: expand, // function = onMouseOver callback (REQUIRED)    
			timeout: 200, // number = milliseconds delay before onMouseOut    
			out: retract // function = onMouseOut callback (REQUIRED)    
		});
		
	
		/*jQuery('#topNavigation li ul > li').hoverIntent( {
			sensitivity: 3, // number = sensitivity threshold (must be 1 or higher)    
			interval: 100, // number = milliseconds for onMouseOver polling interval    
			over: expandLevel3, // function = onMouseOver callback (REQUIRED)    
			timeout: 300, // number = milliseconds delay before onMouseOut    
			out: retractLevel3 // function = onMouseOut callback (REQUIRED)    
		});

		function expandLevel3() {
			jQuery(this).children('div').animate({
				opacity: 0.90,
				left: 120,
				height: 'toggle'
			}, 300, function() {
				// Animation complete.
			}); 
		}
		
		function retractLevel3() {
			jQuery(this).children('div').animate({
				opacity: 0,
				left: 0,
				height: 'toggle'
			}, 300, function() {
				// Animation complete.
			});  
		} */
		
		function expand() {
			jQuery(this).children('div.levelOne').slideDown('fast');
			
			/*.animate({
				opacity: 0.90,
				left: 0,
				height: 'toggle'
			}, 300, function() {
				// Animation complete.
			}); */
		}
		
		function retract() {
			jQuery(this).children('div.levelOne').slideUp('fast');
			
			/*.animate({
				opacity: 0,
				left: 0,
				height: 'toggle'
			}, 300, function() {
				// Animation complete.
			});  */
		}
		
		
		/* end run hoverintent when hovering over top navigation */

});