
  /* Modified by Alex Spooner, 2009-06-04 06:03:41 EST */
  
  // POST JSON
  $.postJSON = function(url, data, callback) { $.post(url, data, callback, "json"); };
  
  $(document).ready(function(){

    // FANCYBOX
    $("a.fancybox").fancybox({
      'overlayShow'     : false,
      'zoomSpeedIn'     : 600,
      'zoomSpeedOut'    : 500,
      'easingIn'        : 'easeOutBack',
      'easingOut'       : 'easeInBack'
    }); 

    // SEARCH
    var sfdef = "Product name or model number";
    $("#SearchField")
    .focus(function(){
      var str = $(this).val();
      if (str.search(sfdef)!=-1) $(this).val("");
    })
    .blur(function(){
      var str = $(this).val();
      if (str=="") $(this).val(sfdef);
    });
    $("#SearchButton").click(function(){
      var str = $("#SearchField").val();
      if (str.search(sfdef)==-1 && str>"") $("#SearchForm").submit();
    });
    
    // FOOTER HOVER
    $("li[class^='box'] div").hover(
      function () {
        $(this).attr("class","active");
      }, 
      function () {
        $(this).attr("class","passive");
      }
    );

  });
