$(document).ready(function(){$("#content").nexGallery();$("body").disableTextSelect();$("html").css("overflow","hidden");$("body").css("overflow","hidden");$("img").mousedown(function(){return false});$scrollPane=$("#thumbs");$scrollBar=$(".scroll-bar");$scrollBar.slider({animate:true,slide:function(j,i){if($scrollPane.attr("scrollWidth")>$scrollPane.width()){var h=Math.round(i.value/100*($scrollPane.attr("scrollWidth")-$scrollPane.width()));$("#slider_value").val(i.value);$("#scroll_left").val(h);$scrollPane.scrollTo(h,{axis:"x"})}else{$scrollPane.scrollTo(0,{axis:"x"})}},stop:function(){$scrollBar.width("100%")}});var g=$scrollBar.find(".ui-slider-handle").mousedown(function(){$scrollBar.width(g.width())}).wrap('<div class="ui-handle-helper-parent"></div>').parent();$scrollPane.css("overflow","hidden");function c(){return Math.round($scrollPane.width()*$scrollPane.width()/$scrollPane.attr("scrollWidth"))}function f(){return Math.round($scrollPane.attr("scrollLeft")*100/($scrollPane.attr("scrollWidth")-$scrollPane.width()))}function b(){return($scrollPane.width()-c())}function e(){if($scrollPane.attr("scrollWidth")!=$scrollPane.width()){$scrollBar.show();var h=c();$scrollBar.find(".ui-slider-handle").css({width:h,"margin-left":-h/2});g.width($scrollBar.width()-h)}else{$scrollBar.hide()}}function a(){var h=$("html").width()-480+"px";$("#galery-nav").width(h)}$(window).resize(function(){a();e()});function d(){a();e()}setTimeout(d,600)});