 
 			updatePrice(selectedSku, options, this)
 
+	# Handles submission in the warn unavailable form
+	warnUnavailableSubmitHandler = (e) ->
+		e.preventDefault()
+		options.selectors.warnUnavailable(this).find('#notifymeLoading').show()
+		options.selectors.warnUnavailable(this).find('form').hide()
+		xhr = options.warnUnavailablePost(e.target)
+		xhr.done -> options.selectors.warnUnavailable(this).find('#notifymeSuccess').show()
+		xhr.fail -> options.selectors.warnUnavailable(this).find('#notifymeError').show()
+		xhr.always -> options.selectors.warnUnavailable(this).find('#notifymeLoading').hide()
+		return false
+
+
 	# Binds handlers
 	options.selectors.buyButton(this).click(buyButtonHandler)
 

		dimensionName = $(this).attr('data-dimension')
		dimensionValue = $(this).attr('data-value')
		skuSelectorObj.setSelectedDimension(dimensionName, dimensionValue)
		# console.log 'Change dimension!', dimensionName, dimensionValue
		# console.log(skuSelectorObj.selectedDimensionsMap)
		skuSelectorObj.resetNextDimensions(dimensionName)
		selectedSku = skuSelectorObj.findSelectedSku()
		undefinedDimensions = skuSelectorObj.findUndefinedDimensions()


		.toLowerCase()
	return sanitized.charAt(0).toUpperCase() + sanitized.slice(1)

# Format currency to brazilian reais: 123455 becomes "1.234,55"
formatCurrency = (value) ->
	if value? and not isNaN value
		return parseFloat(value/100).toFixed(2).replace('.',',').replace(/(\d)(?=(\d\d\d)+(?!\d))/g, '$1.')
