$(function() {
		   
	buttonStatus($(".buttons.step1 .continue"), 'disable');
	
	function buttonStatus(element, status){
		if(status == 'disable')
			$(element).hide();
		else if(status == 'enable')
			$(element).show();
	};
			   
	$("a.select").click(function(){
		var thisParent = $(this).parent(".board_col");
		$(thisParent).fadeTo("fast", 1);
		$(".board_col").not(thisParent).fadeTo("slow", 0.4);
		mb = $(thisParent).attr("id");
		$("input.mb").val(mb);
		
		buttonStatus($(".buttons.step1 .continue"), 'enable');
		
		return false;
	});
	
	$(".buttons.step1 .cancel").click(function(){
		$(".board_col").fadeTo("fast", 1);
		buttonStatus($(".buttons.step1 .continue"), 'disable');
		mb = "";
		
		return false
	});
	
	$(".custom_brand .add").click(function(){
		$(this).parent(".custom_brand").clone(true).appendTo(".custom_brands").children("input").val("");
		
		$(this).removeClass('add').unbind();
		$(this).addClass('remove').bind('click',
			function(){
				$(this).parent(".custom_brand").remove();
			
				return false;
			});
		
		return false;
	});
	
});
