jQuery.noConflict();

jQuery(document).ready(function() {
  jQuery("#slider").easySlider({
    auto: false,
    continuous: false,
    numeric: true
  });

  sfHover = function() {
    var x = document.getElementById("navcontainer");
    var sfEls = null;
    if (x) {
      sfEls = x.getElementsByTagName("li");
    }
    if (sfEls) {
      for (var i = 0; i < sfEls.length; i++) {
        sfEls[i].onmouseover = function() {
          this.className += " sfhover";
        }
        sfEls[i].onmouseout = function() {
          this.className = this.className.replace(new RegExp(" sfhover\\b"), "");
        }
      }
    }
  }
  if (window.attachEvent) window.attachEvent("onload", sfHover);

  // we want to hide the background image/element to allow
  // full view of the image, if there is only 1 image,
  // and there is no site title
  if ((jQuery('#slider li').size() < 2) && jQuery('.slogan').text().trim() == '') {
    setTimeout(function() {
      if (jQuery('#controls')) {
        jQuery('#controls').css('visibility', 'hidden');
      }
    }, 100);
  }
});

