$.noConflict();
(function($){
	$(function(){
		// Frontpage Feature Area
		$('.moduletable.slideshow div .tab:first').addClass('active');
		
		if ($.browser.msie) {
			$('.feature .moduletable.slideshow>.contentpaneopen:first').show();
		}
		var showSlide=function(i){
			if(!$('.moduletable.slideshow div .tab').eq(i).hasClass('active')){
				$('.moduletable.slideshow div .tab.active').removeClass('active');
				$('.moduletable.slideshow div .tab').eq(i).addClass('active');
				$('.feature .moduletable.slideshow>.contentpaneopen').fadeOut(200).eq(i).fadeIn(200);
			}
		};

		var showNextImage=function(){
			showSlide(($('.moduletable.slideshow div .tab').index($('.moduletable.slideshow div .tab.active'))+1)%$('.moduletable.slideshow div .tab').length);
		};

		var slideshowTimer=setInterval(showNextImage,8000);
		$('.moduletable.slideshow div.tab').click(function(){
			clearInterval(slideshowTimer);
			showSlide($('.moduletable.slideshow div .tab').index(this));
			slideshowTimer=setInterval(showNextImage,8000);
		});
	
	 	// = Add lastchild class =
		$('.footer_menu ul li:last').addClass('last')
		
		// = Search result page_hover effect =
		
		$('.legend-hilite').mouseover(
			function() { $(this).addClass('legend-hilite_over');
		}).mouseout(
			function() { $(this).removeClass('legend-hilite_over');
		});
		
		$('li.headlink').hover(
			function() { 
				$('ul', this).css('display', 'block'); 
				$('a#cat_refine').addClass('cat_open');
			},
			function() { 
				$('ul', this).css('display', 'none'); 
				$('a#cat_refine').removeClass('cat_open');
		});
		
		$('.legend').mouseover(
			function() {$(this).addClass('legend_over');
		}).mouseout(
			function() {$(this).removeClass('legend_over');
		});
});
})(jQuery);

