(function(){
	var AuctionPurchase_Purchase = function() {
    return {

    	init: function() {
			$('.btn-addToCart').on('click', function(e){
				var self = $(this),
					parent = self.parents('tr'),
					id = parent.data('id'),
					quantity = 1,
					form = $('.gfBuyForm');

				form.find('input[name="quantity"]').val(quantity);
				form.find('input[name="item"]').val(id);


				form.submit();
			});
		}
    };
  }();

	$(document).ready(function() {
		AuctionPurchase_Purchase.init();


	});

})();
