$(document).ready(function(){
	
	var m=0;
	$("#defTitle").click(function(){
		if(m==0)
		{
			$("#labCon").slideDown("fast");
			$("#selectBox").css({ backgroundImage: "url(/images/sbc-bg-open.png)" });
			$(".soi #selectBox").css({ backgroundImage: "url(/images/sbc-bg-open-small.png)" });
			
			$("#hidedropdown").css("display", "block");
			
			m=1;
		}
		else
		{
			$(".close").slideUp("fast", function(){
				$("#selectBox").css({ backgroundImage: "url(/images/sbc-bg.png)" });
				$(".soi #selectBox").css({ backgroundImage: "url(/images/sbc-bg-small.png)" });
			});
			m=0;
			
			$("#hidedropdown").css("display", "none");		
		}
	});	
	$("#selectBox label").click(function(){
		var s = $(this).attr("for");
		
		$("#defTitle").html($(this).html());
		$(".close").slideUp("fast", function(){		
			$("#selectBox").css({ backgroundImage: "url(/images/sbc-bg.png)" });
			$(".soi #selectBox").css({ backgroundImage: "url(/images/sbc-bg-small.png)" });
		});
		m=0;
		
		$("#hidedropdown").css("display", "none");
		
		var inp = $("#selectBox input#"+s).attr("checked", "checked");
	});
	
	
	$("#hidedropdown").click(function() {
		$("#labCon").slideUp("fast", function(){
			$("#selectBox").css({ backgroundImage: "url(/images/sbc-bg.png)" });
			$(".soi #selectBox").css({ backgroundImage: "url(/images/sbc-bg-small.png)" });
		});
		
		$("#labCon1").slideUp("fast", function(){
			$("#selectBox1").css({ backgroundImage: "url(/images/sbc-bg-tiny.png)" });
		});
			
		$("#labCon2").slideUp("fast", function(){
			$("#selectBox2").css({ backgroundImage: "url(/images/sbc-bg.png)" });
			$(".soi #selectBox2").css({ backgroundImage: "url(/images/sbc-bg-small.png)" });
		});
		
		$(this).css("display", "none");
		
		m=0;		
	});
	
	
	$("#defTitle1").click(function(){
		if(m==0)
		{
			$("#labCon1").slideDown("fast");
			$("#selectBox1").css({ backgroundImage: "url(/images/sbc-bg-open-tiny.png)" });
			m=1;
			
			$("#hidedropdown").css("display", "block");
		}
		else
		{
			$(".close").slideUp("fast", function(){
				$("#selectBox1").css({ backgroundImage: "url(/images/sbc-bg-tiny.png)" });
			});
			
			$("#hidedropdown").css("display", "none");
			
			m=0;
		}
	});	
	$("#selectBox1 label").click(function(){
		var s = $(this).attr("for");
		
		$("#defTitle1").html($(this).html());
		$(".close").slideUp("fast", function(){		
			$("#selectBox1").css({ backgroundImage: "url(/images/sbc-bg-tiny.png)" });
		});
		
		$("#hidedropdown").css("display", "none");		
		m=0;
		
		var inp = $("#selectBox1 input#"+s).attr("checked", "checked");
	});
	
	
	
	$("#defTitle2").click(function(){
		if(m==0)
		{
			$("#labCon2").slideDown("fast");
			$("#selectBox2").css({ backgroundImage: "url(/images/sbc-bg-open.png)" });
			$(".soi #selectBox2").css({ backgroundImage: "url(/images/sbc-bg-open-small.png)" });
			
			$("#hidedropdown").css("display", "block");
			m=1;
		}
		else
		{
			$(".close").slideUp("fast", function(){
				$("#selectBox2").css({ backgroundImage: "url(/images/sbc-bg.png)" });
				$(".soi #selectBox2").css({ backgroundImage: "url(/images/sbc-bg-small.png)" });
			});
			
			$("#hidedropdown").css("display", "none");
			m=0;
		}
	});	
	$("#selectBox2 label").click(function(){
		var s = $(this).attr("for");
		
		$("#defTitle2").html($(this).html());
		$(".close").slideUp("fast", function(){		
			$("#selectBox2").css({ backgroundImage: "url(/images/sbc-bg.png)" });
			$(".soi #selectBox2").css({ backgroundImage: "url(/images/sbc-bg-small.png)" });
		});
		
		$("#hidedropdown").css("display", "none");
		m=0;
		
		var inp = $("#selectBox2 input#"+s).attr("checked", "checked");
	});
	
	
	
	/*$("#defTitleReviews2").click(function(){
		if(m==0)
		{
			$("#labConReviews2").slideDown("fast");
			$("#selectBoxReviews2").css({ backgroundImage: "url(/images/sbc-bg-open-small.png)" });
			m=1;
		}
		else
		{
			$("#labConReviews2").slideUp("fast", function(){
				$("#selectBoxReviews2").css({ backgroundImage: "url(/images/sbc-bg-small.png)" });
			});
			m=0;
		}
	});	
	$("#selectBoxReviews2 label").click(function(){
		var s = $(this).attr("for");
		
		$("#defTitleReviews2").text($(this).text());
		$("#labConReviews2").slideUp("fast", function(){		
			$("#selectBoxReviews2").css({ backgroundImage: "url(/images/sbc-bg-small.png)" });
		});
		m=0;
		
		var inp = $("#selectBoxReviews2 input#"+s).attr("checked", "checked");
	});*/
	
});


