$(function() { $( "#tabs" ).tabs(); }); // Customize twitter feed var hideTwitterAttempts = 0; function hideTwitterBoxElements() { setTimeout( function() { if ( $('[id*=twitter]').length ) { $('[id*=twitter]').each( function(){ var ibody = $(this).contents().find( 'body' ); //ibody.width( $(this).width() + 20 ); //remove scrollbar by adding width if ( ibody.find( '.timeline .stream .h-feed li.tweet' ).length ) { ibody.find( '.timeline' ).css( 'border', 0 ); ibody.find( '.timeline .stream' ).css( 'overflow-x', 'hidden' ); ibody.find( '.timeline .stream' ).css( 'overflow-y', 'scroll' ); ibody.find( '.timeline-header').hide(); ibody.find( '.timeline-footer').hide(); } else { } }); } hideTwitterAttempts++; if ( hideTwitterAttempts < 3 ) { hideTwitterBoxElements(); } }, 1500); } // somewhere in your code after html page load $(document).ready(function(){ hideTwitterBoxElements(); $('.show_hide').showHide({ speed: 250, // speed you want the toggle to happen easing: '', // the animation effect you want. Remove this line if you dont want an effect and if you haven't included jQuery UI changeText: 0, // if you dont want the button text to change, set this to 0 }); $('a.scroll').click(function(){ target = $.attr(this, 'href'); $('html, body').animate({ scrollTop: $(target).offset().top }, 500, function () { window.location.hash = target; }); return false; }); $(".lightbox").fancybox({ openEffect : 'elastic', closeEffect : 'elastic', }); $(".booking-system").fancybox({ type: 'iframe', padding : 0, minWidth : 910, minHeight : 730, fitToView : true, openEffect : 'elastic', closeEffect : 'elastic', helpers : { overlay : {closeClick: true} // prevents closing when clicking OUTSIDE fancybox } }); }); /* href: 'popup.html' */ // Popup window code function newPopup(url) { popupWindow = window.open( url,'popUpWindow','height=700,width=800,left=10,top=10,resizable=yes,scrollbars=yes,toolbar=yes,menubar=no,location=no,directories=no,status=yes') } var bgimages=new Array(); bgimages[0]="/assets/1/01_Dartmouth.jpg"; bgimages[1]="/assets/1/02_Dartmouth.jpg"; bgimages[2]="/assets/1/03_Dartmouth.jpg"; var images = new Array() function preload() { for (i = 0; i < preload.arguments.length; i++) { images[i] = new Image() images[i].src = preload.arguments[i] } } preload("/assets/1/01_Dartmouth.jpg","/assets/1/02_Dartmouth.jpg","/assets/1/03_Dartmouth.jpg") var pathToImg=new Array();for(i=0; i < bgimages.length;i++){pathToImg[i]=new Image();pathToImg[i].src=bgimages[i];} var inc=-1;function slideback(){if(inc < bgimages.length-1) inc++ else inc=0 document.getElementById("main_background").style.backgroundImage="url("+pathToImg[inc].src+")";} if(document.all||document.getElementById) window.onload=new Function('setInterval("slideback()",10000)')