$(function() { // ЗАГРУЗКА $('.photoItemInner').hover(function(){ $(this).parent().addClass('photoHovered'); },function (){ $(this).parent().removeClass('photoHovered'); }) // FAQ $('.faqItemTitle a').click(function(){ var t = $(this); if( t.parent().hasClass('textSliderActive') ) { $('.faqItemTitle').removeClass('textSliderActive'); $('.textSliderBody').slideUp(); } else { $('.faqItemTitle').removeClass('textSliderActive'); t.parent().toggleClass('textSliderActive'); $('.textSliderBody').slideUp(); t.parent().next().slideDown(); } $(this).blur(); return false; }); $('.eventPartnersHeadLink').click(function(){ $(this).parent().next('.textBox').slideToggle(); $(this).blur(); return false; }); $('.sideSpecLink').hover(function (){ $(this).children('img').animate({opacity:1}, 300) },function (){ $(this).children('img').animate({opacity:0.6}, 300) }); $('.icoLinkActive, .icoLangCur').click(function(){ $(this).blur(); return false; }); // приехать вечером $('#changeTimeLinkNight').click(function(){ var t = $(this); $('.HimageDay').animate({ opacity:0 }, 650, function (){ t.parents('.timeToggleBox').addClass('timeBoxNight'); $('.main').addClass('mainNight'); }); $('.HimageNight').animate({ opacity:1 }, 650); $(this).blur(); return false; }); // приехать днем $('#changeTimeLinkDay').click(function(){ var t = $(this); $('.HimageNight').animate({ opacity:0 }, 650, function (){ t.parents('.timeToggleBox').removeClass('timeBoxNight'); $('.main').removeClass('mainNight'); }); $('.HimageDay').animate({ opacity:1 }, 650); $(this).blur(); return false; }); // ресайзим картинку в шапке для ИЕ6 if ( $.browser.msie && $.browser.version < 7) { function resizeContent(){ var windowW = $('.main').width(); if(windowW > 950) { $('#headerImageBox, #headerImageNight, #headerImageDay').css('width', windowW) } }; resizeContent(); $(window).resize(function(){ resizeContent(); }); } /* исчезновение текста в инпутах */ $('.hideText').hideText(); var currentTime = new Date(); var hours = currentTime.getHours(); if (hours < 6 || hours > 18) { $('#changeTimeLinkNight').click(); } $('.textBoxEventListPartner img').each(function() { grayscale($(this)); }); }) // on Load