/* Compiled JavaScript for Atlas Van Lines */ google.load("jquery", "1.4.2");google.load("jqueryui", "1.8");google.setOnLoadCallback(function () {  setHideMails();  setImageRollovers();    if (typeof pageOnLoad == 'function') {    pageOnLoad();  }     loadJavaScriptFile("/scripts/jquery-plugins/pngfix.js", fixPagePngs, true, true);  setCustomSelectors();  setLinks();  initSearchBox();    if ($("div.share").length > 0) loadJavaScriptFile(ShareThisUrl, initShareThis, true, true);    loadJavaScriptFile("/scripts/jquery-plugins/hotkeys.js", initKeyCommands, true, true);});function setCustomSelectors() {    jQuery.extend(jQuery.expr[":"], {    external: function (obj) {      return obj.href && !obj.href.match(/^mailto\:/) && !obj.href.match(/^javascript\:/) && (obj.hostname && (obj.hostname != location.hostname));    },    mailto: function (obj) {      return obj.href && obj.href.match(/^mailto\:/);    },    pdf: function (obj) {      return obj.href && obj.href.match(/\.pdf$/);    },    zip: function (obj) {      return obj.href && obj.href.match(/\.zip$/);    }  });}function setLinks() {    $("a:external").addClass("external");  $("a:mailto").addClass("mailto");  $("a:pdf").addClass("pdf");  $("a:zip").addClass("zip");    setLinkAnalytics();}function fixPagePngs() {    if (jQuery.browser.msie && jQuery.browser.version < 7) {    $("img[src$='.png']").pngfix();    $("input[type='image'][src$='.png']").pngfix();  }}function loadJavaScriptFile(scriptName, callback, async_bool, cache_bool) {      $.ajaxSetup({    async: async_bool,    cache: cache_bool  });    $.getScript(scriptName, callback);    $.ajaxSetup({    cache: false,    async: true  });}function closeDialogsByOverlay(event) {    var closeButton = $(".ui-dialog:visible").find(".ui-dialog-titlebar-close");  closeButton.trigger("click");  $(".ui-widget-overlay").unbind("click", closeDialogsByOverlay);}function initKeyCommands(){  $(document).bind("keydown", "Alt+Ctrl+m", changeLocation);}function changeLocation() {  window.location = "/utilities/mobile-on.aspx";}var date = new Date();var year = date.getYear();if (year < 1000) year += 1900;function jsnull (){}function initSearchBox() {  $("input#searchbox").focus(function () {    $(this).removeClass("searchfield").addClass("searchclear");  }).blur(function () {    if (this.value == '') {      $(this).addClass("searchfield").removeClass("searchclear");    } else {      $(this).removeClass("searchfield").addClass("searchclear");    }  });    $("input#searchbox").each(function () {    var thisval = $(this).val();    if (thisval == '') {      $(this).addClass("searchfield").removeClass("searchclear");    } else {      $(this).removeClass("searchfield").addClass("searchclear");    }  });}function setImageRollovers(){  initPreloadPlugin();  $("img[src*='_nm.']").each(function(index, domElement) { setRolloverEvents($(domElement));setRolloverPreloads($(domElement))});$("input[type=image][src*='_nm.']").each(function(index, domElement) {setRolloverEvents($(domElement));setRolloverPreloads($(domElement));  });  setCssRolloverPreloads();}function setRolloverEvents(jqueryobj){var imgsrc = jqueryobj.attr("src");var imgsrcON = imgsrc.replace(/_nm/ig,"_hv");jqueryobj.mouseover(function(){jqueryobj.attr("src", imgsrcON);});jqueryobj.mouseout(function(){jqueryobj.attr("src", imgsrc);});}function setRolloverPreloads(jqueryobj){rollsrc = jqueryobj.attr("src");rollON = rollsrc.replace(/_nm/ig,"_hv");jQuery.preLoadImages(rollON);}function setCssRolloverPreloads() {        jQuery.preLoadImages("/images/main-navigation/corporate-btn_hv.jpg");  jQuery.preLoadImages("/images/main-navigation/government-btn_hv.jpg");  jQuery.preLoadImages("/images/main-navigation/home-moving-btn_hv.jpg");  jQuery.preLoadImages("/images/main-navigation/international-btn_hv.jpg");  jQuery.preLoadImages("/images/main-navigation/logistics-btn_hv.jpg");  jQuery.preLoadImages("/images/main-navigation/storage-btn_hv.jpg");  jQuery.preLoadImages("/images/sub-navigation/left-nav-main_hv.jpg");  jQuery.preLoadImages("/images/sub-navigation/left-nav-top_hv.jpg");  jQuery.preLoadImages("/images/sub-navigation/left-nav-bottom_hv.jpg");    jQuery.preLoadImages("/images/main-navigation/1248/corporate-btn_hv.jpg");  jQuery.preLoadImages("/images/main-navigation/1248/government-btn_hv.jpg");  jQuery.preLoadImages("/images/main-navigation/1248/home-moving-btn_hv.jpg");  jQuery.preLoadImages("/images/main-navigation/1248/international-btn_hv.jpg");  jQuery.preLoadImages("/images/main-navigation/1248/logistics-btn_hv.jpg");  jQuery.preLoadImages("/images/main-navigation/1248/storage-btn_hv.jpg");  jQuery.preLoadImages("/images/sub-navigation/1248/left-nav-main_hv.jpg");  jQuery.preLoadImages("/images/sub-navigation/1248/left-nav-top_hv.jpg");  jQuery.preLoadImages("/images/sub-navigation/1248/left-nav-bottom_hv.jpg");    jQuery.preLoadImages("/images/global/share-box-hover.jpg");}function initPreloadPlugin() {  (function ($) {    var cache = [];        $.preLoadImages = function () {      var args_len = arguments.length;      for (var i = args_len; i--; ) {        var cacheImage = document.createElement('img');        cacheImage.src = arguments[i];        cache.push(cacheImage);      }    }  })(jQuery)}at = '@';mailer = 'mailto:';function setHideMails() {  $('.hidemail').each(function () {    var user = $(this).attr("user");    var domain = $(this).attr("domain");    var tld = $(this).attr("tld");    var html = $(this).attr("html");     if (user && domain && tld) {      var emailLink = getmail(user, domain, tld, html);      $(this).html(emailLink);    }  });}function getmail(name, domain, suffix, text){   hiddenMail=(name + at + domain + '.' + suffix);if (! text){     text = hiddenMail;}  email = '<a href="' + mailer + hiddenMail + '" onClick="javascript:_gaq.push([\'_trackPageview\', \'/mailto/' + hiddenMail + '\']);">' + text + '</a>';return email;}var _gaq = _gaq || [];_gaq.push(['_setAccount', 'UA-15856526-3']);_gaq.push(['_trackPageview']);(function () {  var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;  ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';  var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);})();function trackIt(qstring, ignoredir) {  if (_gaq) {    if (ignoredir) {      if (qstring.length == 0) {        _gaq.push(['_trackPageview']);      } else {        _gaq.push(['_trackPageview', '/' + qstring]);      }    } else {      if (qstring.length == 0) {                qs = location.search;        hash = location.hash;        path = location.pathname;        if (path.length < 2) {          path = '';        } else {                    path = path.substring(1);        }                fullpath = path + qs + hash;        _gaq.push(['_trackPageview', '/' + fullpath]);      } else {        _gaq.push(['_trackPageview', '/' + qstring]);      }    }  }}function setLinkAnalytics() {    $("a:pdf, a:zip").live("click", function () {    var thisHref = $(this).attr('href');    var lp = location.pathname;    var lastSlash = location.pathname.lastIndexOf('/');    if (thisHref.substr(0, 1) != '/') {            thisHref = location.pathname.substr(1, lastSlash) + thisHref;    }    trackIt(thisHref, false);  });  $("a:external").live("click", function () {    trackIt('linkout/' + this.href.replace('http://', '').replace('https://', ''), true);  });  $("a:mailto").live("click", function () {    trackIt('mailto/' + this.href.replace('mailto:', ''), true);  });}var ShareThisUrl = "http://w.sharethis.com/button/sharethis.js#publisher=b1875fe4-812f-4653-8550-178fe773f957&amp;type=website&amp;buttonText=&amp;post_services=email%2Cfacebook%2Ctwitter%2Cmyspace%2Cdigg%2Csms%2Cwindows_live%2Cdelicious%2Cstumbleupon%2Creddit%2Cgoogle_bmarks%2Clinkedin%2Cbebo%2Cybuzz%2Cblogger%2Cyahoo_bmarks%2Cmixx%2Ctechnorati%2Cfriendfeed%2Cpropeller%2Cwordpress%2Cnewsvine%2Cxanga%2Cblinklist%2Ctwine%2Ctwackle%2Cdiigo%2Cfark%2Cfaves%2Cmister_wong%2Ccurrent%2Clivejournal%2Ckirtsy%2Cslashdot%2Coknotizie%2Ccare2%2Caim%2Cmeneame%2Csimpy%2Cblogmarks%2Cn4g%2Cbus_exchange%2Cfunp%2Csphinn%2Cfresqui%2Cdealsplus%2Ctypepad%2Cyigg&amp;button=false&amp;onmouseover=false&amp;tracking=google";function initShareThis() {  try {     var shared_object = SHARETHIS.addEntry({      title: document.title,      url: document.location.href    });    shared_object.attachButton($("#ck_sharethis").get(0));    shared_object.attachChicklet("email", $("#ck_email").get(0));    shared_object.attachChicklet("facebook", $("#ck_facebook").get(0));    shared_object.attachChicklet("twitter", $("#ck_twitter").get(0));        SHARETHIS.onReady();      } catch (e) {    $(".share").html("<span class=\"grey\">sharing tools did not load</span>");  } }