$(document).ready(function () { $('.tabs a').click(function () { var tabs = $(this).closest('.tabs'); var pages = $('.tabsPages'); tabs.find('a').closest('li').removeClass('active'); pages.find('.page').removeClass('active'); $(this).closest('li').addClass('active'); pages.find('.page.' + $(this).attr('rel')).addClass('active'); return false; }); }); $(function () { $('a[href*=#]:not([href=#])').click(function () { if ( location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') && location.hostname == this.hostname ) { var target = $(this.hash); target = target.length ? target : $('[name=' + this.hash.slice(1) + ']'); if (target.length) { $('html,body').animate( { scrollTop: target.offset().top - 50, }, 1000 ); return false; } } }); $('.currencies.select').hover( function () { $('.currenciesdropdown').show(); }, function () { $('.currenciesdropdown').hide(); } ); $('.languages.select').hover( function () { $('.languagesdropdown').show(); }, function () { $('.languagesdropdown').hide(); } ); });