//////////////////////////////////////////////////////
//
//	The purpose of this file is to
//	apply a hover class on mouseover
//	on the <li> elements in the nav.
//	This is because IE doesn't put
//	the pseudo class :hover on <li> elements
//
//	This is code that uses the
//	jquery javascript library (http://jquery.com/)
//
//////////////////////////////////////////////////////
$(window).load(function() {
	if (document.all&&document.getElementById) {
		// this is needed for the IE 6 pseudo hover class bug
		$(".navtop td").hover(function () {
			$(this).addClass("hover");
		},function () {
			$(this).removeClass("hover");
		});
		$('a#contact_us').hover(function() {
			$(this).css({ backgroundPosition: '0px -66px' });
		}, function() {
			$(this).css({ backgroundPosition: '0px 0px' });
		});
	}
	if($('td.image_main').length > 0) {
		$('td.image_main div').cycle({speed:5000});
	}
	$('a.elevation').hover(function() {
		var new_image = this.id.split('_')[0];
		var old_image = this.id.split('_')[1];
		$('#' + old_image).html('<img src="cmsimages/' + new_image + '.jpg" />');
	}, function () {
		var old_image = this.id.split('_')[1];
		$('#' + old_image).html('<img src="cmsimages/' + old_image + '.jpg" />');
	});
	if($('div.index').length > 0) {
		var soLogo = new SWFObject("cmsflash/discover.swf", "mymovie", "850", "180", "8", '#ff9934');
		soLogo.addParam("wmode", "transparent");
		soLogo.write("flash_piece");
	}
});
