var dp_options = {};
var innerfade_height = 265;
try { document.execCommand('BackgroundImageCache', false, true); } catch(e) {}; //ie 6 bg image fix

$(function(){
	$('#topnav li').hover(function(e){
		$('ul', this).stop().css('height', 'auto').slideDown('fast');
	}, 	function(e){
			$('ul', this).slideUp('fast');
		})
	// create rollover images
	$('.rollover').mouseover(function(){
		var img = $(this).find('img')[0];
		img.src = img.src.replace(/(\.[^.]+)$/, '_ovr$1');
	});
	
	var mouseout = function(){
		var img = $(this).find('img')[0];
		img.src = img.src.replace(/_ovr(\.[^.]+)$/, '$1');
	};

	$('.rollover').mouseout(mouseout);
	$('.rollover').click(mouseout); /* RESET IT FOR SAFARI BACK BUTTON PROBLEM NOT EXECUTING DOMREADY*/
	
	
	// rotating images on secondary pages
	$('#bigpics ul').innerfade({
		animationtype: 'fade',
		speed: 1000,
		timeout: 4000,
		type: 'sequence',
		containerheight: innerfade_height + 'px'
	});
	
	// rotating images on secondary pages
	$('#showcase a').innerfade({
		animationtype: 'slide',
		speed: 1000,
		timeout: 3000,
		type: 'sequence',
		containerheight: innerfade_height + 'px'
	});
	

	
});

