// JavaScript Document //=====================================// // distributors // //=====================================// $(document).ready(function(){ $(".distributor_map a").mouseover(function(){ var currId = $(this).attr("id"); var currTop = parseInt($(this).css("top")); var currLft = parseInt($(this).css("left")); var currCss = $(this).attr("class"); if (currCss =="dis_comm" ) { currTop = currTop + 20 +"px"; currLft = currLft -5 + "px"; } else if (currCss =="dis_area") { currTop = currTop + 25 +"px"; currLft = currLft -1 + "px"; } $(".dismap_con").css({"top":currTop,"left":currLft}); $(this).next(".dismap_con").show(); // $(".distributor_map > div").hide().eq($('.distributor_map a').index(this)).show(); }); $(".distributor_map a").mouseout(function(){ $(".dismap_con").hide(); }) $(".dismap_con").mouseover(function(){ $(this).show(); }); $(".dismap_con").mouseout(function(){ $(this).hide(); }); }); // function scrollDisInfo(disCountry) { // var sTop=document.getElementById(disCountry).getBoundingClientRect().top+$(window).scrollTop()-70; // $("body,html").animate({scrollTop: sTop+"px"}, 1000); // } function disCountryStyle(disCountry){ var disCountryThis = '#' + disCountry; return $(disCountry).css({'top':''}) } //=====================================// // contact us // //=====================================// function getParam() { var params=location.search.substr(1) var ArrParam=params.split('#'); if(ArrParam.length>1) { return ArrParam[1]; } } $(function(){ var mao=$("#"+getParam()); if(mao.length>0) { var pos=mao.offset().top; var poshigh=mao.height(); $("html,body").animate({scrollTop:pos-poshigh-30},3000); } }); function scrollDis(disCountry){ window.location.href="distributors.html"+disCountry; var sTop = $(disCountry).offset().top - 48; $("body,html").animate({scrollTop: sTop+"px"}, 0); }