(function($) {
		  jQuery.fn.fx_scroll_h = function(settings_h){
			  var scrollPosition_H = settings_h.scrollPosition_H>0?settings_h.scrollPosition_H:0;
			  
			  
			  var itemWidth = settings_h.itemWidth;
			  var wScrollMax = settings_h.itemWidth*settings_h.itemCount;
			  var countHItem = $('.fx_scroll_h .item').toArray().length;
			  var countVisibleHItem = settings_h.itemCount;

			  scrollHStep = settings_h.scrollHStep>0?settings_h.scrollHStep:settings_h.itemWidth;
			  
			  scroll_CH_Position = -scrollPosition_H*settings_h.itemWidth;

			  var itemH =$('.fx_scroll_h .item').height();
			  
			  
			  
			  if(countHItem>settings_h.itemCount){
 				  $('.fx_scroll_h').css('position','relative');
 				  $('.fx_scroll_h .scroll').css('position','absolute');
 				  $('.fx_scroll_h').css('width',wScrollMax+($('.fx_scroll_h .scrollLeft').width()*2+20));
				  
				  
				  $('.fx_scroll_h .scrollLeft').css('display','block');
				  
				  $('.fx_scroll_h .scrollRight').css('display','block');
				  
				  $('.fx_scroll_h .scroll').css('width',wScrollMax+10);
				  $('.fx_scroll_h .scroll').css('height',itemH);
				  $('.fx_scroll_h .scroll').css('overflow','hidden');
			  }
			  $('.fx_scroll_h').css('position','relative');	
			  $('.fx_scroll_h .scrolable').css('position','absolute');	
			  fx_scroll_h = function(step){
				  if(scroll_CH_Position+step>0){	  return;  }
				  if(scroll_CH_Position+step<-(countHItem-countVisibleHItem)*itemWidth){	  return;  }
				  scroll_CH_Position+=step;
				  $('.fx_scroll_h .scrolable').css('left',scroll_CH_Position+"px");	
			  }
			  $('.fx_scroll_h .scrollLeft').click(function(){fx_scroll_h(scrollHStep)})
			  $('.fx_scroll_h .scrollRight').click(function(){fx_scroll_h(-scrollHStep)})
			  
			  
			  $(".fx_scroll_h .scroll").mousewheel(function(objEvent, intDelta){
					if (intDelta > 0){
					  fx_scroll_h(scrollHStep);
					}
					else if (intDelta < 0){
						fx_scroll_h(-scrollHStep)
					}
					return false;
				});

			  
			  return jQuery;
		  }
})(jQuery);
