var positionLeft = 0;
var picWidthSmall = 285;
var picCounterSmall = 0;
var totalPicsSmall = 5;

var moveLeftSmall = function(){
	if(positionLeft >=  0) return;
	positionLeft += 59;
	$('#sliderImageHolder').animate({
	   
		marginLeft: positionLeft+'px'
	   
	  }, 300, function() {
		
	  });

	
}

var moveRightSmall = function(){

	if(positionLeft <=  -($('#sliderImageHolder').children().size() -totalPicsSmall)* 68) return;
	
	  positionLeft -= 59;
	
	
	
	$('#sliderImageHolder').animate({
	   
		marginLeft: positionLeft+'px' 
	   
	  }, 300, function() {
		
	  });

}

var loadtoSlider =  function(file){
	
	var img = new Image();
	bigfile = file.replace("thumb","big");
	quantity = $("#auction_quan_status").val();
	
	if(quantity == undefined){
		$(img).load(function () {		
		}).error(function () {
			// notify the user that the image could not be loaded
		}).attr('src', base+file);
		$("#image a").html('');
		$("#image a").append(img);
		$("#image a").attr('href',base+bigfile);
				
		
	}else if(quantity =='0'){
		$(img).load(function () {		
		}).error(function () {
			// notify the user that the image could not be loaded
		}).attr('src', base+file);
		$("#image a").html('');
		$("#image a").append(img);
		$("#image a").attr('href',base+bigfile);	
				
	}else{
		
		
		$(img).load(function () {		
		}).error(function () {
			// notify the user that the image could not be loaded
		}).attr('src', base+'theme1/images/sold3.png').attr('style', 'background: url('+base+file+') no-repeat scroll 0 0 transparent;');
		$("#image a").html('');
		$("#image a").append(img);
		$("#image a").attr('href',base+bigfile);
		
	}
	
	
	
}

var loadtoSlider2 =  function(file){
	
	var img = new Image();
	bigfile = file.replace("thumb","big");
	
	$(img).load(function () {		
	}).error(function () {
		// notify the user that the image could not be loaded
	}).attr('src', base+'theme1/images/sold3.png').attr('style', 'background: url('+file+') no-repeat scroll 0 0 transparent;');
	$("#image a").html('');
	$("#image a").append(img);
	$("#image a").attr('href',bigfile);
	
	
	
	
}

