
  // drop downs in IE
  ieHover = function() {
    $('mainnav li').each(function() {
      $(this).mouseover(function() {
        $(this).addClass('iehover');
      });
      $(this).mouseout(function() {
        $(this).removeClass('iehover');
      });
    });
  }
 if (window.attachEvent) window.attachEvent("onload", ieHover);
 
$(window).load(function() {
	// remove the # links and replace with javascript:;
	$('.slider a').each(function() {
		if ($(this).attr('href').lastIndexOf('#') == $(this).attr('href').length-1) $(this).attr('href','javascript:;');
	})
	
	// assign class to slider parent lis.
	//$('.slider li').addClass('slidebutton');
	
	// assign class to slider uls
	$('.slider li ul').addClass('highlightinner');

	  // convert the lower images in the list to background images on spans
		$('.highlightinner img').each(function() {
			  var imgName = $(this).attr('src');
			  var imgHeight = 80;
			  var s = $('<span class="sliderimg" style="height: '+imgHeight+'px; background-image: url('+imgName+');"></span>');
			  $(this).parent().append(s);
			  $(this).remove();
		})
		
		// append a clearing span to the sliders
		$('.highlightinner li').append($('<span class="sliderclear"></span>'));
		
	  
		// do the slide
		$(".slidebutton").click(function() {
			 $(this).toggleClass('slideron');
		   $(this).children(".highlightinner").stop(true, true).slideToggle(500,function() { doResize(); });
		},function() {
		   $(this).children(".highlightinner").stop(true, true).slideToggle(500, function(){$(this.parentNode).toggleClass('slideron'); doResize();});
		});
		
		function doResize() {
			 var location = window.location.href;
			 if (location.lastIndexOf('details.htm') != -1) {
				resizePage();
			 }					
		}		
});

