function swapImage(item, obj) {
	var url = obj.img_mid;
	var href = obj.img_lg;
	var title = obj.title;
	$('#covers img').each(function(i) {
		$(this).removeAttr('class');	
	});
	$('#'+item+' img').attr('class', 'selected');
	var img = new Image();
		img.src = url;
		img.onload = function() {
			$('#item #image').css('display', 'none');
			$('#item #image').html('<a href="'+href+'" title="'+title+'" rel="lightbox0"><img src="' + url +'" /></a>');
			jQuery("a[rel^='lightbox0']").slimbox();
			$('#item #image').fadeIn();
		}
}
function clearField(item) {
	item.value = '';
}
function browse(date) {
	$.ajax({
		type: 'POST',
		url: '/lib/actions.php',
		data: {action:'onsale',date:date},
		dataType: 'html',
		success: function(html) {
			$('#onsale').css('display', 'none');
			$('#onsale').html(html);
			$('#onsale').fadeIn();
		}
	});
}
function getURL(url, target) {
	if(target) {
		window.open(url, target);
	} else {
		window.location=url;
	}
}

