// JavaScript Document
$(document).ready(function(){
	  	$.ifixpng('../common/js/blank.gif');
		$("span.new_item").ifixpng();
		
		var pp = $(".product");
		var len = pp.length;
		var ppL = [];
		var cnt = 0;
		for(var i= 0; i< len;i++){
			ppL.push(pp[i]);
			cnt++
			if(cnt == 3){
				var mh = 0,th = 0, eh = 0;
				for(j=0;j<3;j++){
					if(mh < $(ppL[j]).height()){
						mh = $(ppL[j]).height();
						th = $(ppL[j]).find(".product_data dt").height();
						eh = $(ppL[j]).find(".product_data dd.explanation").height();
					}
				}
				for(j=0;j<3;j++){
					$(ppL[j]).height(mh);
					$(ppL[j]).find(".product_data dt").height(th);
					$(ppL[j]).find(".product_data dd.explanation").height(eh);
				}
				cnt = 0;
				ppL =[];
			}
		}
		var ppLlen = ppL.length
		if(ppLlen){
			var mh = 0,th = 0, eh = 0;
			for(j=0;j<ppLlen;j++){
				if(mh < $(ppL[j]).height()){
					mh = $(ppL[j]).height();
					th = $(ppL[j]).find(".product_data dt").height();
					eh = $(ppL[j]).find(".product_data dd.explanation").height();
				}
			}
			for(j=0;j<ppLlen;j++){
				$(ppL[j]).height(mh);
				$(ppL[j]).find(".product_data dt").height(th);
				$(ppL[j]).find(".product_data dd.explanation").height(eh);
			}
		}
		
		
		$(".product").viewBox({
				useView : ".thumb a,.product_data a",
				noUseView : ".purchase_link a:odd"
		});
		
});