function estore_price(t){
	tmp=jQuery("#"+t.id).val();
	tmp=tmp.split(/[\|]+/); 
	state=jQuery("#locator_state").val();
	new_price = new Array();
	if (state=='cz' || state=='sk') { 
		if (tmp[3]==0){ cn=tmp[2];} else{ cn=tmp[3];} 
		DPH="<span id=\""+t.id+"-DPH\" class=\"DPH\">s DPH: "+tmp[1]+" "+Math.round(cn*1.20)+".00</span>"; 
	}else{ DPH='';}

        if (tmp[3]!=0) {
		new_price[0]="<s>";new_price[1]="</s><span class=\"price-act\">"+tmp[1]+" "+tmp[3]+"</span>"+DPH;
	} else{ 
		new_price[0]='<span class="price-act">';new_price[1]='</span>'+DPH;
	}
	if (tmp[4]) jQuery("#"+t.id+"-PROMO").html(tmp[4]); else jQuery("#"+t.id+"-PROMO").html('');
	if (tmp[2]!=0) {jQuery("#"+t.id+"-PRICE").html(new_price[0]+tmp[1]+" "+tmp[2]+new_price[1]); }else{ jQuery("#"+t.id+"-PRICE").html('');}

	jQuery("#"+t.id+"-BUY").attr("href", tmp[0]);
}

function isInteger(s) {
	return (s.toString().search(/^-?[0-9]+$/) == 0);
}

function ch_sum(thiss,num,curr){
	if (isInteger(thiss.value)){ 
	tt=Math.round(num*1.20)*thiss.value;
	jQuery('#SUMPRICE').text(curr+' '+num*thiss.value+'.00 (s DPH: '+curr+' '+tt+'.00)');
	}
}


jQuery(document).ready(function() {

	jQuery( function(){
	jQuery("input[type='submit'],input[type='reset']").addClass("submit");

	jQuery("input[type='submit'],input[type='reset']").hover(function() {
        jQuery(this).addClass('submit_hover');
	}, function() {
	jQuery(this).removeClass('submit_hover');
	});



	jQuery("table.compare-table tr:even").addClass("even");
	jQuery("table.compare-table tr:odd").addClass("odd");
	jQuery("table.compare-table tr").each(function(){
		jQuery("td",this).eq(0).addClass("tleft");
	});

	jQuery("table.basic-table tr:even").addClass("even");
	jQuery("table.basic-table tr:odd").addClass("odd");
	jQuery("table.basic-table tr").each(function(){
		jQuery("td",this).eq(0).addClass("tleft");
	});

	});

	var locatorshow=0;

	jQuery(document).click(function(){
		if (locatorshow==1) {jQuery('#locator-content').hide(); locatorshow=0;}
		if (jQuery('#locator-content').is(':visible')) locatorshow=1;
	});

});