$(document).ready(function() {
						   
$("#garment-colours li a:first").addClass("selected");
						   
function showColour(colourName) {
	$("p#caption em").html(colourName);
	$("#garment-colours li a").removeClass("selected");
	}

function showImage(imageName) {
    $("#garment").attr("src", imageName);
	}
						   
$("#garment-colours li a").click(function(){
	showColour($(this).attr("title"));
	showImage($(this).attr("href"));
	$(this).addClass("selected");
	return false;
    });

// setting the tabs in the sidebar hide and show, setting the current tab

	$('div#tabs div').hide();
	$('div#new-garments').show();
	$('#tabs ul li a:first').addClass('tab-current');
	
	function showPanel(panelName) {
	$('div#tabs div').hide();
	$(panelName).show();
	}
	
	$("#nav li a").click(function(){
	showPanel($(this).attr("href"));
	$("#nav li a").removeClass("tab-current");
	$(this).addClass("tab-current");
	return false;
    	});
	
    });