﻿// Global rollover function for products in the
// special k website
function productsRollover()
{
    $('.product-rollover').hover(
    function()
    {
        var rolloverHeight = $(this).height();
        
        //$(this).children('.rating-average').show(); // Show hidden ratings
        $(this).css({ backgroundPosition: '0px -' + rolloverHeight + 'px' });
    },
    function()
    {
		//$(this).children('.rating-average').hide(); // Hide ratings
        $(this).css({ backgroundPosition: '0px 0px' });
    });
    
    $('#product-coupon-link').hover(
	function()
    {
    	var rolloverHeight = $('#cereals').height();
        
        $('#cereals').css({ backgroundPosition: '0px -' + rolloverHeight + 'px' });
    },
    function()
    {
    	$('#cereals').css({ backgroundPosition: '0px 0px' });
    });
}

$(document).ready(function()
{
	productsRollover();
});