jQuery(document).ready(function(){
  jQuery(".ui-slider").slider({
    animate: true,    
    change: handleSliderChange,
    slide: handleSliderSlide
  });
  var widthofcenter = 0;
  jQuery(".scrollerDemocontent-item").each(function (i) {
    widthofcenter += jQuery(this).width()+100;
   });
  jQuery("#scrollerDemocontent-holder").css("width",widthofcenter);
   
  ABC.TabGroup.init();
 
  
});

function handleSliderChange(e, ui)
{
  var maxScroll = jQuery("#scrollerDemocontent-scroll").attr("scrollWidth");
  jQuery("#scrollerDemocontent-scroll").animate({scrollLeft: ui.value * (maxScroll / 100) }, 1000);
  
 
  
}

function handleSliderSlide(e, ui)
{
  var maxScroll = jQuery("#scrollerDemocontent-scroll").attr("scrollWidth");
  jQuery("#scrollerDemocontent-scroll").attr({scrollLeft: ui.value * (maxScroll / 100) });
   //alert(ui.value);
  //alert("handleSliderChange =" + maxScroll);
}