function setInfoBlockBg(mouseOver, element) {
    if (mouseOver) {
        $(element).css("background", "#ECEBD4 none repeat scroll 0 0");
    } else {
        var col = $(element).parent().children().index($(element));
        if (col == 0) {
            $(element).css("background", "url(/media/img/public/info_bar_top.png) no-repeat");
        } else {
            $(element).css("background", "transparent none repeat scroll 0 0");
        }
    }
}

jQuery(document).ready(function() {
    jQuery('#exclusveTable tr').live("mouseover", function (event) {
        setInfoBlockBg(true, this);
    });
    jQuery('#exclusveTable tr').live("mouseout", function (event) {
        setInfoBlockBg(false, this);
    });
    jQuery('#bestTable tr').live("mouseover", function (event) {
        setInfoBlockBg(true, this);
    });
    jQuery('#bestTable tr').live("mouseout", function (event) {
        setInfoBlockBg(false, this);
    });

    jQuery('#latestTable tr').live("mouseover", function (event) {
        setInfoBlockBg(true, this);
    });
    jQuery('#latestTable tr').live("mouseout", function (event) {
        setInfoBlockBg(false, this);
    });

    jQuery('#spec_offer tr').live("mouseover", function (event) {
        $(this).css("background", "#ECEBD4 none repeat scroll 0 0");
    });
    jQuery('#spec_offer tr').live("mouseout", function (event) {
        $(this).css("background", "#f4f4f4 none repeat scroll 0 0");
    });

    jQuery('#newsTable tbody tr td').live("mouseover", function (event) {
        $(this).css("background", "#ECEBD4 none repeat scroll 0 0");
    });
    jQuery('#newsTable tbody tr td').live("mouseout", function (event) {
        $(this).css("background", "white none repeat scroll 0 0");
    });
});