// Equalize Heights Function
// key is tallest
$.fn.equalize = function(px) {
	$(this).each(function(){
		var key = 0;
		$(this).children().each(function(i){
			if ($(this).height() > key) { key = $(this).height(); }
		});
		// for ie6!!!!!!!!!!!!!!!!!
		if ($.browser.msie && $.browser.version == 6.0) { $(this).children().css({'height': key}); }
		$(this).children().css({'min-height': key}); 
	});
	return this;
}; 


$(document).ready(function(){
	// Equalize Product Layout
	$('#products_list, #f_a_q').equalize();
	// Adjusts Primary Navigation
	$("#primary_nav li:last-child").addClass("last");
	

 	// Adjusts Product Layout
	$("#products_list li:nth-child(4n+4)").addClass("end");
	
	// Adjusts link Layout
	$("#links li:nth-child(5n+5)").addClass("end");
	

	// ADDS ANCHOR To Product
    $("#featured_product").click(function(){
	window.location=$(this).find("a").attr("href");return false;
    });

    
	
	
	// Equalize Concrete Layout 
	$("#f_a_q li:nth-child(2n+2), #edge_options li:nth-child(2n+2)").addClass("even");
	
	
	$('#thumbs li:first-child(1)').addClass('active'); 

}); 