/*
 * This JavaScript is for the home page ONLY! Do not use elsewhere.
 *
 */

// Namespaces
whitepages.page = function() {};

if (typeof(whitepages.ui) == 'undefined') { whitepages.ui = function() {}; }

// This function shifts promo icons to the left if necessary.
whitepages.page.shift_promo_icons = function()
{
  if (303 > $('#wpn_ad_content_right_rail').height())
  {
    // If the ad height is greater than 303px, move the icons left.
    $('#icons').addClass('moved');
  }
};

// This function clears the ghost text from the business search field
whitepages.page.clearBusSearch = function() {
  if ($("#bus_type").hasClass('normal')) {
  } else {
    $("#bus_type").val('');
    $("#bus_type").addClass('normal');
  }
}

window.onload = function()
{
  whitepages.page.shift_promo_icons();
};
