/* 
 * Auction script
 * developed by The-Di-Lab
 * contact me at thedilab@gmail.com
 * 
 * uti are functions that are directly used by main.js 
 */

/*
 * display timers when first shows
 */
function displayTimer(){
	var forms = $('.bid-form');
	
	$.each(forms, function(index,value){
			var timerObj = $(value).children('.countdown').eq(0);
			var left = $(value).children('#leftTime').eq(0).val();
			
			showTimeLeft(timerObj,left);
	});	
}

/*
 * contruct a timer
 * params:
 * timerObj-jquery Object
 * diff-Unixtimestamp
 */
function showTimeLeft(timerObj,left){
	$(timerObj).countdown({until: +left});
}
