﻿
jQuery(document).ready(function()
                    {
                        var totalWidth = 0;
                        jQuery('#content-holder DIV.content-item').each(function()
                                                                    {
                                                                        totalWidth += jQuery(this).width();
                                                                    });
                                                                    
                        jQuery('#content-holder').width( totalWidth + 100);
                        
                        jQuery("#content-slider").slider({
                        animate: false,
                        slide: handleSliderSlide});
                    });

function handleSliderSlide(e, ui)
{
  var maxScroll = jQuery("#content-scroll").attr("scrollWidth") - jQuery("#content-scroll").width();
  jQuery("#content-scroll").attr({scrollLeft: ui.value * (maxScroll / 100) });
  
}

