$(document).ready(function(event) {
	$("#EG_LogoLink").click(function(event) {
		window.location = "http://www.evergreen-ils.org/";
    		return false;

	});
	$("#Home_Link").click(function(event) {
		event.preventDefault();
                $("#Register_Container").fadeOut("slow");
                $("#Participate_Container").fadeOut("slow");
		$("#Purpose_Container").fadeOut("slow");
		$("#Schedule_Container").fadeOut("slow");
		$("#Exhibitor_Container").fadeOut("slow");
		$("#Sponsor_Container").fadeOut("slow");
		$("#Contact_Container").fadeOut("slow");
		$("#Keynote_Container").fadeOut("slow");
		$("#DevMeet_Container").fadeOut("slow");
		$("#Presenter_Container").fadeOut("slow");
		$("#ThankYou_Container").fadeOut("slow");
                setTimeout(function () { $("#Container").height(1250) }, 1000);
                setTimeout(function () { $("#Home_Container").fadeIn("slow") }, 1000);
        });

	$("#Purpose_Link").click(function(event) {
		event.preventDefault();
		$("#Home_Container").fadeOut("slow");
		$("#Register_Container").fadeOut("slow");
		$("#Participate_Container").fadeOut("slow");
		$("#Schedule_Container").fadeOut("slow");
		$("#Exhibitor_Container").fadeOut("slow");
		$("#Sponsor_Container").fadeOut("slow");
		$("#Contact_Container").fadeOut("slow");
		$("#Keynote_Container").fadeOut("slow");
		$("#DevMeet_Container").fadeOut("slow");
                $("#Presenter_Container").fadeOut("slow");
		$("#ThankYou_Container").fadeOut("slow");
		setTimeout(function () { $("#Container").height(700) }, 1000); 
		setTimeout(function () { $("#Purpose_Container").fadeIn("slow") }, 1000);
	});

	$("#Schedule_Link").click(function(event) {
                event.preventDefault();
		$("#Home_Container").fadeOut("slow");
		$("#Purpose_Container").fadeOut("slow");
                $("#Register_Container").fadeOut("slow");
                $("#Participate_Container").fadeOut("slow");
		$("#Exhibitor_Container").fadeOut("slow");
		$("#Sponsor_Container").fadeOut("slow");
		$("#Contact_Container").fadeOut("slow");
		$("#Keynote_Container").fadeOut("slow");
		$("#DevMeet_Container").fadeOut("slow");
                $("#Presenter_Container").fadeOut("slow");
		$("#ThankYou_Container").fadeOut("slow");
		setTimeout(function () { $("#Container").height(1500) }, 1000);
                setTimeout(function () { $("#Schedule_Container").fadeIn("slow") }, 1000);
	});

	$("#Keynote_Link").click(function(event) {
                event.preventDefault();
                $("#Home_Container").fadeOut("slow");
                $("#Purpose_Container").fadeOut("slow");
                $("#Register_Container").fadeOut("slow");
                $("#Participate_Container").fadeOut("slow");
                $("#Exhibitor_Container").fadeOut("slow");
                $("#Sponsor_Container").fadeOut("slow");
                $("#Contact_Container").fadeOut("slow");
		$("#DevMeet_Container").fadeOut("slow");
                $("#Presenter_Container").fadeOut("slow");
		$("#ThankYou_Container").fadeOut("slow");
                setTimeout(function () { $("#Container").height(2300) }, 1000);
                setTimeout(function () { $("#Keynote_Container").fadeIn("slow") }, 1000);
        });

	$("#Register_Link").click(function(event) {
		event.preventDefault();
                $("#Home_Container").fadeOut("slow");
		$("#Purpose_Container").fadeOut("slow");
		$("#Participate_Container").fadeOut("slow");
		$("#Schedule_Container").fadeOut("slow");
		$("#Exhibitor_Container").fadeOut("slow");
		$("#Sponsor_Container").fadeOut("slow");
		$("#Contact_Container").fadeOut("slow");
		$("#Keynote_Container").fadeOut("slow");
		$("#DevMeet_Container").fadeOut("slow");
                $("#Presenter_Container").fadeOut("slow");
		$("#ThankYou_Container").fadeOut("slow");
                setTimeout(function () { $("#Container").height(1100) }, 1000);
		setTimeout(function () { $("#Register_Container").fadeIn("slow") }, 1000);
        });
	
	$("#Register_Link2").click(function(event) {
                event.preventDefault();
                $("#Home_Container").fadeOut("slow");
                $("#Purpose_Container").fadeOut("slow");
                $("#Participate_Container").fadeOut("slow");
                $("#Schedule_Container").fadeOut("slow");
                $("#Exhibitor_Container").fadeOut("slow");
                $("#Sponsor_Container").fadeOut("slow");
		$("#Contact_Container").fadeOut("slow");
		$("#Keynote_Container").fadeOut("slow");
		$("#DevMeet_Container").fadeOut("slow");
                $("#Presenter_Container").fadeOut("slow");
		$("#ThankYou_Container").fadeOut("slow");
                setTimeout(function () { $("#Container").height(700) }, 1000);
                setTimeout(function () { $("#Register_Container").fadeIn("slow") }, 1000);
        });

        $("#Register_Link3").click(function(event) {
                event.preventDefault();
                $("#Home_Container").fadeOut("slow");
                $("#Purpose_Container").fadeOut("slow");
                $("#Participate_Container").fadeOut("slow");
                $("#Schedule_Container").fadeOut("slow");
                $("#Exhibitor_Container").fadeOut("slow");
                $("#Sponsor_Container").fadeOut("slow");
                $("#Contact_Container").fadeOut("slow");
		$("#Keynote_Container").fadeOut("slow");
		$("#DevMeet_Container").fadeOut("slow");
                $("#Presenter_Container").fadeOut("slow");
		$("#ThankYou_Container").fadeOut("slow");
                setTimeout(function () { $("#Container").height(700) }, 1000);
                setTimeout(function () { $("#Register_Container").fadeIn("slow") }, 1000);
        });

	$("#Participate_Link").click(function(event) {
		event.preventDefault();
                $("#Home_Container").fadeOut("slow");
                $("#Purpose_Container").fadeOut("slow");
		$("#Register_Container").fadeOut("slow");
		$("#Schedule_Container").fadeOut("slow");
		$("#Exhibitor_Container").fadeOut("slow");
		$("#Sponsor_Container").fadeOut("slow");
		$("#Contact_Container").fadeOut("slow");
		$("#Keynote_Container").fadeOut("slow");
		$("#DevMeet_Container").fadeOut("slow");
                $("#Presenter_Container").fadeOut("slow");
		$("#ThankYou_Container").fadeOut("slow");
                setTimeout(function () { $("#Container").height(2200) }, 1000);
                setTimeout(function () { $("#Participate_Container").fadeIn("slow") }, 1000);
        });

	$("#Exhibitor_Link").click(function(event) {
                event.preventDefault();
                $("#Home_Container").fadeOut("slow");
                $("#Purpose_Container").fadeOut("slow");
                $("#Register_Container").fadeOut("slow");
                $("#Schedule_Container").fadeOut("slow");
		$("#Participate_Container").fadeOut("slow");
		$("#Sponsor_Container").fadeOut("slow");
		$("#Contact_Container").fadeOut("slow");
		$("#Keynote_Container").fadeOut("slow");
		$("#DevMeet_Container").fadeOut("slow");
                $("#Presenter_Container").fadeOut("slow");
		$("#ThankYou_Container").fadeOut("slow");
                setTimeout(function () { $("#Container").height(1100) }, 1000);
                setTimeout(function () { $("#Exhibitor_Container").fadeIn("slow") }, 1000);
        });

	$("#Sponsor_Link").click(function(event) {
                event.preventDefault();
                $("#Home_Container").fadeOut("slow");
                $("#Purpose_Container").fadeOut("slow");
                $("#Register_Container").fadeOut("slow");
                $("#Schedule_Container").fadeOut("slow");
                $("#Participate_Container").fadeOut("slow");
		$("#Exhibitor_Container").fadeOut("slow");
		$("#Contact_Container").fadeOut("slow");
		$("#Keynote_Container").fadeOut("slow");
		$("#DevMeet_Container").fadeOut("slow");
                $("#Presenter_Container").fadeOut("slow");
		$("#ThankYou_Container").fadeOut("slow");
                setTimeout(function () { $("#Container").height(1500) }, 1000);
                setTimeout(function () { $("#Sponsor_Container").fadeIn("slow") }, 1000);
        });

	$("#Contact_Link").click(function(event) {
                event.preventDefault();
                $("#Home_Container").fadeOut("slow");
                $("#Purpose_Container").fadeOut("slow");
                $("#Register_Container").fadeOut("slow");
                $("#Schedule_Container").fadeOut("slow");
                $("#Participate_Container").fadeOut("slow");
                $("#Exhibitor_Container").fadeOut("slow");
		$("#Sponsor_Container").fadeOut("slow");
		$("#Keynote_Container").fadeOut("slow");
		$("#DevMeet_Container").fadeOut("slow");
                $("#Presenter_Container").fadeOut("slow");
		$("#ThankYou_Container").fadeOut("slow");
                setTimeout(function () { $("#Container").height(1100) }, 1000);
                setTimeout(function () { $("#Contact_Container").fadeIn("slow") }, 1000);
        });

        $("#DevMeet_Link").click(function(event) {
                event.preventDefault();
                $("#Home_Container").fadeOut("slow");
                $("#Purpose_Container").fadeOut("slow");
                $("#Register_Container").fadeOut("slow");
                $("#Schedule_Container").fadeOut("slow");
                $("#Participate_Container").fadeOut("slow");
                $("#Exhibitor_Container").fadeOut("slow");
                $("#Sponsor_Container").fadeOut("slow");
                $("#Keynote_Container").fadeOut("slow");
		$("#DevMeet_Container").fadeOut("slow");
                $("#Presenter_Container").fadeOut("slow");
		$("#ThankYou_Container").fadeOut("slow");
                setTimeout(function () { $("#Container").height(1100) }, 1000);
                setTimeout(function () { $("#DevMeet_Container").fadeIn("slow") }, 1000);
        });

        $("#Presenter_Link").click(function(event) {
                event.preventDefault();
                $("#Home_Container").fadeOut("slow");
                $("#Purpose_Container").fadeOut("slow");
                $("#Register_Container").fadeOut("slow");
                $("#Schedule_Container").fadeOut("slow");
                $("#Participate_Container").fadeOut("slow");
                $("#Exhibitor_Container").fadeOut("slow");
                $("#Sponsor_Container").fadeOut("slow");
                $("#Keynote_Container").fadeOut("slow");
                $("#DevMeet_Container").fadeOut("slow");
                $("#Presenter_Container").fadeOut("slow");
		$("#ThankYou_Container").fadeOut("slow");
                setTimeout(function () { $("#Container").height(700) }, 1000);
                setTimeout(function () { $("#DevMeet_Container").fadeIn("slow") }, 1000);
        });

        $("#ThankYou_Link").click(function(event) {
                event.preventDefault();
                $("#Home_Container").fadeOut("slow");
                $("#Purpose_Container").fadeOut("slow");
                $("#Register_Container").fadeOut("slow");
                $("#Schedule_Container").fadeOut("slow");
                $("#Participate_Container").fadeOut("slow");
                $("#Exhibitor_Container").fadeOut("slow");
                $("#Sponsor_Container").fadeOut("slow");
                $("#Keynote_Container").fadeOut("slow");
                $("#DevMeet_Container").fadeOut("slow");
                $("#Presenter_Container").fadeOut("slow");
                $("#ThankYou_Container").fadeOut("slow");
                setTimeout(function () { $("#Container").height(1000) }, 1000);
                setTimeout(function () { $("#ThankYou_Container").fadeIn("slow") }, 1000);
        });


$("#Speaker").click(function(event) {
		$("#Panel_Form_Container").fadeOut("slow");
		setTimeout(function () { $("#Container").height(2200) }, 1000);
                $("#Speaker_Form_Container").fadeIn("slow");
		$("#formType1").val("Speaker_Form");
		$("#formType2").val("Speaker_Form");
       });

$("#HasMod").click(function(event) {
		if ($('input[name=Has_A_Moderator]').attr('checked')) { 
			// alert($("#Container").height());
			var AddModHeight = ($("#Container").height() + 600);
			setTimeout(function () { $("#Container").height(AddModHeight) }, 1000);
			$("#Moderator_Information").fadeIn("slow");
                } else if ($('input[name=Has_A_Moderator]').attr('checked', '')) {
			$("#Moderator_Information").fadeOut("slow");
			var DelModHeight = ($("#Container").height() - 600);
			setTimeout(function () { $("#Container").height(DelModHeight) }, 1000);
		}
	});

$("#Panel").click(function(event) {
		$("#formType1").val("Panel_Form");
		$("#formType2").val("Panel_Form");
           	$("#Speaker_Form_Container").fadeOut("slow");
		setTimeout(function () { $("#Container").height(1800) }, 1000);
                $("#Panel_Form_Container").fadeIn("slow");
        });

/* $("#PanSel").change(function(event) {
	alert($("#Container").height());
}); */

$("#PanSel").change(function(event) {
		// alert( 'Value is: ' + $('#PanSel').val() );
		if ($('#PanSel').val() == '00') {
			if ($('input[name=Has_A_Moderator]').attr('checked')) {
				// alert("It is ZERO and Mod is Checked.");	
				$("#Pan01").fadeOut("slow");
				$("#Pan02").fadeOut("slow");
				$("#Pan03").fadeOut("slow");
                		$("#Pan04").fadeOut("slow");
                		$("#Pan05").fadeOut("slow");
				setTimeout(function () { $("#Container").height(2400) }, 1000);
			} else if ($('input[name=Has_A_Moderator]').attr('checked', '')) {
                                // alert("It is ZERO and Mod is NOT Checked.");
				$("#Pan01").fadeOut("slow");
                                $("#Pan02").fadeOut("slow");
                                $("#Pan03").fadeOut("slow");
                                $("#Pan04").fadeOut("slow");
                                $("#Pan05").fadeOut("slow");
				setTimeout(function () { $("#Container").height(1800) }, 1000);
                        }
		} else if ($('#PanSel').val() == '01') {
			if ($('input[name=Has_A_Moderator]').attr('checked')) {
				// alert("It is ONE and Mod is Checked.");
				$("#Pan01").fadeIn("slow");
                		$("#Pan02").fadeOut("slow");
                		$("#Pan03").fadeOut("slow");
                		$("#Pan04").fadeOut("slow");
                		$("#Pan05").fadeOut("slow");
				setTimeout(function () { $("#Container").height(2946) }, 1000);
			} else if ($('input[name=Has_A_Moderator]').attr('checked', '')) {
				// alert("It is ONE and Mod is NOT Checked.");	
				$("#Pan01").fadeIn("slow");
                                $("#Pan02").fadeOut("slow");
                                $("#Pan03").fadeOut("slow");
                                $("#Pan04").fadeOut("slow");
                                $("#Pan05").fadeOut("slow");
				setTimeout(function () { $("#Container").height(2346) }, 1000);
			}
		} else if ($('#PanSel').val() == '02') {
			if ($('input[name=Has_A_Moderator]').attr('checked')) {
                                // alert("It is TWO and Mod is Checked.");
				$("#Pan01").fadeIn("slow");
                		$("#Pan02").fadeIn("slow");
                		$("#Pan03").fadeOut("slow");
                		$("#Pan04").fadeOut("slow");
                		$("#Pan05").fadeOut("slow");
				setTimeout(function () { $("#Container").height(3492) }, 1000);
                        } else if ($('input[name=Has_A_Moderator]').attr('checked', '')) {
                                // alert("It is TWO and Mod is NOT Checked.");
				$("#Pan01").fadeIn("slow");
                                $("#Pan02").fadeIn("slow");
                                $("#Pan03").fadeOut("slow");
                                $("#Pan04").fadeOut("slow");
                                $("#Pan05").fadeOut("slow");
				setTimeout(function () { $("#Container").height(2892) }, 1000);
			}
		} else if ($('#PanSel').val() == '03') {
                        if ($('input[name=Has_A_Moderator]').attr('checked')) {
				// alert("It is THREE and Mod is Checked.");
				$("#Pan01").fadeIn("slow");
                		$("#Pan02").fadeIn("slow");
                		$("#Pan03").fadeIn("slow");
                		$("#Pan04").fadeOut("slow");
                		$("#Pan05").fadeOut("slow");
				setTimeout(function () { $("#Container").height(4038) }, 1000);
			} else if ($('input[name=Has_A_Moderator]').attr('checked', '')) {
				// alert("It is THREE and Mod is NOT Checked.");
				$("#Pan01").fadeIn("slow");
                                $("#Pan02").fadeIn("slow");
                                $("#Pan03").fadeIn("slow");
                                $("#Pan04").fadeOut("slow");
                                $("#Pan05").fadeOut("slow");
				setTimeout(function () { $("#Container").height(3438) }, 1000);
			}	
		} else if ($('#PanSel').val() == '04') {
                        if ($('input[name=Has_A_Moderator]').attr('checked')) {
				// alert("It is FOUR and Mod is Checked.");
				$("#Pan01").fadeIn("slow");
                		$("#Pan02").fadeIn("slow");
                		$("#Pan03").fadeIn("slow");
                		$("#Pan04").fadeIn("slow");
                		$("#Pan05").fadeOut("slow");
				setTimeout(function () { $("#Container").height(4584) }, 1000);
			} else if ($('input[name=Has_A_Moderator]').attr('checked', '')) {
				// alert("It is FOUR and Mod is NOT Checked.");
				$("#Pan01").fadeIn("slow");
                                $("#Pan02").fadeIn("slow");
                                $("#Pan03").fadeIn("slow");
                                $("#Pan04").fadeIn("slow");
                                $("#Pan05").fadeOut("slow");
				setTimeout(function () { $("#Container").height(3984) }, 1000);
			}
		} else if ($('#PanSel').val() == '05') {
			if ($('input[name=Has_A_Moderator]').attr('checked')) {
				// alert("It is FIVE and Mod is Checked.");
				$("#Pan01").fadeIn("slow");
                		$("#Pan02").fadeIn("slow");
                		$("#Pan03").fadeIn("slow");
                		$("#Pan04").fadeIn("slow");
                		$("#Pan05").fadeIn("slow");
				setTimeout(function () { $("#Container").height(5130) }, 1000);
			} else if ($('input[name=Has_A_Moderator]').attr('checked', '')) {
				// alert("It is FIVE and Mod is NOT Checked.");
				$("#Pan01").fadeIn("slow");
                                $("#Pan02").fadeIn("slow");
                                $("#Pan03").fadeIn("slow");
                                $("#Pan04").fadeIn("slow");
                                $("#Pan05").fadeIn("slow");
				setTimeout(function () { $("#Container").height(4530) }, 1000);
			}
		}
});
});
