(function(){
	var GiftCards = function() {
    	return {

	    	init: function() {
				var dt = $('#datatable-giftcards').DataTable( {
						ajax: {
							url: ajax_giftcards_dt,
							type: 'POST'
						},
						lengthMenu: [ 25, 50, 75, 100 ],
						pageLength: 25,
						serverSide: true,
						retrieve: true,
						paging: true,
						searching: false,
                    	"language": getDatatableLang(act_lang),
						"columns": [
							{ "title": getTranslate('id'), "sortable": true, "data": "id" },
							{ "title": getTranslate('name'), "sortable": true, "data": "title" },
				            { "title": getTranslate('hash'), "sortable": true, "data": "hash" },
				            { "title": getTranslate('amount'), "data": "amount", "sortable": true },
                            { "title": getTranslate('usable'), "data": "amount_left", "sortable": true },
				            { "title": getTranslate('status'), "data": "deleted", "sortable": true },
				            { "title": getTranslate('purchase_date'), "data": "created_at", "sortable": true }
				    	]
				});
	      	}
    	};
  	}();

	$(document).ready(function() {
		GiftCards.init();
	});

})();