﻿

$(document).ready(function() {
    
    $('#posterImage').cycle({
        fx: 'fade' // choose your transition type, ex: fade, scrollUp, shuffle, etc...
    });
    $("#facebookDiv").click(function() {

        $(this).removeClass().addClass("socialntwrkOnFocus");
        $("#youtubeDiv").removeClass().addClass("socialntwrkLostFocus");
        $("#inDiv").removeClass().addClass("socialntwrkLostFocus");
        $("#inDiv").removeClass().addClass("socialntwrkLostFocus");
        $("#inDiv").removeClass().addClass("socialntwrkLostFocus");
        $("#facebook").show();
        $("#youtube").hide();
        $("#linked").hide();



    }).mouseout(function() {

    });


    $("#youtubeDiv").click(function() {
        $(this).removeClass().addClass("socialntwrkOnFocus");
        $("#facebookDiv").removeClass().addClass("socialntwrkLostFocus");
        $("#inDiv").removeClass().addClass("socialntwrkLostFocus");
        $("#facebook").css("display", "none");
        $("#youtube").css("display", "block");
        $("#linked").css("display", "none");
    }).mouseout(function() {

    });
    $(":text").focus(function() {
        $(this).val("");


    });
    $(":text").blur(function() {
        if ($(this).val() == "") {

            if ($(this).attr("id").indexOf("Email") > -1) {
                $(this).val("Email Address");
            }
            if ($(this).attr("id").indexOf("UserName") > -1) {
                $(this).val("Enter UserName");
            }
        }


    });
    $("#inDiv").click(function() {
        $(this).removeClass().addClass("socialntwrkOnFocus");
        $("#facebookDiv").removeClass().addClass("socialntwrkLostFocus");
        $("#youtubeDiv").removeClass().addClass("socialntwrkLostFocus");
        $("#facebook").hide();
        $("#youtube").hide();
        $("#linked").show();
    }).mouseout(function() {

    });
    /*
    <img src="/Images/home-poster1.jpg" alt="poster1" />
    <img src="/Images/home-poster2.jpg" alt="poster2" />
    <img src="/Images/home-poster3.jpg" alt="poster3" />
    */

    var pageCrumb = $("#breadCrumb").text();

    $('#posterImage').cycle({
        fx: 'stop' // choose your transition type, ex: fade, scrollUp, shuffle, etc...
    });
    $("#img1").css("display", "none");
    $("#img2").css("display", "none");
    $("#img3").css("display", "none");
    if (pageCrumb.indexOf("Industry") > -1) {
        $("#img1").attr("src", "/Images/home-boardroom.jpg");
        $("#img2").css("display", "none");
        /*
        $("#img2").attr("src", "/Images/industry-poster.jpg");
        $("#img3").attr("src", "/Images/industry-poster.jpg");
        */
    }

	else if (pageCrumb.indexOf("Convention Center") > -1) {
        $("#img1").attr("src", "/Images/home-vbcc1.jpg");
        $("#img2").attr("src", "/Images/home-vbcc1.jpg");
        $("#img3").attr("src", "/Images/home-vbcc1.jpg");
    }

	else if (pageCrumb.indexOf("Meetings and Conventions") > -1) {
        $("#img1").attr("src", "/Images/home-boardroom.jpg");
        $("#img2").attr("src", "/Images/home-boardroom.jpg");
        $("#img3").attr("src", "/Images/home-boardroom.jpg");
    }

	else if (pageCrumb.indexOf("Regional and State Programs") > -1) {
        $("#img1").attr("src", "/Images/home-poster3.jpg");
        $("#img2").attr("src", "/Images/home-poster3.jpg");
        $("#img3").attr("src", "/Images/home-poster3.jpg");
    }

	else if (pageCrumb.indexOf("Tourism & Group Travel") > -1) {
        $("#img1").attr("src", "/Images/home-arts.jpg");
        $("#img2").attr("src", "/Images/home-arts.jpg");
        $("#img3").attr("src", "/Images/home-arts.jpg");
    }

	else if (pageCrumb.indexOf("Marketing") > -1) {
        $("#img1").attr("src", "/Images/home-kayaks.jpg");
        $("#img2").attr("src", "/Images/home-kayaks.jpg");
        $("#img3").attr("src", "/Images/home-kayaks.jpg");
    }





	else if (pageCrumb.indexOf("Social Responsibility") > -1) {
	    $("#img1").attr("src", "/Images/home-vbcc2.jpg");
	    $("#img2").attr("src", "/Images/home-vbcc2.jpg");
	    $("#img3").attr("src", "/Images/home-vbcc2.jpg");
	}






    else if (pageCrumb.indexOf("Convention") > -1) {
        $("#img1").attr("src", "/Images/convention-poster.jpg");
        $("#img2").attr("src", "/Images/convention-poster.jpg");
        $("#img3").attr("src", "/Images/convention-poster.jpg");
    }
    else if (pageCrumb.indexOf("Development Projects") > -1) {
        $("#img1").attr("src", "/Images/development-poster.jpg");
        $("#img2").attr("src", "/Images/development-poster.jpg");
        $("#img3").attr("src", "/Images/development-poster.jpg");
    }


	else if (pageCrumb.indexOf("Virginia Beach Events") > -1) {
        $("#img1").attr("src", "/Images/home-eco.jpg");
        $("#img2").attr("src", "/Images/home-eco.jpg");
        $("#img3").attr("src", "/Images/home-eco.jpg");
    }

    else if (pageCrumb.indexOf("Upcoming Events") > -1) {
        $("#img1").attr("src", "/Images/home-arts.jpg");
        $("#img2").attr("src", "/Images/home-arts.jpg");
        $("#img3").attr("src", "/Images/home-arts.jpg");
    }

 

	else if (pageCrumb.indexOf("Bring it to the Beach") > -1) {
	    $("#img1").attr("src", "/Images/home-vbcc1.jpg");
	    $("#img2").attr("src", "/Images/home-vbcc1.jpg");
	    $("#img3").attr("src", "/Images/home-vbcc1.jpg");
	}


    else if (pageCrumb.indexOf("Volunteer & Local Opportunities") > -1) {
        $("#img1").attr("src", "/Images/home-eco.jpg");
        $("#img2").attr("src", "/Images/home-eco.jpg");
        $("#img3").attr("src", "/Images/home-eco.jpg");
    }
    else if (pageCrumb.indexOf("News & Media") > -1) {
        $("#img1").attr("src", "/Images/home-kayaks.jpg");
        $("#img2").css("display", "none");
        $("#img3").css("display", "none");
    }
    else if (pageCrumb.indexOf("Research & Reports") > -1) {
        $("#img1").attr("src", "/Images/home-boardroom.jpg");
        $("#img2").attr("src", "/Images/home-boardroom.jpg");
        $("#img3").attr("src", "/Images/home-boardroom.jpg");
    }
    else if (pageCrumb.indexOf("Contact") > -1) {
        $("#img1").attr("src", "/Images/home-poster1.jpg");
        $("#img2").attr("src", "/Images/home-poster1.jpg");
        $("#img3").attr("src", "/Images/home-poster1.jpg");

    } else {

        $("#img1").attr("src", "/Images/home-poster1.jpg");
        $("#img2").attr("src", "/Images/home-poster2.jpg");
        $("#img3").attr("src", "/Images/home-poster3.jpg");

        $('#posterImage').cycle({
            fx: 'fade' // choose your transition type, ex: fade, scrollUp, shuffle, etc...
        });

    }
    $("#img1").css("display", "block");
    $("#img2").css("display", "block");
    $("#img3").css("display", "block");




});


