/*
jQuery
*/

/*@cc_on 
var doc = document; eval('var document = doc');
@*/

$(function(){

	$("table.product_table tbody tr:odd").removeClass("even").addClass("even");

/* natural odercode */
	$("tr#naturalThick01cartformTarget td.length").load("orderform_naturalThick01.html tr#naturalThick01cartformLine td.length select.odercode",function(){
		$("tr#naturalThick01cartformTarget select.odercode").change(function(){
			var text_odercode = $("tr#naturalThick01cartformTarget .odercode :selected").val();
			$("tr#naturalThick01cartformTarget input.odercode").val(text_odercode );
		});
	});
	$("tr#naturalThick02cartformTarget td.length").load("orderform_naturalThick02.html tr#naturalThick02cartformLine td.length select.odercode",function(){
		$("tr#naturalThick02cartformTarget select.odercode").change(function(){
			var text_odercode = $("tr#naturalThick02cartformTarget .odercode :selected").val();
			$("tr#naturalThick02cartformTarget input.odercode").val(text_odercode);
		});
	});
	$("tr#naturalThick03cartformTarget td.length").load("orderform_naturalThick03.html tr#naturalThick03cartformLine td.length select.odercode",function(){
		$("tr#naturalThick03cartformTarget select.odercode").change(function(){
			var text_odercode = $("tr#naturalThick03cartformTarget .odercode :selected").val();
			$("tr#naturalThick03cartformTarget input.odercode").val(text_odercode);
		});
	});
	$("tr#naturalThick05cartformTarget td.length").load("orderform_naturalThick05.html tr#naturalThick05cartformLine td.length select.odercode",function(){
		$("tr#naturalThick05cartformTarget select.odercode").change(function(){
			var text_odercode = $("tr#naturalThick05cartformTarget .odercode :selected").val();
			$("tr#naturalThick05cartformTarget input.odercode").val(text_odercode);
		});
	});
	$("tr#naturalThick10cartformTarget td.length").load("orderform_naturalThick10.html tr#naturalThick10cartformLine td.length select.odercode",function(){
		$("tr#naturalThick10cartformTarget select.odercode").change(function(){
			var text_odercode = $("tr#naturalThick10cartformTarget .odercode :selected").val();
			$("tr#naturalThick10cartformTarget input.odercode").val(text_odercode);
		});
	});

/* synthetic odercode */
	$("tr#syntheticThick01cartformTarget td.length").load("orderform_syntheticThick01.html tr#syntheticThick01cartformLine td.length select.odercode",function(){
		$("tr#syntheticThick01cartformTarget select.odercode").change(function(){
			var text_odercode = $("tr#syntheticThick01cartformTarget .odercode :selected").val();
			$("tr#syntheticThick01cartformTarget input.odercode").val(text_odercode);
		});
	});
	$("tr#syntheticThick02cartformTarget td.length").load("orderform_syntheticThick02.html tr#syntheticThick02cartformLine td.length select.odercode",function(){
		$("tr#syntheticThick02cartformTarget select.odercode").change(function(){
			var text_odercode = $("tr#syntheticThick02cartformTarget .odercode :selected").val();
			$("tr#syntheticThick02cartformTarget input.odercode").val(text_odercode);
		});
	});
	$("tr#syntheticThick03cartformTarget td.length").load("orderform_syntheticThick03.html tr#syntheticThick03cartformLine td.length select.odercode",function(){
		$("tr#syntheticThick03cartformTarget select.odercode").change(function(){
			var text_odercode = $("tr#syntheticThick03cartformTarget .odercode :selected").val();
			$("tr#syntheticThick03cartformTarget input.odercode").val(text_odercode);
		});
	});
	$("tr#syntheticThick05cartformTarget td.length").load("orderform_syntheticThick05.html tr#syntheticThick05cartformLine td.length select.odercode",function(){
		$("tr#syntheticThick05cartformTarget select.odercode").change(function(){
			var text_odercode = $("tr#syntheticThick05cartformTarget .odercode :selected").val();
			$("tr#syntheticThick05cartformTarget input.odercode").val(text_odercode);
		});
	});
	$("tr#syntheticThick10cartformTarget td.length").load("orderform_syntheticThick10.html tr#syntheticThick10cartformLine td.length select.odercode",function(){
		$("tr#syntheticThick10cartformTarget select.odercode").change(function(){
			var text_odercode = $("tr#syntheticThick10cartformTarget .odercode :selected").val();
			$("tr#syntheticThick10cartformTarget input.odercode").val(text_odercode);
		});
	});

/* natural kazu */
	$("tr#naturalThick01cartformTarget td.amount").load("orderform_select_kazu.html table.product_table td.amount select.kazu",function(){
		$("tr#naturalThick01cartformTarget td.amount select.kazu").change(function(){
			var text_kazu = $("tr#naturalThick01cartformTarget .kazu :selected").val();
			$("tr#naturalThick01cartformTarget input.kazu").val(text_kazu);
		});
	});
	$("tr#naturalThick02cartformTarget td.amount").load("orderform_select_kazu.html table.product_table td.amount select.kazu",function(){
		$("tr#naturalThick02cartformTarget td.amount select.kazu").change(function(){
			var text_kazu = $("tr#naturalThick02cartformTarget .kazu :selected").val();
			$("tr#naturalThick02cartformTarget input.kazu").val(text_kazu);
		});
	});
	$("tr#naturalThick03cartformTarget td.amount").load("orderform_select_kazu.html table.product_table td.amount select.kazu",function(){
		$("tr#naturalThick03cartformTarget td.amount select.kazu").change(function(){
			var text_kazu = $("tr#naturalThick03cartformTarget .kazu :selected").val();
			$("tr#naturalThick03cartformTarget input.kazu").val(text_kazu);
		});
	});
	$("tr#naturalThick05cartformTarget td.amount").load("orderform_select_kazu.html table.product_table td.amount select.kazu",function(){
		$("tr#naturalThick05cartformTarget td.amount select.kazu").change(function(){
			var text_kazu = $("tr#naturalThick05cartformTarget .kazu :selected").val();
			$("tr#naturalThick05cartformTarget input.kazu").val(text_kazu);
		});
	});
	$("tr#naturalThick10cartformTarget td.amount").load("orderform_select_kazu.html table.product_table td.amount select.kazu",function(){
		$("tr#naturalThick10cartformTarget td.amount select.kazu").change(function(){
			var text_kazu = $("tr#naturalThick10cartformTarget .kazu :selected").val();
			$("tr#naturalThick10cartformTarget input.kazu").val(text_kazu);
		});
	});

/* synthetic kazu */
	$("tr#syntheticThick01cartformTarget td.amount").load("orderform_select_kazu.html table.product_table td.amount select.kazu",function(){
		$("tr#syntheticThick01cartformTarget td.amount select.kazu").change(function(){
			var text_kazu = $("tr#syntheticThick01cartformTarget .kazu :selected").val();
			$("tr#syntheticThick01cartformTarget input.kazu").val(text_kazu);
		});
	});
	$("tr#syntheticThick02cartformTarget td.amount").load("orderform_select_kazu.html table.product_table td.amount select.kazu",function(){
		$("tr#syntheticThick02cartformTarget td.amount select.kazu").change(function(){
			var text_kazu = $("tr#syntheticThick02cartformTarget .kazu :selected").val();
			$("tr#syntheticThick02cartformTarget input.kazu").val(text_kazu);
		});
	});
	$("tr#syntheticThick03cartformTarget td.amount").load("orderform_select_kazu.html table.product_table td.amount select.kazu",function(){
		$("tr#syntheticThick03cartformTarget td.amount select.kazu").change(function(){
			var text_kazu = $("tr#syntheticThick03cartformTarget .kazu :selected").val();
			$("tr#syntheticThick03cartformTarget input.kazu").val(text_kazu);
		});
	});
	$("tr#syntheticThick05cartformTarget td.amount").load("orderform_select_kazu.html table.product_table td.amount select.kazu",function(){
		$("tr#syntheticThick05cartformTarget td.amount select.kazu").change(function(){
			var text_kazu = $("tr#syntheticThick05cartformTarget .kazu :selected").val();
			$("tr#syntheticThick05cartformTarget input.kazu").val(text_kazu);
		});
	});
	$("tr#syntheticThick10cartformTarget td.amount").load("orderform_select_kazu.html table.product_table td.amount select.kazu",function(){
		$("tr#syntheticThick10cartformTarget td.amount select.kazu").change(function(){
			var text_kazu = $("tr#syntheticThick10cartformTarget .kazu :selected").val();
			$("tr#syntheticThick10cartformTarget input.kazu").val(text_kazu);
		});
	});

/* recycle kazu */
	$("tr#recycleThick05cartformTarget td.amount").load("orderform_select_kazu.html table.product_table td.amount select.kazu",function(){
		$("tr#recycleThick05cartformTarget td.amount select.kazu").change(function(){
			var text_kazu = $("tr#recycleThick05cartformTarget .kazu :selected").val();
			$("tr#recycleThick05cartformTarget input.kazu").val(text_kazu);
		});
	});
	$("tr#recycleThick10cartformTarget td.amount").load("orderform_select_kazu.html table.product_table td.amount select.kazu",function(){
		$("tr#recycleThick10cartformTarget td.amount select.kazu").change(function(){
			var text_kazu = $("tr#recycleThick10cartformTarget .kazu :selected").val();
			$("tr#recycleThick10cartformTarget input.kazu").val(text_kazu);
		});
	});
	$("tr#recycleThick15cartformTarget td.amount").load("orderform_select_kazu.html table.product_table td.amount select.kazu",function(){
		$("tr#recycleThick15cartformTarget td.amount select.kazu").change(function(){
			var text_kazu = $("tr#recycleThick15cartformTarget .kazu :selected").val();
			$("tr#recycleThick15cartformTarget input.kazu").val(text_kazu);
		});
	});
	$("tr#recycleThick20cartformTarget td.amount").load("orderform_select_kazu.html table.product_table td.amount select.kazu",function(){
		$("tr#recycleThick20cartformTarget td.amount select.kazu").change(function(){
			var text_kazu = $("tr#recycleThick20cartformTarget .kazu :selected").val();
			$("tr#recycleThick20cartformTarget input.kazu").val(text_kazu);
		});
	});


});



/*
Customer Voice
------------------------------*/
function voiceZoom(fileNum){
	var num = fileNum;
	$.fn.qtip.styles.tooltipStyleOdd = {
			width: 400,
			background: '#AFC2C2',
			border: {
				width: 5,
				radius: 5,
				color: '#AFC2C2'
				},
			tip: 'leftMiddle'
	};
	$.fn.qtip.styles.tooltipStyleEven = {
			width: 400,
			background: '#AFC2C2',
			border: {
				width: 5,
				radius: 5,
				color: '#AFC2C2'
				},
			tip: 'rightMiddle'
	};
	var MAX_NUM = num + 1;
	var htmlTag = new Array();
	var selectorTag = new Array();

	for(i=0; i<MAX_NUM; i++){
		htmlTag[i] = '<img src=\"../img/voice/voice' + [i] + '.jpg\" alt=\"ゴムシート.comに寄せて頂いたお客様の声' + [i] + '\" />';
		selectorTag[i] = '#content-itemlist .voice' + [i] + ' a';
		if(i%2 != 0){
			$(selectorTag[i]).qtip({ 
				fixed: false, position: {corner: {target: 'rightTop', tooltip: 'leftMiddle'}}, style: 'tooltipStyleOdd', content: htmlTag[i]	
			});
		}else{
			$(selectorTag[i]).qtip({ 
				fixed: false, position: {corner: {target: 'leftTop', tooltip: 'rightMiddle'}}, style: 'tooltipStyleEven', content: htmlTag[i]	
			});
		};
	};
}
