jQuery(function(){});
var j = 0;
var step = 0;
jQuery.fn.slideView = function(settings) {
	settings = jQuery.extend({
		easeFunc: "easeInOutExpo",
		easeTime: 750,
		toolTip: false
	}, 
	settings);
	return this.each(function(){
		var container = jQuery(this);
		container.removeClass("svw").addClass("stripViewer");		
		var pictWidth = container.find("li").find("div.eventDivBlock").width();
		var pictHeight = container.find("li").find("div.eventDivBlock").height();
		var pictEls = container.find("li").size();
		var stripViewerWidth = pictWidth*pictEls;
		container.find("ul").css("width" , stripViewerWidth); //assegnamo la larghezza alla lista UL	
		container.css("width" , pictWidth);
		container.css("height" , pictHeight);
		container.each(function(i) {
			
			jQuery("#slideRight").bind("click", function(){
				if(step < pictEls-1){
					jQuery(this).parent().parent().find("a").not(jQuery(this)); // wow!
					var cnt = - (pictWidth*(++step));
					jQuery("div.center_event").find("ul").animate({ left: cnt}, settings.easeTime, settings.easeFunc);
					return false;
				}
       		   });


			jQuery("#slideLeft").bind("click", function(){
				if(step > 0){
					jQuery(this).parent().parent().find("a").not(jQuery(this)); // wow!
					var cnt = - (pictWidth*(--step));				
					jQuery("div.center_event").find("ul").animate({ left: cnt}, settings.easeTime, settings.easeFunc);
					return false;
				}
			});
		});
		j++;
  });	
};
