$(function() {
	$("#show_cart").colorbox({width:"80%", height:"80%", iframe:true});
	
	//$('#footer .banner').cycle({ fx: 'fade', speed: 3000, pause: 1, random: 1 });
	$('#fbn1').cycle({ fx: 'fade', speed: 3000, pause: 1, random: 1, delay: -3000 });
	$('#fbn2').cycle({ fx: 'fade', speed: 3000, pause: 1, random: 1, delay: -1500 });
	$('#fbn3').cycle({ fx: 'fade', speed: 3000, pause: 1, random: 1, delay: -3000 });
	$('#fbn4').cycle({ fx: 'fade', speed: 3000, pause: 1, random: 1, delay: -1500 });
	$('#fbn5').cycle({ fx: 'fade', speed: 3000, pause: 1, random: 1, delay: -3000 });

	// フォーカスで消える文字
	$("#head-box").each(function () {
		var parent = $(this).parent().parent()[0];
		var text = '';
		if (parent.id == 'wrap1') {
			text = 'パソコン・パーツ';
		} else if (parent.id == 'wrap2') {
			text = 'グッズ全般';
		} else {
			text = '全ての商品';
		}
		$('#head-box input[name="q"][value=""]').val(text + "から検索").css("color","#666");
		$('#head-box input[name="q"]')
			.focus(function() {
				if ($(this).val()==text + "から検索") { $(this).val("").css("color","#333"); }
			})
			.blur(function() {
				if ($(this).val()=="") { $(this).val(text + "から検索") .css("color","#666"); }
			});
	});
	
	$('.banner a[href^="http://"]').click(function () {
		window.open(this.href, '_blank');
		return false;
	});

});


