//var freeship = 100;
var elm = document.getElementById("realprice");
//var elm2 = document.getElementById("freeship");

/*function freeShip(val){
	if(val<freeship){
		var total = freeship - val;
		elm2.innerHTML = "Only <strong>$" + total.toFixed(2) + "</strong> left for <br><strong>FREE SHIPPING</strong>";
	} else {
		elm2.innerHTML = "You qualify for <strong>FREE SHIPPING</strong>!";
	}
}*/

var total = 0;
var opts = 0;

function calcPrice(val,val2){
	// if option comes through
	if(val2){
		optsd = val2;
		var reg = /\$\d+\.*\d*/;
		var p = reg.exec(optsd);
		// if option has price
		if(p){
			p = p.toString();
			p = p.replace("$","")*1;
			opts = p;
			total = (price + p) * val;
		}
	} else {
		var price2 = 0;
		// check if option price
		if(opts>0){
			price2 = price + opts;
			total = price2 * val;
		} else {
			total = price * val;
		}
	}		
	elm.innerHTML = "$" + total.toFixed(2);
	//alert("$" + total.toFixed(2));
	//freeShip(total);
}

calcPrice(1);

/* check vet */
function vetCheck(){
	var elm = document.getElementById("vet_check");
	if(!elm.checked){
		elm.parentNode.style.color = "#ff0000";
		elm.parentNode.style.fontWeight = "bold";
		return false;
	} else {
                            __utmLinkPost(this, 'Kumari');
		return true;
	}
}
