jQuery.noConflict();


function leftmenu(){
jQuery("#leftHandContent li").hover(function(){
   jQuery(this).addClass('activeHover');
  },function(){
     jQuery(this).removeClass('activeHover');
  });
}



jQuery(document).ready(function(){     
	
	jQuery('#container-1').tabs({ fxFade: true, fxSpeed: 'fast' });
	
	jQuery("#maincontent.wide H2").addClass("wide");
	
	jQuery("#maincontent.wide H2").before("<div class='H2TopWide'>&nbsp;</div>");
	jQuery("#maincontent.wide H2").after("<div class='H2BottomWide'>&nbsp;</div>");
	
	jQuery("#maincontent H2:not(H2.wide)").before("<div class='H2Top'>&nbsp;</div>");
	jQuery("#maincontent H2:not(H2.wide)").after("<div class='H2Bottom'>&nbsp;</div>");
	
	jQuery("#content.homepage .homePagePod").wrap("<div class='homePagePodHolder'></div>");
	jQuery("#content.homepage .homePagePodHolder").prepend("<div class='homePagePodTop'>&nbsp;</div>");
	jQuery("#content.homepage .homePagePodHolder").append("<div class='homePagePodBottom'>&nbsp;</div>");
	
	jQuery("#content.homepage .homePagePod LI:first-child").addClass('hometitle');
	
	jQuery(".homePagePodHolder:last").addClass('lastPod');
	jQuery(".homePagePodTop:last").addClass('lastPodTop');
	jQuery(".homePagePodBottom:last").addClass('lastPodBottom');
	
	jQuery("#maincontent BLOCKQUOTE").append("<div class='cleaner'>&nbsp;</div>");
	
	jQuery('#maincontent a[href$=".pdf"]').each(function(){
    	jQuery(this).wrap("<span class='pdf'></span>");
	}); 
	
	jQuery('#maincontent a[href$=".ppt"]').each(function(){
    	jQuery(this).wrap("<span class='ppt'></span>");
	}); 
	
	jQuery('#maincontent a[href$=".doc"]').each(function(){
    	jQuery(this).wrap("<span class='doc'></span>");
	}); 
	
	jQuery("#leftHandContentInner .page-item-94").before("<li class='subheading'>Industry services:</li>")
	
	
	
	//show hide containers
	jQuery(".hideMe").hide();
	
	jQuery(".showNext").prepend("<span class='readMore'>Read More</Span>");
	
	jQuery(".showNext").click(function() { 
		jQuery('.hideMe').slideUp(300);	
		jQuery(this).next('.hideMe').slideToggle(400);
		jQuery('.readMore').show();	
		jQuery(this).children('.readMore').fadeOut();		
		return false; 
	}); 	
			
	
	jQuery(".showMeFirst:first").slideDown(300);
	jQuery(".showMeFirst:first").prev().children('.readMore').fadeOut()

	//show hide containers ends
		
	leftmenu();	
	
	
	//target images needing enlargement
	jQuery(".enlargeMe").hover(
		function () {
        	//find existing image src
			var origImage = jQuery(this).attr("src");
			 //manipiuate existing image src to path to big image - depends on naming and file path convention!!
			var bigImage = origImage.replace('team/','team/large/')
			//write in size of holding div. Values can be left out but it messes up the show on top bottom, left or right
			showtrail(280,380,bigImage);
			
      }, 
      function () {
       		hidetrail()	
      }

	);
	jQuery(".enlargeMe").click(function (){hidetrail()})
	
	
	
});



