$obiwi(function() { // $obiwi('#gallery a').lightBox(); var ZeBloc = $obiwi("#Article .NotationTop .NotationPad"); // Si le bloc de notation du bas n'est plus visible, cacher le lien du haut if(!$obiwi(".NotationPadLarge .Etoiles").is(":visible")) { $obiwi("#Article #VariableVisibility").hide(); } // Faire apparaitre le bloc de notation du haut : $obiwi("#Article .NotationTop #NotationLink").click(function() { ZeBloc.is(":visible") ? ZeBloc.slideUp("slow") : ZeBloc.slideDown("slow"); }); /***************************** * Etoiles du haut */ // Hover $obiwi(".NotationPad .Etoiles div:not(.label)").each(function(index,sourceobject) { $obiwi(this).hover( function() { $obiwi(".NotationPad .Etoiles div:not(.label)").slice(0, index + 1).addClass("note_individuelle_on"); $obiwi(".NotationPad .Etoiles div:not(.label)").slice(index + 1, 5).removeClass("note_individuelle_on"); }, function() {} ); // On clique : on referme le bloc, on cache le lien du haut, le bloc du bas $obiwi(this).click(function() { ZeBloc.slideUp("slow"); $obiwi("#Article #VariableVisibility").hide(); $obiwi(".NotationPadLarge .Etoiles").hide(); }); }); $obiwi(".NotationPad .Etoiles").hover( function() {}, function () { $obiwi(".NotationPad .Etoiles div:not(.label)").removeClass("note_individuelle_on"); } ); /***************************** * Etoiles du bas */ // Hover $obiwi(".NotationPadLarge .Etoiles div:not(.label)").each(function(index,sourceobject) { $obiwi(this).hover( function() { $obiwi(".NotationPadLarge .Etoiles div:not(.label)").slice(0, index + 1).addClass("note_individuelle_on"); $obiwi(".NotationPadLarge .Etoiles div:not(.label)").slice(index + 1, 5).removeClass("note_individuelle_on"); }, function() {} ); }); // MouseOut $obiwi(".NotationPadLarge .Etoiles").hover( function() {}, function () { $obiwi(".NotationPadLarge .Etoiles div:not(.label)").removeClass("note_individuelle_on"); } ); });