    $(document).ready(function() {
    	$('img.btn-learn-more').hover(function () {
            this.src = 'images/adbuttonhover.gif';
        }, function () {
            this.src = 'images/adbutton.gif';
        });
    });
        $(function() {
            $("div#makeMeScrollable").smoothDivScroll({ autoScroll: "onstart", autoScrollDirection: "backandforth", autoScrollStep: 1, autoScrollInterval: 15, startAtElementId: "startAtMe", visibleHotSpots: "never"});
			
			$("a[rel=example_group]").fancybox({
				'transitionIn'		: 'elastic',
				'transitionOut'		: 'elastic',
				'titlePosition' 	: 'over',
				'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
					return '<span id="fancybox-title-over">Image ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; <a target="_blank" href="http://'+title+' ">' + title+'</a>' : '') + '</span>';
				}
			});
			
        });

//for preloading hover images so there is no delay		
var preloadImages = ['images/adbuttonhover.gif', 'images/clickhover.png'];
var imgs = [];
for (var i=0; i<preloadImages.length;i++) {
  imgs[i] = new Image();
  imgs[i].src = preloadImages[i];
}


