/* <![CDATA[ */
$(document).ready(function() {

$('a[rel*="external"],form[rel*="external"]').attr("target", "_blank");

$("a[rel^='prettyPhoto']").prettyPhoto();

$(".latestlisting, #sliderimage, .searchresult, .salesrepresults").preloadify({ imagedelay:300 });

  $('#videos a, .scrollable img, .latestlisting img, .searchresult img:not(.icon), .button, button, input[type=submit], .image').hover(function() {
	  $('.imagehover').show();
	  $(this).stop().animate({"opacity" : .7});
  }, function(){
	  $('.imagehover').hide();
	  $(this).stop().animate({"opacity" : 1});
  });

  $('#features li:nth-child(even)').addClass('evenRow');


  //dropdown menu
   $("ul.sf-menu").supersubs({
	  minWidth:    12,   // minimum width of sub-menus in em units
	  maxWidth:    35,   // maximum width of sub-menus in em units
	  extraWidth:  1     // extra width can ensure lines don't sometimes turn over
					     // due to slight rounding differences and font-family
  }).superfish();  // call supersubs first, then superfish, so that subs are
				   // not display:none when measuring. Call before initialising
				   // containing tabs for same reason.

  $("#featurecategories .featuresblock:nth-child(3n)").addClass("last");

  //////////////////////////
  // equalize height footer blocks 
  //////////////////////////
  
  var maxH;
  var currH;
  
  maxH = 0;
  
  jQuery('#contentBlock .eqH').each(function(){
    currH = jQuery(this).height();
    if(currH > maxH)
      maxH = currH;
  });

  jQuery('#contentBlock .eqH').each(function(){
    /*if(jQuery(this).css('padding-bottom') != 0 && jQuery(this).parents('.category-opportunity-delta-motors').length > 0 ){
      jQuery(this).css('height', maxH-30);
    } else {
      jQuery(this).css('height', maxH);
    }*/
    jQuery(this).css('height', maxH);
  });

});
/* ]]> */
