﻿$(function() {
	if ($.browser.msie && $.browser.version < 7) return;

	$('#navigation li')
            .removeClass('highlight')
            .find('a')
            .append('<span class="hover" />').each(function() {
            	var $span = $('> span.hover', this).css('opacity', 0);
            	$(this).hover(function() {
            		// on hover
            		$span.stop().fadeTo(250, 1);
            	}, function() {
            		// off hover
            		$span.stop().fadeTo(250, 0);
            	});
            });
});

$(function() {
	if ($.browser.msie && $.browser.version < 7) return;

	$('#product-items .product-image').fadeTo(0, 0.5); //set to 0 so the fade isn't visible when you refresh the page.
	$('#product-items .product-image').hover(function() {
		$(this).fadeTo(250, 1)
	}, function() {
		$(this).fadeTo(250, 0.5);
	});
});

$(function() {
	$('#product-items .product-image').hover(function() {
		$(this).parent().find('.title').addClass('title-on');
	}, function() {
		$(this).parent().find('.title').removeClass('title-on');
	});
});
