/* * StarFlyer navigation logic, ie. Global, sub, and scroll to top */ $(function() { // Global navigation var gNaviHover = { over: function () { var src = $("img", this).attr("src"); var ftype = src.substring(src.lastIndexOf('.'), src.length); var hsrc = src.replace(ftype, '_o'+ftype); // Display subnav immediately /* $("img.hdNaviBtn", this).attr("src", hsrc); $("span", this).show(); */ // Fade in the subnav var self = this; $("span", this).fadeIn(200, function() { $("img.hdNaviBtn", self).attr("src", hsrc); }); }, //timeout: 350, timeout: 600, out: function () { var src = $("img", this).attr("src"); var hsrc = src.replace("_o",""); $("img.hdNaviBtn", this).attr("src", hsrc); // Hide subnav immediately $("span", this).hide(); // Fade out the subnav //$("span", this).fadeOut(200); } }; $('#hdNavi').find('li.hdNaviLi').hoverIntent(gNaviHover); // Sidebar navigation $('#side').find("ul.sideLink01 li").hover( function(){ var src = $("img", this).attr("src"); var ftype = src.substring(src.lastIndexOf('.'), src.length); var hsrc = src.replace(ftype, '_o'+ftype); $("img", this).attr("src", hsrc); $(this).css("background-color","#FFFFFF"); }, function(){ var src = $("img", this).attr("src"); var hsrc = src.replace("_o",""); $("img", this).attr("src", hsrc); $(this).css("background-color","#F0F0EF"); } ); // Scroll to top $('a[href=#wrapper]').click(function() { $('html, body').animate({scrollTop:0}, 450); return false; }); /* Google Site Search Since this code might be utilized on a ASPX-based page, we add the form element client-side using JavaScript. */ var searchAct = "http://www.starflyer.jp/search/"; $('#search-wrapper').wrap(function() { return ''; }); });