$(function(){	
	// slides function
	$('#slides').slides({
		preload: true,
		preloadImage: '../nickwebguy/images/loading.gif',
		play: 5000,
		pause: 2500,
		hoverPause: true,
		animationStart: function(current){
			$('.caption').animate({
				bottom:-35
			},100);
			if (window.console && console.log) {
				// example return of current slide number
				console.log('animationStart on slide: ', current);
			};
		},
		animationComplete: function(current){
			$('.caption').animate({
				bottom:0
			},200);
			if (window.console && console.log) {
				// example return of current slide number
				console.log('animationComplete on slide: ', current);
			};
		},
		slidesLoaded: function() {
			$('.caption').animate({
				bottom:0
			},200);
		}
	});
	
	
	// Tool tip function
	$("#dyna img[title]").tooltip({

	   // tweak the position
	   offset: [10, 2],

	   // use the "slide" effect
	   effect: 'slide'

	// add dynamic plugin with optional configuration for bottom edge
	}).dynamic({ bottom: { direction: 'down', bounce: true } });
	
	
	// Scrollable
	// initialize scrollable
	$(".scrollable").scrollable();
	
	// Add Tooltip to scrollable 
	
	$("#scrolltip div img[title]").tooltip().dynamic({ bottom: { direction: 'down', bounce: true } });	
});

