
var GreenMeter = {
	updateCurrencySymbols : function (symbol) {
		$(".currencysymbol").html (symbol);
	},
	currency_change : function(self) {
		var newCurrency = $(self).val();
		this.updateCurrencySymbols (this.getCurrencySymbol(newCurrency));
	},
	getCurrencySymbol : function(currency) {
		if (currency == "gbp") {
			return "&#163;";
		} else {
			return "&#8364;";
		}
	}
};


$(window).bind ("load", function() {
	
	//currency symbol change on click
	$("#currency").bind ("change", function(evt) {
		GreenMeter.currency_change(evt.target);
	});
	
	
	//add click event to calculate button to calculate results then show results container
	$("#btnCalculate").bind ("click", function() {
	
		GreenMeterCalculation.process_results ();
		//do calculation here 
		//do calculation here 
		//do calculation here 
		//do calculation here 
		//do calculation here 
		//do calculation here 
	
		//show calculation
		$("#green-meter-results").css ("display", "block");
		return false;

	});
	
	
	
});


