/*function update_(){var o=document.getElementsByName('sc[article_size]');if(o.length>1){chck=false;for(i=0;i<o.length;i++){if(o[i].checked==true){document.getElementById('price').innerHTML="EUR "+ACS_prices[o[i].value];chck=true;}}
if(chck==false){if(document.getElementsByName('sc[article_size]')[0].value=='15'){var i=1;}else{var i=0;}o[i].checked=true;document.getElementById('price').innerHTML="EUR "+ACS_prices[o[i].value]}}else{document.getElementById('price').innerHTML="EUR "+ACS_prices[o[0].value];}}*/
//update_();
function sc_hover_preload(){var preld=new Image();preld.src='/img/shopping_cart_unified.png'}
sc_hover_preload();

$('div.sc').mouseover(function(){
	$(this).css('background-position', '0px 29px');
});
$('div.sc').mouseout(function(){
	$(this).css('background-position', '0px 0px');
});
$('div.sc').mousedown(function(){
	$(this).css('background-position', '0px 57px');
});
$('div.sc').mouseup(function(){
	$(this).css('background-position', '0px 0px');
});
$('div.sc').click(function(){
	document.forms['sc_form'].submit();
});
jQuery.fn.update = function(){
	if ($('input[name="sc[article_size]"]').length > 1){
		if($('input[name="sc[article_size]"]:checked').val()){
			$('#price').html('EUR '+ACS_prices[$('input[name="sc[article_size]"]:checked').val()]);
		} else {
			if($('input[name="sc[article_size]"]:first').val()=='15'){
				$('#price').html('EUR '+ACS_prices[$('input[name="sc[article_size]"]:eq(1)').val()]);
				$('input[name="sc[article_size]"]:eq(1)').attr("checked", true);
			} else {
				$('#price').html('EUR '+ACS_prices[$('input[name="sc[article_size]"]:eq(0)').val()]);
				$('input[name="sc[article_size]"]:eq(0)').attr("checked", true);
			}
		}
	} else if($('input[name="sc[article_size]"]').length == 1) {
		$('#price').html('EUR '+ACS_prices[$('input[name="sc[article_size]"]:eq(0)').val()]);
	} else { $('#price').html('Nicht verf&uuml;gbar'); }
}
$('input[name="sc[article_size]"]').bind("blur focus click",function(){$(this).update();});
$(document).ready(function() {
	$(this).update();
	$("a#product_image").fancybox({
		'transitionIn'	:	'fade',
		'transitionOut'	:	'fade',
		'titlePosition'  : 'over',
		'speedIn'		:	600, 
		'speedOut'		:	200, 
		'overlayShow'	:	true
	});
});