$(document).ready(function() {
	
	// Expand Panel
	$("#open").click(function(){
		$("div#panel").slideDown("slow");
		return false;
	});	
	
	// Collapse Panel
	$("#close").click(function(){
		$("div#panel").slideUp("slow");	
		return false;
	});		
	
	// Switch buttons from "Log In | Register" to "Close Panel" on click
	$("#toggle a").click(function () {
		$("#toggle a").toggle();
		//return false;
	});
	
	$("#cableCompanyYN").change(function(){
		if($(this).val() == "1"){
			$("#cableYesList").show();
			$("#cableNoList").hide();
			$("#providerSelect").val("");
			$("#cableCompanySelect").change();
		} else if($(this).val() == "0"){
			$("#cableYesList").hide();
			$("#cableNoList").show();
			$("#cableCompanySelect").val("");
			$("#providerSelect").change();
		} else {
			$("#cableYesList").hide();
			$("#cableNoList").hide();
			$("#cableCompanySelect").val("");
			$("#providerSelect").val("");
			$("#providerSelect").change();
			$("#cableCompanySelect").change();
		}
	});

	$("#cableCompanySelect").change(function(){
		if($(this).val() == "Other"){
			$("#otherEmployerInput").show();
		} else {
			$("#otherEmployerInput").hide();
			$("#otherEmployer").val("");
		}
	});
		
	$("#providerSelect").change(function(){
		if($(this).val() == "Other"){
			$("#otherEmployerInput").show();
		} else {
			$("#otherEmployerInput").hide();
			$("#otherEmployer").val("");
		}
	});
	
	$("a#forgotLogin").click(function(){
		$("#frmForgotLogin").slideToggle();
		return false;
	});
});
