 #
 # EVENTS
 #
-$(document).on "vtex.sku.selected", (evt, sku) ->
+$(document).on "vtex.sku.selected", (evt, sku, productData) ->
 	window.FireSkuChangeImage?(sku.sku)
 	#window.FireSkuDataReceived?(sku.sku)
 	window.FireSkuSelectionChanged?(sku.sku)
+
+	$('.buy-button').attr('href', $.skuSelector.getAddUrlForSku(sku.sku, sku.sellerId, 1, productData.salesChannel))
+
+	listPrice = _.formatCurrency sku.listPrice/100
+	bestPrice = _.formatCurrency sku.bestPrice/100
+	installments = sku.installments
+	installmentValue = _.formatCurrency sku.installmentsValue/100
+
+	$('.skuListPrice').text("R$ #{listPrice}")
+	$('.skuBestPrice').text("R$ #{bestPrice}")
+	if installments > 1
+		$('.skuBestInstallmentValue').text("R$ #{installmentValue}")
+		$('.skuBestInstallmentNumber').text(installments)

		# Trigger event for interested scripts
		$this.trigger 'vtex.sku.dimensionChanged', [dimensionName, dimensionValue]
		if selectableSkus.length == 1
			$this.trigger 'vtex.sku.selected', [selectableSkus[0]]


	# Handles submission in the warn unavailable form

		@data.image = @data.skus[0].image

		# Build selectors from given select strings.
		@select = _.mapObj @options.selectors, (key, val) =>
			( => $(val, @context) )

		@select.inputs = => $('input, select', @context)
