/********************************* * site.js * UPDATE :2013.10.04 ********************************/ /* * トップビジュアル */ (function($){ $(function(){ //プルダウンメニュー $('nav ul li').on({ 'mouseenter':function(){ $(this).find('a:first').stop(true, true).addClass('active_on'); $(this).find('dl').stop(true, true).slideDown('fast'); }, 'mouseleave':function(){ $(this).find('a:first').stop(true, true).removeClass('active_on'); $(this).find('dl').stop(true, true).slideUp('fast'); } }); if(navigator.userAgent.indexOf("MSIE") != -1) { $('img .noblackout').each(function() { if($(this).attr('src').indexOf('.png') != -1) { $(this).css({'filter': 'progid:DXImageTransform.Microsoft.AlphaImageLoader(src="'+$(this).attr('src') +'", sizingMethod="scale");'}); } }); } //メインヴィジュアル var stay = 5000; var delay = 500; function mv01(){ $('#mvword').css({ 'margin-left':'-420px' }); $('#mvword').delay(100).animate({'opacity':1,'margin-left':'-460px'},function(){ setTimeout(mv02); }); } function mv02(){ $('#mv01').delay(100).animate({ 'opacity':1 },function(){ setTimeout(mv03, stay); }); } function mv03(){ $('#mv01').animate({ 'opacity':0 },function(){ setTimeout(mv04); }); } function mv04(){ $('#mv02').animate({ 'opacity':1 },function(){ setTimeout(mv05, stay); }); } function mv05(){ $('#mv02').animate({ 'opacity':0 },function(){ setTimeout(mv06); }); } function mv06(){ $('#mv03').animate({ 'opacity':1 },function(){ setTimeout(mv07, stay); }); } function mv07(){ $('#mv03').animate({ 'opacity':0 },function(){ setTimeout(mv08); }); } function mv08(){ $('#mv04').animate({ 'opacity':1 },function(){ setTimeout(mv09, stay); }); } function mv09(){ $('#mv04').animate({ 'opacity':0 },function(){ setTimeout(mv02); }); } mv01(); //特徴のロールオーバー $('#top-tokucho li').hover( function(){ $(this).find('a img').attr('src',$(this).find('a img').attr('src').replace(/([0-9]).jpg/,"$1_on.jpg")); $(this).css('opacity',0.8); }, function(){ $(this).find('a img').attr('src',$(this).find('a img').attr('src').replace("_on.jpg",".jpg")); $(this).css('opacity',1); } ); //特徴のロールオーバー $('.spec-table tr').on('mouseenter',function(){ $(this).find('td').css('background','#fffcdc'); }); $('.spec-table tr').on('mouseleave',function(){ $(this).find('td').css('background','#FFF'); }); //特徴のロールオーバー $('.spec2-table tr').on('mouseenter',function(){ $(this).find('td').css('background','#fffcdc'); }); $('.spec2-table tr:not([class=even])').on('mouseleave',function(){ $(this).find('td').css('background','#FFF'); }); $('.spec2-table tr[class=even]').on('mouseleave',function(){ $(this).find('td').css('background','#EEE'); }); }); })(jQuery);