 						@selectItemDimensionValueInput(dimension, value).removeClass('item_unavaliable')
 						@selectItemDimensionValueLabel(dimension, value).removeClass('disabled item_unavaliable')
 
+	selectDimension: (dimension) ->
+		dimensions = @selectItemDimensionInput(dimension)
+		# Tenta selecionar apenas dos disponíveis
+		available = dimensions.filter('input:not(.item_unavaliable)')
+		# Caso não haja indisponível, seleciona primeiro não-desabilitado (sku existente)
+		el = (if available.length > 0 then available else dimensions).filter('input:enabled')[0]
+		$(el).attr('checked', 'checked').change() if dimensions.length > 0
+
+	updatePrice: (sku) ->
+		if sku and sku.available
+			@updatePriceAvailable(sku)
+		else
+			@updatePriceUnavailable()
+
+	updatePriceAvailable: (sku) ->
+		listPrice = formatCurrency sku.listPrice
+		bestPrice = formatCurrency sku.bestPrice
+		installments = sku.installments
+		installmentValue = formatCurrency sku.installmentsValue
+
+		# Modifica href do botão comprar
+		@select.buyButton().attr('href', $.skuSelector.getAddUrlForSku(sku.sku)).show()
+		@select.price().show()
+		@select.listPriceValue().text("R$ #{listPrice}")
+		@select.bestPriceValue().text("R$ #{bestPrice}")
+		if installments > 1
+			@select.installment().text("ou até #{installments}x de R$ #{installmentValue}")
+
+	updatePriceUnavailable: () ->
+		# Modifica href do botão comprar
+		@select.buyButton().attr('href', 'javascript:void(0);').hide()
+		@select.price().hide()
+		# $('.notifyme-skuid').val()
+
 #
 # PLUGIN ENTRY POINT
 #
 $.fn.skuSelector = (productData, jsOptions = {}) ->
-	context = this
 	this.addClass('sku-selector-loading')
 
 	# Gather options


	# Instantiate our singleton
	selector = new SkuSelector(productData)
	renderer = new SkuSelectorRenderer(this)

	# Finds elements and puts SKU information in them
	renderer.renderSkuSelector(selector)

			.change(dimensionChangeHandler)

	if options.warnUnavailable
		renderer.select.warnUnavailable().find('form')
			.submit(warnUnavailableSubmitHandler)

	# Select first dimension
	if options.selectOnOpening or selector.findSelectedSku()
		renderer.selectDimension(selector.dimensions[0])

	# Chaining
	return this
