$(function(){ $('.topsearcha').hover( function(){ if($('#topsearcha').length>0){ $('.topsearch').css('margin-right','0px'); } $('.topsearch').show(); $("#txtk").focus(); }, function(){ $("#txtk").focus(function(){ $(this).show(); }) $("#txtk").focusout(function(){ $('.topsearch').hide(); }) // $('.topsearch').hide(); } ) $('.topsearch').hover( function(){ $(this).show(); $("#txtk").focus(); }, function(){ $("#txtk").focus(function(){ $(this).show(); }) $("#txtk").focusout(function(){ $('.topsearch').hide(); }) } ) //-- $('.snavz').each(function(i){ $(this).click( function(){ $('.snav22').eq(i).show(); } ) }) $('.snav22').each(function(i){ $(this).hover( function(){ $('.snavz').eq(i).addclass('anow'); $(this).show(); }, function(){ $('.snavz').removeclass('anow'); $(this).hide(); } ) }) //-- $('.indexpart3').find('li').hover( function(){ $(this).find('.name').stop().animate({bottom: 0}, 200); }, function(){ $(this).find('.name').stop().animate({bottom: -45}, 200); } ) //-- $('.tabcontentdiv').find('.tabcontent:first').show(); $('.tab').each(function(i){ $(this).find('li').each(function(ii){ $(this).hover( function(){ $('.tab').eq(i).find('li').removeclass('linow'); $(this).addclass('linow'); $('.tabcontentdiv').eq(i).find('.tabcontent').hide(); $('.tabcontentdiv').eq(i).find('.tabcontent').eq(ii).show(); }, function(){} ) }) }) //-- $('.sidebar').hover( function(){ $(this).find('ul').show(); }, function(){ $(this).find('ul').hide(); } ) $('.sidebar').find('li').hover( function(){ $(this).addclass('linow'); }, function(){ $(this).removeclass('linow'); } ) //-- $('.tabcontentdiv2').find('.tabcontent2:first').show(); $('.tab2').each(function(i){ $(this).find('li').each(function(ii){ $(this).click( function(){ $('.tab2').eq(i).find('li').removeclass('linow'); $(this).addclass('linow'); $('.tabcontentdiv2').eq(i).find('.tabcontent2').hide(); $('.tabcontentdiv2').eq(i).find('.tabcontent2').eq(ii).show(); } ) }) }) //-- $(".caselist").find('.list').find('li').hover( function(){ $(this).find('.box').height($(this).height()); $(this).find('.box').fadein(200); $(this).find('.name').fadeout(200); }, function(){ $(this).find('.box').fadeout(200); $(this).find('.name').fadein(200); } ) //-- $('.snava').each(function(i){ $(this).hover( function(){ $('.snav').eq(i).css('left',$(this).offset().left); $('.snav').eq(i).show(); $('.anowyes').removeclass('current'); }, function(){ $('.snav').hide(); $('.anowyes').addclass('current'); } ) }) $('.snav').each(function(i){ $(this).hover( function(){ $('.anowyes').removeclass('current'); $('.snava').eq(i).addclass('on'); $(this).show(); }, function(){ $('.anowyes').addclass('current'); $('.snava').removeclass('on'); $(this).hide(); } ) }) //-- var sup = $('.nav'); if (!sup.length) return; var links = sup.find('a'), on = links.filter('.on'), link = on; links.hover(function() { link.removeclass('on'); link = $(this).addclass('on'); }, function(){}); sup.hover(function(){}, function() { link.removeclass('on'); link = on.addclass('on'); }); // }) jquery(document).ready(function($){ // browser window scroll (in pixels) after which the "back to top" link is shown var offset = 300, //browser window scroll (in pixels) after which the "back to top" link opacity is reduced offset_opacity = 1200, //duration of the top scrolling animation (in ms) scroll_top_duration = 700, //grab the "back to top" link $back_to_top = $('.cd-top'); //hide or show the "back to top" link $(window).scroll(function(){ ( $(this).scrolltop() > offset ) ? $back_to_top.addclass('cd-is-visible') : $back_to_top.removeclass('cd-is-visible cd-fade-out'); if( $(this).scrolltop() > offset_opacity ) { $back_to_top.addclass('cd-fade-out'); } }); //smooth scroll to top $back_to_top.on('click', function(event){ event.preventdefault(); $('body,html').animate({ scrolltop: 0 , }, scroll_top_duration ); }); });