// // // add rollover image functionality to all navigation images in class=rotch_nav_passive rotch_nav_selected and rotch_nav_normal // // function rotch_image_rollover_init() { $(".rotch_nav_passive img").hover(function() { //for greyed out text on the subpages $(this).attr("src", $(this).attr("src").split("-passive.gif").join("-hover.gif")); }, function() { $(this).attr("src", $(this).attr("src").split("-hover.gif").join("-passive.gif")); }); $(".rotch_nav_passive img").mousedown(function() { //mousedown event added to flip image back in non-IE browsers since back button doesn't fire ready event $(this).attr("src", $(this).attr("src").split("-hover.gif").join("-passive.gif")); }); $(".rotch_nav_selected img").hover(function() { //for black text on the subpages $(this).attr("src", $(this).attr("src").split("-selected.gif").join("-hover.gif")); }, function() { $(this).attr("src", $(this).attr("src").split("-hover.gif").join("-selected.gif")); }); $(".rotch_nav_passive img").mousedown(function() { //mousedown event added to flip image back in non-IE browsers since back button doesn't fire ready event $(this).attr("src", $(this).attr("src").split("-hover.gif").join("-selected.gif")); }); $(".rotch_nav_normal img").hover(function() { //for text on the homepage $(this).attr("src", $(this).attr("src").split(".gif").join("-hover.gif")); }, function() { $(this).attr("src", $(this).attr("src").split("-hover.gif").join(".gif")); }); $(".rotch_nav_normal img").mousedown(function() { //mousedown event added to flip image back in non-IE browsers since back button doesn't fire ready event $(this).attr("src", $(this).attr("src").split("-hover.gif").join(".gif")); }); }; $(document).ready(function() { // Main jQuery document ready function that calls additional setup functions rotch_image_rollover_init(); });