var siteurl = 'http://sanfelicehotel.com.br'; var pluginurl = 'http://sanfelicehotel.com.br/wp-content/plugins'; var templateurl = 'http://sanfelicehotel.com.br/wp-content/themes/vivapixel-theme'; jQuery(document).ready(function ($) { // Abre links em _blank utilizando apenas rel $('a[rel=external]').attr('target','_blank'); $('a[rel=nofollow]').attr('target','_blank'); // Qualquer link com a class="highslide" abre com highslide $('a.highslide').each (function () { this.onclick = function () { return hs.expand ( this, { slideshowGroup: 'grupo' } ); }; }); // Focus em inputs de acordo com o click no seu respectivo label // Efeito suave ao clicar em um link âncora $('a[href^=#]').live('click', function () { if($(this).attr('href') != '#') { $('#'+$(this).attr('href').replace('#', '')).focus(); 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) { var targetOffset = $target.offset().top; $('html,body').animate({scrollTop: targetOffset - 50}, 500); return false; } } } }); });