// We can't use the $ handler since the site runs prototype and they both have the same reference engine.
// Therefore we're using the jQuery.noConflict().

jQuery(document).ready(function(){

	var len = jQuery(".scroller-items > div").size();
	var size = (146*len);
	jQuery(".scroller-items").css('width',size+'px');
	
	jQuery("a[rel='plot_back']").click(function(){
		jQuery('#scroller-container').scrollTo('-=146px', { duration:200, axis:'x',easing:'swing' })
		return false;
	})
	
	jQuery("a[rel='plot_forward']").click(function(){
		jQuery('#scroller-container').scrollTo('+=146px', { duration:200, axis:'x',easing:'swing' })
		return false;
	})
	
	jQuery("a[rel='plot-img']").click(function(){
		jQuery("img[rel='plot-img-large']").attr("src",jQuery(this).attr("href"));
		return false;
	})

})
