	jQuery(function(){
	var a = jQuery('.product-large-info .xprice').text();
	var xprice = a.split('£');
	var _price = xprice[1].replace(/,/gi,'');
	var total = parseFloat(_price);
	//var finaltotal = total.toFixed(2);

	var prod1price=0;
	var prod2price=0;
	var prod3price=0;
	var prod4price=0;
	var prod5price=0;

	//console.log(xprice[1]);
	//console.log(parseFloat(xprice[1]).toFixed(2));

	var loop=1;
		var count=jQuery(".catProductAttributeGroup").length;

		for(loop=1;loop<=count;loop++){
			var eq=loop-1;
			var loopcls = jQuery(".catProductAttributeGroup:eq("+eq+")").addClass('prod'+loop+'');
		}

	function getPrice($str){
			return $str;
	 }
	 function updateTotal(){
	  var uptotal=prod1price+prod2price+prod3price+prod4price+prod5price;
	  return uptotal;
	 }
	 function getTotal(){
	  var temp=updateTotal()+total;
	  var tofixed = temp.toFixed(2);
	  jQuery(".product-large-info .xprice").html("£"+tofixed); 
	  jQuery(".product-large-info .discountprice").html("£"+tofixed);
	  //total price plus 20 percents
	  /*var prices = temp;
	  var percents = 0.2;

	  var ptotals =  prices*percents;
	  var alltotals = ptotals+prices;
	  var parsetotals = parseFloat(alltotals);
	  var allt = parsetotals.toFixed(2);
	  jQuery(".product-large-info .discountprice").html("£"+allt);
	  console.log(allt);*/
	}

	//Start Object / like switch case
	//Radio button / Input box add attrib 
	//Add additional attrib here
	var Obj = {
		"bar1" : function(){
		jQuery(".prod1 input:radio").click(function(){
			jQuery(".prod1 input:radio").not(this).removeAttr("checked");
			if(jQuery(this).is(":checked")){
				var a = jQuery(this).next("span").text().split("£");    
				var price = parseFloat(a[1]); 
	   
			} else{
				 var price =0;   
			}
		prod1price=getPrice(price); 
	 updateTotal();
	 getTotal();
		});
		},
		"bar2" : function(){
		jQuery(".prod2 input:checkbox").click(function(){
			jQuery(".prod2 input:checkbox").not(this).removeAttr("checked");
			if(jQuery(this).is(":checked")){
				var a = jQuery(this).next("span").text().split("£");    
				var price = parseFloat(a[1]); 
	   
			} else{
				 var price =total;   
			}
		prod2price=getPrice(price); 
	 updateTotal();
	 getTotal();
		});	
		},
		"bar3" : function(){
		jQuery(".prod3 input:checkbox").click(function(){
			jQuery(".prod3 input:checkbox").not(this).removeAttr("checked");
			if(jQuery(this).is(":checked")){
				var a = jQuery(this).next("span").text().split("£");    
				var price = parseFloat(a[1]); 
	   
			} else{
				 var price =0;   
			}
		prod3price=getPrice(price); 
	 updateTotal();
	 getTotal();
		});
		},
		"bar4" : function(){
		jQuery(".prod4 input:checkbox").click(function(){
			jQuery(".prod4 input:checkbox").not(this).removeAttr("checked");
			if(jQuery(this).is(":checked")){
				var a = jQuery(this).next("span").text().split("£");    
				var price = parseFloat(a[1]); 
	   
			} else{
				 var price =0;   
			}
		prod4price=getPrice(price); 
	 updateTotal();
	 getTotal();
		});	
		},
		"bar5" : function(){
		jQuery(".prod5 input:checkbox").click(function(){
			jQuery(".prod5 input:checkbox").not(this).removeAttr("checked");
			if(jQuery(this).is(":checked")){
				var a = jQuery(this).next("span").text().split("£");    
				var price = parseFloat(a[1]); 
	   
			} else{
				 var price =0;   
			}
		prod5price=getPrice(price); 
	 updateTotal();
	 getTotal();
		});	
		},
		"bar6" : function(){
			jQuery(".prod2 input:radio").click(function(){
			jQuery(".prod2 input:radio").not(this).removeAttr("checked");
			if(jQuery(this).is(":checked")){
				var a = jQuery(this).next("span").text().split("£");    
				var price = parseFloat(a[1]); 
	   
			} else{
				 var price =0;   
			}
		prod2price=getPrice(price); 
	 updateTotal();
	 getTotal();
		});
		},
		"bar7" : function(){
		jQuery(".prod3 input:radio").click(function(){
			jQuery(".prod3 input:radio").not(this).removeAttr("checked");
			if(jQuery(this).is(":checked")){
				var a = jQuery(this).next("span").text().split("£");    
				var price = parseFloat(a[1]); 
	   
			} else{
				 var price =0;   
			}
		prod3price=getPrice(price); 
	 updateTotal();
	 getTotal();
		});
		},
		"bar8" : function(){
		jQuery(".prod4 input:radio").click(function(){
			jQuery(".prod4 input:radio").not(this).removeAttr("checked");
			if(jQuery(this).is(":checked")){
				var a = jQuery(this).next("span").text().split("£");    
				var price = parseFloat(a[1]); 
	   
			} else{
				 var price =0;   
			}
		prod4price=getPrice(price); 
	 updateTotal();
	 getTotal();
		});
		},
		"bar9" : function(){
		jQuery(".prod5 input:radio").click(function(){
			jQuery(".prod5 input:radio").not(this).removeAttr("checked");
			if(jQuery(this).is(":checked")){
				var a = jQuery(this).next("span").text().split("£");    
				var price = parseFloat(a[1]); 
	   
			} else{
				 var price =0;   
			}
		prod5price=getPrice(price); 
	 updateTotal();
	 getTotal();
		});
		},
		"default" : function(){
		}

	}; 
	//Obj call if it is true
	if(Obj['bar1']){
		Obj['bar1']();
	}
	if(Obj['bar2']){
		Obj['bar2']();
	}
	if(Obj['bar3']){
		Obj['bar3']();
	}
	if(Obj['bar4']){
		Obj['bar4']();
	}
	if(Obj['bar5']){
		Obj['bar5']();
	}
	if(Obj['bar6']){
		Obj['bar6']();
	}
	if(Obj['bar7']){
		Obj['bar7']();
	}
	if(Obj['bar8']){
		Obj['bar8']();
	}
	if(Obj['bar9']){
		Obj['bar9']();
	}
	 else{
		Obj['default']();
	}
	});	
	//function every load the header price add 20 percents
	jQuery(function() {
		var xQuote = jQuery("#cust3").text();
		var xNan = jQuery(".attrib").text();
		var as = jQuery(".prod1 input:first").next("span").text().split("£");
		var checkprice = parseFloat(as[1]);
		var tprice = checkprice.toFixed(2);
		jQuery(".product-large-info .xprice").html("£"+tprice); 
		// price plus 20 percent
		var prices = checkprice;
		var percents = 0.2;

		var ptotals =  prices*percents;
		var alltotals = ptotals+prices;
		var parsetotals = parseFloat(alltotals);
		var allt = parsetotals.toFixed(2);
	
	    if(xQuote == '')
			{	  
			//Hides Get Quote and Get a Sample
			jQuery('.order-options').css({"display":"none"});
			}//end if	
		if(xNan == ''){  
			jQuery(".product-large-info .discountprice").html();
		}else{
			jQuery(".product-large-info .discountprice").html("£"+allt);
		}
		 
	});
	// function auto load page
	function AddProductExtras(){
		document.location.reload(true);
	}
	// attr price change and add 20 percent
	jQuery(function(){
	var gtattrprice = {
		gteach : function(){
			jQuery('.catProdAttributeItem span').each(function(){
				var abs = jQuery(this).text().split("£");
				var xname = jQuery(this).text().split("£");
				var attrprice = parseFloat(abs[1]);   
		
				var prices = attrprice;
				var percents = 0.2;
				var ptotals =  prices*percents;
				var alltotals = ptotals+prices;

				var parsetotals = parseFloat(alltotals);
				var allt = parsetotals.toFixed(2);
				jQuery(this).html(xname[0]+' £'+allt)
			});
		}
	};
	gtattrprice.gteach();
	});
