$(document).ready(function(){	

	eleWidth = 0;
	
	$('.in-focus-item').hover(
	
		function(){
			$(this).find(".in-focus-overlay").hide().css("top","0px");
			
			if ($(this).find(".in-focus-overlay").hasClass("right")) {
				eleWidth = $(this).width() + 2 ; //2 = border					
			}
			overlayPosLeft = $(this).position().left - (12 + eleWidth);
			overlayPosTop = $(this).position().top - 10;			
			$(this).find('.in-focus-overlay').css("left",overlayPosLeft).css("top", overlayPosTop).fadeIn(400);
		},
	
		function() {
			$(this).find('.in-focus-overlay').hide();
			eleWidth = 0;
		}
	
	)
			
	/* People section */
	
	eleWidth2 = 0;
	
	$('.people-item').hover(
	
		function(){
			$(this).find(".people-item-overlay").hide().css("top","0px");
			
			if ($(this).find(".people-item-overlay").hasClass("right")) {
				eleWidth2 = $(this).width() + 2  //2 = border //4 for ie7?
				
				if ($.browser.msie) {
					if ($.browser.version < 8 ){
						eleWidth2 += 2;
					}
				}
				
			}
			overlayPosLeft = $(this).position().left - (12 + eleWidth2);
			overlayPosTop = $(this).position().top - 12;			
			$(this).find('.people-item-overlay').css("left",overlayPosLeft).css("top", overlayPosTop).fadeIn(400);
		},
	
		function() {
			$(this).find('.people-item-overlay').hide();
			eleWidth2 = 0;
		}
	
	)	
	
	/* Banner */ 
	
	if ($('#image-banner img').length > 0 ) {
		
		$('#image-banner') 
			.after('<div id="header-image-nav">') 
			.cycle({ 
				fx:     'fade', 
				speed:  'slow', 
				timeout: 5000, 
				pager:  '#header-image-nav'
				//next:   '#next', 
				//prev:   '#prev'			
			});
		
		$('#header-image-nav a').text('');
		
	}
	
})

