﻿$(document).ready(function () {


    function showLight() {
        var src = $(".barGrad").css("display");
        var src2 = $(".lightbox").css("opacity");

        if (src == "none") {

            $(".lightbox").css({ opacity: "0" });

            //.page
            //$(".pics").css("display", "none");
            //$(".barGrad").css("display", "none");
            //$("#emailRight").css("display", "none");
            //{
            //width: 0px !important;
            //-moz-box-shadow: none !important;
            //-webkit-box-shadow: none !important;
            //-o-box-shadow: none !important;
            //border: none !important;
            //}

        }
    }


    $('.lightbox').css({ height: $(document).height() });

    $(".closeQuick").hide();

    $('.lbContentJobApply').css({ top: '50%', left: '50%', margin: '-' + ($('.lbContentJobApply').height() / 2) + 'px 0 0 -' + ($('.lbContentJobApply').width() / 2) + 'px' });
    $('.lbContent').css({ top: '50%', left: '50%', margin: '-' + ($('.lbContent').height() / 2) + 'px 0 0 -' + ($('.lbContent').width() / 2) + 'px' });

    $(".newsletter").slideDown();

    $("#ctl00_close").click(function () {
        $('.newsletter').slideUp();
        $(".close").hide();
    });


    $(".closeQuick").click(function (event) {
        event.preventDefault();
        $("#ContentPlaceHolderDefault_Panel2").hide();
        $("#ContentPlaceHolderDefault_Panel3").hide();
        $("#ctl00_MainContent_Panel2").hide();
        $("#ContentPlaceHolderDefault_MainContent_ctl00_Registration_1_Panel2").hide();
        $("#ContentPlaceHolderDefault_Panel4").hide();
        $("#ctl00_Panel4").hide();
        $("#toolbar").hide().delay(500).fadeIn('slow');
        $(".closeQuick").hide();
    });

    $(".lightbox").click(function () {
        $("#ContentPlaceHolderDefault_Panel2").hide();
        $("#ContentPlaceHolderDefault_Panel3").hide();
        $("#ctl00_MainContent_Panel2").hide();
        $("#ContentPlaceHolderDefault_Panel4").hide();
        $("#ContentPlaceHolderDefault_MainContent_ctl00_Registration_1_Panel2").hide();     
        $("#toolbar").hide().delay(500).fadeIn('slow');
        $(".closeQuick").hide();
    });
    


    //test java
    $('#ctl00_lblJavaS').html("JavaScript Enabled!");

    // hide search tips
    $('#tips').hide();

    // show search tips
    $("#searchTips").click(
    function () {
        $('#tips').slideToggle("slow");
    });

    // hide drop down menu on page load
    $('#navigation p').hide();

    // show drop down menu
    $("#jobSeek").mouseover(
    function () {
        $('#navigation p').slideDown("slow");
    });

    // hide drop down menu on other menu navigation items
    $("#home").mouseover(
    function () {
        $('#navigation p').delay(500).slideUp("slow");
    });

    $("#about").mouseover(
    function () {
        $('#navigation p').delay(500).slideUp("slow");
    });

    $("#employ").mouseover(
    function () {
        $('#navigation p').delay(500).slideUp("slow");
    });

    $("#vacs").mouseover(
    function () {
        $('#navigation p').delay(500).slideUp("slow");
    });

    $("#reg").mouseover(
    function () {
        $('#navigation p').delay(500).slideUp("slow");
    });

    $("#contact").mouseover(
    function () {
        $('#navigation p').delay(500).slideUp("slow");
    });

    // hide drop down menu when leaving header div
    $("#headWrapper").mouseleave(
    function () {
        $('#navigation p').delay(500).slideUp("slow");
    });

    // enable rollover effects for all pages
    $("#wrapper img").hover(
    function () {
        this.src = this.src.replace("_off", "_on");
    },
    function () {

        this.src = this.src.replace("_on", "_off");

    });


});



