$(document).ready(function(){
    /**
     * HEADER
     */
    // rollover for the "cadastre-se" button
    $("#header-cadastre").bind("mouseover", function(){
       $(this).css("background", 'transparent url("/img/garnier-club/greenBtn_right_over.png") right top no-repeat');
       $(this).find("span").css("background", 'transparent url("/img/garnier-club/greenBtn_left_over.png") left top no-repeat');
    }).bind("mouseout", function(){
       $(this).css("background", 'transparent url("/img/garnier-club/greenBtn_right.png") right top no-repeat');
       $(this).find("span").css("background", 'transparent url("/img/garnier-club/greenBtn_left.png") left top no-repeat');
    });
    
    //rollver for the "login" button
    $("#header-login").bind("mouseover", function(){
       $(this).css("background", 'transparent url("/img/garnier-club/greenBtn_right_over.png") right top no-repeat');
       $(this).find("span").css("background", 'transparent url("/img/garnier-club/greenBtn_left_over.png") left top no-repeat');
    }).bind("mouseout", function(){
       $(this).css("background", 'transparent url("/img/garnier-club/greenBtn_right.png") right top no-repeat');
       $(this).find("span").css('background', 'transparent url("/img/garnier-club/greenBtn_left.png") left top no-repeat');
    });
    
    //rollover for the "ok" button
    $(".search-btn-ok").bind("mouseover", function(){
        $(this).find("#search_submit").attr("src", "/img/common/header-search-ok-over.gif");
    }).bind("mouseout", function(){
        $(this).find("#search_submit").attr("src", "/img/common/header-search-ok.gif");
    });
    
    /**
     * HOME
     */
    //rollover for the "participe" button
    $("#form-commu-home").find("#btn-register-submit").bind("mouseover", function(){
        $(this).find(".submit-left").css("background", 'transparent url("/img/garnier-club/greenBtn_left_over.png") left top no-repeat');
        $(this).find("button").css("background-color", "#285c33");
        $(this).find(".submit-right").css("background", 'transparent url("/img/garnier-club/greenBtn_right_over.png") right top no-repeat');
    }).bind("mouseout", function(){
        $(this).find(".submit-left").css("background", 'transparent url("/img/garnier-club/greenBtn_left.png") left top no-repeat');
        $(this).find("button").css("background-color", "#87C305");
        $(this).find(".submit-right").css("background", 'transparent url("/img/garnier-club/greenBtn_right.png") right top no-repeat');
    });
    
    /**
     * PRODUCT PAGE
     */
    $(".btn_retour_02_wrapper").find(".btn_retour_01").bind("mouseover", function(){
        $(this).find(".btn_retour_01_left").css("background", 'transparent url("/img/our_products/bt-product-left-over.png") left top no-repeat');
        $(this).find(".btn_retour_01_centre").css("background", 'transparent url("/img/our_products/bt-product-over.png") left top repeat-x');
        $(this).find(".btn_retour_01_centre_inner").css("background", 'transparent url("/img/our_products/arrow-back-white-over.png") 1px 8px no-repeat');
        $(this).find(".btn_retour_01_centre").find("span").css("color", "#006500");
        $(this).find(".btn_retour_01_right").css("background", 'transparent url("/img/our_products/bt-product-right-over.png") left top no-repeat');
    }).bind("mouseout", function(){
        $(this).find(".btn_retour_01_left").css("background", 'transparent url("/img/our_products/bt-product-left.png") left top no-repeat');
        $(this).find(".btn_retour_01_centre").css("background", 'transparent url("/img/our_products/bt-product.png") left top repeat-x');
        $(this).find(".btn_retour_01_centre_inner").css("background", 'transparent url("/img/our_products/arrow-back-white.png") 1px 8px no-repeat');
        $(this).find(".btn_retour_01_centre").find("span").css("color", "#FFFFFF");
        $(this).find(".btn_retour_01_right").css("background", 'transparent url("/img/our_products/bt-product-right.png") left top no-repeat');
    });
    
    /**
     * NUTRISSE + COLORISSIMOS PAGES
     */
    //rollover for the "veja a cartela de cores" button
    $("#btn-cartela").bind("mouseover", function(){
        $(this).find(".menu-left").css("background", 'transparent url("/img/our_products/prd_haircolor/nutrisse/menu_left_on.png") left top no-repeat');
        $(this).find("a").css("background", '#ffffff');
        $(this).find(".menu-right").css("background", 'transparent url("/img/our_products/prd_haircolor/nutrisse/menu_right_on.png") left top no-repeat');
    }).bind("mouseout", function(){
        $(this).find(".menu-left").css("background", 'transparent url("/img/our_products/prd_haircolor/nutrisse/menu_left_off.png") left top no-repeat');
        $(this).find("a").css("background", 'transparent url("/img/our_products/prd_haircolor/nutrisse/menu_bg_off.png") left top repeat-x');
        $(this).find(".menu-right").css("background", 'transparent url("/img/our_products/prd_haircolor/nutrisse/menu_right_off.png") left top no-repeat');
    });
    
    //rollover for the "precaucoes de uso" button
    $("#btn-precaucoes").bind("mouseover", function(){
        $(this).find(".menu-left").css("background", 'transparent url("/img/our_products/prd_haircolor/nutrisse/menu_left_on.png") left top no-repeat');
        $(this).find("a").css("background", '#ffffff');
        $(this).find(".menu-right").css("background", 'transparent url("/img/our_products/prd_haircolor/nutrisse/menu_right_on.png") left top no-repeat');
    }).bind("mouseout", function(){
        $(this).find(".menu-left").css("background", 'transparent url("/img/our_products/prd_haircolor/nutrisse/menu_left_off.png") left top no-repeat');
        $(this).find("a").css("background", 'transparent url("/img/our_products/prd_haircolor/nutrisse/menu_bg_off.png") left top repeat-x');
        $(this).find(".menu-right").css("background", 'transparent url("/img/our_products/prd_haircolor/nutrisse/menu_right_off.png") left top no-repeat');
    });
    
    /**
     * HIDRATANTE RANGE PAGE
     */
    $('div[id*="INTENSIVE"]').css("background", "url(/img/our_products/prd_bodycare/body_intensive/gamme_bg.png)");
    
    $('div[id*="INTENSIVE"]').bind("mouseover", function(){
        $(this).css("background", 'transparent url("/img/our_products/prd_bodycare/body_intensive/gamme_bg_over.png") left top no-repeat');
        $(this).find('p[id$="Parag"]').css("color", "#FFFFFF");
    }).bind("mouseout", function(){
        $(this).css("background", 'transparent url("/img/our_products/prd_bodycare/body_intensive/gamme_bg.png") left top no-repeat');
        $(this).find('p[id$="Parag"]').css("color", "#387726");
    });
    
    /**
     * DESODORANTE MASCULINO PAGE
     */
    $('div[id*="MINERAL_MEN"]').css("background", 'transparent url("/img/our_products/prd_deo/mineral_men/gamme_bg.png") left top no-repeat');
    
    $('div[id*="MINERAL_MEN"]').bind("mouseover", function(){
        $(this).css("background", 'transparent url("/img/our_products/prd_deo/mineral_men/gamme_bg_over.png") left top no-repeat');
        $(this).find('p[id$="Parag"]').css("color", "#FFFFFF");
    }).bind("mouseout", function(){
        $(this).css("background", 'transparent url("/img/our_products/prd_deo/mineral_men/gamme_bg.png") left top no-repeat');
        $(this).find('p[id$="Parag"]').css("color", "#387726");
    });
    
    /**
     * DESODORANTE FEMININO PAGE
     */
    $('div[id*="CLARIFY_RENOVE"]').css("background", 'transparent url("/img/our_products/prd_deo/mineral_men/gamme_bg.png") left top no-repeat');
    $('div[id*="CLARIFY_RENOVE"]').find('p[id$="Parag"]').css("color", "#bc5088");
    
    $('div[id*="CLARIFY_RENOVE"]').bind("mouseover", function(){
        $(this).css("background", 'transparent url("/img/our_products/prd_deo/mineral/gamme_bg_over.png") left top no-repeat');
        $(this).find('p[id$="Parag"]').css("color", "#FFFFFF");
    }).bind("mouseout", function(){
        $(this).css("background", 'transparent url("/img/our_products/prd_deo/mineral/gamme_bg.png") left top no-repeat');
        $(this).find('p[id$="Parag"]').css("color", "#bc5088");
    });
    
    /**
     * FRUCTIS PAGE
     */
    $('div[id*="FRUCTIS"]').bind("mouseover", function(){
        $(this).css("background", 'transparent url("/img/our_products/prd_haircare/fructis/gamme_bg_over.png") left top no-repeat');
        $(this).find('p[id$="Parag"]').css("color", "#FFFFFF");
    }).bind("mouseout", function(){
        $(this).css("background", 'transparent url("/img/our_products/prd_haircare/fructis/gamme_bg.png") left top no-repeat');
        $(this).find('p[id$="Parag"]').css("color", "#387726");
    });
});

