Image ' + (this.index + 1) + ' of ' + this.group.length + '
' : ''); } // beforeShow; }) }); $(document).ready(function(){ $(".popup-page").fancybox({ 'width' : 400, 'height' : 600, 'autoScale' : false, 'transitionIn' : 'none', 'transitionOut' : 'none', 'type' : 'iframe', 'scrolling' : 'no' }); }); $(document).ready(function(){ $("#mainsearchbutton").fancybox({ 'width' : 600, 'height' : 600, 'autoScale' : false, 'transitionIn' : 'none', 'transitionOut' : 'none', 'type' : 'iframe', 'scrolling' : 'auto' }); }); $(document).ready(function() { $(".popup-video").click(function() { $.fancybox({ 'padding': 0, 'autoScale' : false, 'transitionIn' : 'none', 'transitionOut' : 'none', 'title' : (this.title ? this.title : ''), 'width' : 795, 'height' : 447, 'href' : this.href.replace(new RegExp("watch.*v=","i"), "v/") + '?autoplay=1&showinfo=0&rel=0', 'type' : 'swf', 'swf' : { 'wmode' : 'transparent', 'allowfullscreen' : 'true' } }); return false; }); $("a[href^='#']").click(function() { $('body').animate({ scrollTop: $($(this).attr("href")).offset().top-50 }, 500); return false; }); $(document).keypress( function(event){ if (event.which == '13') { event.preventDefault(); } }); $(window).scroll(function(e){ $el = $('#headbuttons'); if ($(this).scrollTop() > 208 && $el.css('position') != 'fixed'){ $('#headbuttons').addClass('tofixed'); $('#backtotop').css({'display':'block'}); } if ($(this).scrollTop() <= 208 && $el.css('position') == 'fixed'){ $('#headbuttons').removeClass('tofixed'); $('#backtotop').css({'display':'none'}); } }); }); function backToTop() { $('body,html').animate({ scrollTop: 0 }, 400); } function setupsearch() { bobj=document.getElementById('mainsearchbutton'); if(bobj) { bobj.setAttribute('href','/spsearch/search.php?search=1&submit=Search&query_t='+document.headersearchform.query_t.value); } } function backToTop() { $('body,html').animate({ scrollTop: 0 }, 400); } $(document).ready(function() { function scrollToAnchor(aid){ var aTag = $("a[name='"+ aid +"']"); $('html,body').animate({scrollTop: aTag.offset().top-50},'slow'); } $("a[href^=#]").click(function() { var href = $(this).attr('href').replace('#', '') scrollToAnchor(href); }); }); $(window).scroll(function(e){ $el = $('#headbuttons'); if ($(this).scrollTop() > 208 && $el.css('position') != 'fixed'){ $('#headbuttons').addClass('tofixed'); $('#backtotop').css({'display':'block'}); } if ($(this).scrollTop() <= 208 && $el.css('position') == 'fixed'){ $('#headbuttons').removeClass('tofixed'); $('#backtotop').css({'display':'none'}); } }); function backToTop() { $('body,html').animate({ scrollTop: 0 }, 400); }