function toggle_item(target, item)
{
	var c = 0;

	$(target).each(function() {
		$(this).fadeOut('slow');
	});

	$(target).each(function() {
		if ( c == item - 1 ) {
			$(this).fadeIn('slow');
		}
		c++;
	});
}

function switch_item(target, mode, item)
{
	item -= 1;

	$(target).each(function() {
		$(this).fadeOut('slow');
	});

	total = $(target).length - 1;

	if ( mode == 'prev' ) {
		if ( item == 0 ) {
			item = total;
		} else {
			item -= 1;
		}
	} else {
		if ( item == total ) {
			item = 0;
		} else {
			item += 1;
		}
	}

	$(target + ':eq(' + item + ')').fadeIn('slow');
}

$(document).ready(function() {
    $('a.zoom').fancyZoom({
    	closeOnClick: true,
    	scaleImg: true
    });
});