$.fn.opaque = function(opa){
	$(this).css('opacity', opa);
	return this;
}

jQuery(function($){
	/*
	var userAgent = window.navigator.userAgent.toLowerCase();
	$.browser.msie8 = $.browser.msie && /msie 8\.0/i.test(userAgent);
	$.browser.msie7 = $.browser.msie && /msie 7\.0/i.test(userAgent);
	$.browser.msie6 = !$.browser.msie8 && !$.browser.msie7 && $.browser.msie && /msie 6\.0/i.test(userAgent);
	*/
	if($.browser.msie && $.browser.version == 6){
		$('#menu').css('margin-left', 85);
	} //
	/*
	if($.browser.msie){
		$('#main-stage').css('margin-top', 0);
		$('#menu').css('margin-left', '-85px');
		$('.inside-menu').css('margin-left', 30);
	};
	*/
	
	var locator = [-10, -10, -15, -10, 5, 10, -15, -20, 0];
	$('#menu').find('li').each(function(ref){
		$(this).css({'margin-right': locator[ref]});
	}); //
	
	$('.breadcrumb').each(function(){
		$(this).find('a:not(:last)').append($('<span>').addClass('gap').text('>'));
	});
	
	$('.left-list').find('li:has("a.sub-item"):last').after( $('<li>').addClass('mezz').text(' ') );

	$('.photo-swap').find('a:first').addClass('nip').opaque(1.0).siblings().opaque(0.6);
	$('.photo-swap').each(function(){
		$(this).find('a').bind('click', function(){
			var preload = "../images/spinner.gif";
			$('.product-img').attr('src', preload);
			
			var golink = $(this).attr('href');
			$('.product-img').attr('src', golink);
			
			$(this).addClass('nip').opaque(1.0).siblings().removeClass('nip').opaque(0.6);
			return false;
		});
	}); //
	// $('.side-pic').attr('src','images/doves.jpg');
	
	$('.tabs').find('li:last').css('border-bottom', '1px solid #999');
	
	$('.spec tbody tr').find('td:first:not(".sing")').css({'background-Color':'#efefef'});
	
	$('#LiFe tbody').find('tr:even').css({'background-Color':'#eaeaea'});
	
	$('#extensible').flash(
	    { src: 'images/gdp_top.swf',
          width: '100%',
          height: '100%',
		  wmode: 'transparent'
		},
		{ expressInstall: true }
	);
	
	$('#extensible2').flash(
	    { src: 'images/gdp_in_top.swf',
          width: '100%',
          height: '100%',
		  wmode: 'transparent'
		},
		{ expressInstall: true }
	);
	
	$('#news').find('li').each(function(){
		$(this).hover(
			function(){
				$(this).addClass('fingered');
			},
			function(){
				$(this).removeClass('fingered');
			}
		);
	});

}); // end jQ

$(window).load(function(){
	if ($.browser.msie) {
		document.execCommand("BackgroundImageCache",false,true);
	}
});
