////
//// support code for Machine Age
////

//
// required:
//   jquery.js (version 1.4.+) (see http://www.jquery.com/)
//   pngfix.js


$(document).ready(function(){
	
  ////
  //// PNG Fix for IE 6/7 See pngfix.js
  ////
  $(document).pngFix();
  
	//
	//
	/* Homepage Gallery Transitions */
	$('#homegallery').cycle({ 
      random: 1,
	  fx:     'fade', 
	  speed:  1600, 
	  timeout: 4000 //auto cycle
	});
	
	//
	//
	/* Product Image Transitions and click thu nav */
	$('#product-imgs').cycle({ 
	  fx:     'fade', 
	  speed:  1000, 
	  timeout: 4000, //auto cycle
	  easing: 'easeout', 
	  next:   '#next,#product-imgs', 
      prev:   '#prev',  //navigation below product image
	});
	//
	//
	/*hover fade on category thumbnails  */
	$('.productText').hover(function () {
		  $(this).stop().fadeTo( 250, 1 );
		  return false;
		}, function () {
		  $(this).stop().fadeTo( 200, 0 );
		  return false;
	  });
	
	/*hover fade on general client landing page thumbnails & search results page*/
	$('.attachment-general-post-image,.archive .attachment-search-image, .search .attachment-search-image').hover(function () {
		  $(this).stop().fadeTo( 200, 1 );
		  return false;
		}, function () {
		  $(this).stop().fadeTo( 200, 0.7 );
		  return false;
	  });

});
