
$(document).ready(function(){function findValue(li){if(li==null)return alert("Aucun résultat !");if(!!li.extra)var sValue=li.extra[0];else var sValue=li.selectValue;window.location.href=li.extra[2];}
$("#toTheTop").click(function(ev){$('html,body').animate({scrollTop:0},'fast');}),$("#toTheGuide").click(function(ev){var targetOffset=$("#guide").offset().top;$('html,body').animate({scrollTop:targetOffset},800,'easeInElastic');}),$("#wraperHeader").pngFix(),$("#content").pngFix(),$(".leftCell").pngFix(),$(".rightCell").pngFix();$(".hardwareGallery a").lightBox();$("#searchManufacturers li").click(function(){var str=$(this).text();$("#content").html('<div><img src="/img/loading.gif" alt="loading"/> Veuillez patientez</div>');$.get("/includes/searchManufacturers.php?search="+str,{},function success(data,textStatus){$("body #content").html(data);});});$("#navigation").jCarouselLite({btnNext:".next",btnPrev:".prev",speed:800,mouseWheel:true,visible:5,scroll:3});$('#news marquee').marquee('newsslider',true).mouseover(function(){$(this).trigger('stop');}).mouseout(function(){$(this).trigger('start');});$('#player marquee').marquee('playerslider',false).mouseover(function(){$(this).trigger('stop');}).mouseout(function(){$(this).trigger('start');});$("#rq").autocomplete("/xhr/searchEngine.php",{delay:10,minChars:2,matchSubset:1,matchContains:1,cacheLength:10,onItemSelect:function(li){window.location.href=li.extra[2];},onFindValue:findValue,formatItem:function(row){return row[0]+" ("+row[1]+")";},autoFill:true});$("#submitResult").live('click',function(){var oSuggest=$("#rq")[0].autocompleter;oSuggest.findValue();return false;});});
