$(document).ready(function(){$("#content-slider").slider({animate:true,change:handleSliderChange,slide:handleSliderSlide});});function handleSliderChange(e,ui)
{villaScrollPos=ui.value;var maxScroll=$("#content-scroll").attr("scrollWidth")-$("#content-scroll").width();$("#content-scroll").animate({scrollLeft:ui.value*(maxScroll/100)},1000);}
function handleSliderSlide(e,ui)
{villaScrollPos=ui.value;var maxScroll=$("#content-scroll").attr("scrollWidth")-$("#content-scroll").width();$("#content-scroll").attr({scrollLeft:ui.value*(maxScroll/100)});}
var villaScrollPos=0;function scrollContent(value)
{villaScrollPos+=value;if(villaScrollPos>100)
{villaScrollPos=100;}
else if(villaScrollPos<0)
{villaScrollPos=0;}
$(".ui-slider-handle").css("left",villaScrollPos+"%");var maxScroll=$("#content-scroll").attr("scrollWidth")-$("#content-scroll").width();$("#content-scroll").animate({scrollLeft:villaScrollPos*(maxScroll/100)},1000);}
