 $(document).ready(function() {
   var navBarCode = getNavBar();
   $("#navBarPlaceHolder").append(navBarCode);
 });


  $(document).ready(function() {
        $("ul.subnav").parent().append("<span></span>"); //Only shows drop down trigger when js is enabled - Adds empty span tag after ul.subnav
        $("ul.topnav li a").mouseover(function() { //When trigger is clicked...
            //Following events are applied to the subnav itself (moving subnav up and down)
            $(this).parent().find("ul.subnav").slideDown('fast').show(); //Drop down the subnav on click
            $(this).parent().hover(function() {
            }, function() {
                $(this).parent().find("ul.subnav").slideUp('medium'); //When the mouse hovers out of the subnav, move it back up
            });
            //Following events are applied to the trigger (Hover events for the trigger)
        }).hover(function() {
            $(this).addClass("subhover"); //On hover over, add class "subhover"
        }, function() {	//On Hover Out
            $(this).removeClass("subhover"); //On hover out, remove class "subhover"
        });

    });

function getNavBar(){

	var navBar = '<ul class="topnav">' +
                '<li><a href="index.html">Home</a></li>' +
                '<li><a href="specials.html">Special Offers</a></li>' +
                '<li><a href="#">Gallery</a>' +
                '    <ul class="subnav">' +
                '        <li><a href="gallery.html">Photo Gallery</a></li>' +
                '        <li><a href="galleryVideo.html">Video Gallery</a></li>' +
                '    </ul>' +
                '</li>' +
                '<li><a href="services.html">Services</a></li>' +
                '<li><a href="news.html" >News &amp; Events</a></li>' +
                '<li><a href="partners.html" >Our Partners</a></li>' +
                '<li><a href="directions.html">Directions</a></li>' +
                '<li><a href="contact_us.html">Contact Us</a></li>' +
            '</ul>';
		
	return navBar
}