$(document).ready(function() {
						   
 			$('a, button').focus(function(){ this.blur();} );   // remove dotted outlines on IE links
			
			
			    
             function addMega(){
				 $(this).hide();	
                $(this).addClass("hovering");	
				$(this).fadeIn(300);
                }
         
             function removeMega(){
				$(this).fadeOut();
                $(this).removeClass("hovering");
				//$(this).hide();
                }
         
             var megaConfig = {
                 interval: 1,
                 sensitivity: 1,
                 over: addMega,
                 timeout: 500,
                 out: removeMega
                 };
         
         
            // run on page load to insert hovering class required tabs
            $("li#mega2.NavAbout").hoverIntent(megaConfig)
			$("li#mega3.NavDetox").hoverIntent(megaConfig)
			$("li#mega4.NavRehab").hoverIntent(megaConfig)
			$("li#mega5.NavCounselling").hoverIntent(megaConfig)
			$("li#mega6.NavIntervention").hoverIntent(megaConfig)
			$("li#mega7.NavAftercare").hoverIntent(megaConfig)





			//box hovers ============================================================<< need to set full path of url i.e. http://www.uk-rehab.com/images/ ...

			$('img#helpMyself').hover(function() {
				$(this).attr("src","images/left-helpMyself2.png");
					}, function() {
				$(this).attr("src","images/left-helpMyself.png");
			});
			
			$('img#helpLovedOne').hover(function() {
				$(this).attr("src","images/left-helpLovedOne2.png");
					}, function() {
				$(this).attr("src","images/left-helpLovedOne.png");
			});
			
			$('img#howWeWork').hover(function() {
				$(this).attr("src","images/left-howWeWork2.png");
					}, function() {
				$(this).attr("src","images/left-howWeWork.png");
			});



// these three lines originally were outside of dom ready function
Cufon.replace('h1', { fontFamily: 'addiction' });
Cufon.replace('.mapText', { fontFamily: 'addiction' });
Cufon.replace('.subTitleText', { fontFamily: 'addiction' });
}); //dom ready



