$(document).ready(function(){$("#formats").removeAttr("id").wrap('<div id="formats" />').wrap('<div id="formats-mask" />').before('<div id="formats-mask-left">&nbsp;</div><div id="formats-mask-right">&nbsp;</div>');var j=$("#formats ul");var m=parseInt(j.css("padding-left"))+parseInt(j.css("padding-right"));var l=$('<div id="formats-thumb" />');j.children().each(function(){m+=$(this).outerWidth(true)});j.css({width:m+"px"});var e=parseInt(478/m*358);$("#wrapper").prepend(l);l.css({width:e+"px"}).wrap('<div id="formats-scroller" />');l.draggable({axis:"x",containment:"parent"});l.bind("drag",function(o,p){var n=(l.position().left/358)*m;j.css({"margin-left":"-"+n+"px"})});var a=false;$(document).ready(function(){$(".format").each(function(){$this=$(this);$.data(this,"title",$this.html())})});var f=$('<div id="format-title" />').hide();$("#header").append(f);$(".format").hover(function(){$this=$(this);var n=$.data(this,"title");f.html(n);f.css({left:($this.offset().left-(f.outerWidth(false)/2)+20)+"px"});f.fadeIn(250)},function(){f.hide()});var h=0;var k=$("#our-customers ul");var c=$('<div id="customers-mask-left">&nbsp;</div>');var i=$('<div id="customers-mask-right">&nbsp;</div>');k.children().each(function(){h+=$(this).outerWidth(true)});k.css({"margin-left":"10px",width:h+"px"}).before(c,i);c.hover(g,d);i.hover(b,d);function d(){k.stop();k.clearQueue()}function g(){var n=parseInt(k.css("margin-left"));if(n<10){var o=Math.abs(parseInt((n/((h-960)/6))*1000));k.animate({"margin-left":"10px"},o,"linear")}}function b(){var n=parseInt(k.css("margin-left"));if(h-n>960){var o=parseInt(((h-960+n)/((h-960)/6))*1000);k.animate({"margin-left":"-"+(h-960)+"px"},o,"linear")}}});
