// JavaScript Document
stepcarousel.setup({
	galleryid: 'photo_stream', //id of carousel DIV
	beltclass: 'belt', //class of inner "belt" DIV containing all the panel DIVs
	panelclass: 'panel', //class of panel DIVs each holding content
	autostep: {enable:true, moveby:1, pause:3000},
	panelbehavior: {speed:500, wraparound:false, persist:true},
	defaultbuttons: {enable: true, moveby: 1, leftnav: ['http://i34.tinypic.com/317e0s5.gif', -5, 80], rightnav: ['http://i38.tinypic.com/33o7di8.gif', -20, 80]},
	statusvars: ['web_stat1', 'web_stat2', 'web_stat3'], //register 3 variables that contain current panel (start), current panel (last), and total panels
	contenttype: ['inline'] //content setting ['inline'] or ['external', 'path_to_external_file']
})

jQuery.noConflict();

jQuery(document).ready(function(){
	
	/* ---- Image Scroller buttons ---- */
	jQuery('#scroll-back').click(function(){
		stepcarousel.stepBy('photo_stream', -3);
		return false;
	});
	jQuery('#scroll-forward').click(function(){
		stepcarousel.stepBy('photo_stream', 3);
		return false;
	});
	
	var map = jQuery('#map');
	map.click(function(){return false;}); // ---- Remove the click functionality on the link
	map.removeAttr('title'); // ---- remove the title attribute which appears over the map image
	
	var createNode = jQuery('<span/>').attr('class', 'showImg').appendTo(map); // ---- create the span with an attribute of showImg
	
	map.mousemove(function(e){				   
		var x = e.pageX;
		var y = e.pageY;

		createNode.css({
			top : y + 10 + 'px',
			left : x + 10 + 'px'
		})
	}).hover(function(){
			createNode.html("<img src='" + jQuery(map).attr('href') + "' />");
	}, function(){
			createNode.html("");
	});
});