function setSelect() {

    var images = new Array()
    function preload() {
        for (i = 0; i < preload.arguments.length; i++) {
            images[i] = new Image();
            images[i].src = preload.arguments[i];
            //document.write(images[i].src);
        }
    }
    preload(
            "/etc/designs/hyattrestaurants/tusca/images/bg-map.jpg",
            "/content/dam/hpr/tusca/slider1.jpg",
            "/content/dam/hpr/tusca/slider2.jpg",
            "/content/dam/hpr/tusca/slider3.jpg"
        
    )
    
        var myDate = new Date();
        var month = myDate.getMonth() + 1;
        var currentDay = myDate.getDate();
        if ((currentDay == 1) || (currentDay == 2) || (currentDay == 3) || (currentDay == 4) || (currentDay == 5) ||
                (currentDay == 6) || (currentDay == 7) || (currentDay == 8) || (currentDay == 9)) {
            currentDay = "0" + currentDay;
         }
        if ((month != 10) || (month != 11) || (month != 12)) {
        month = "0" + month;
        }
        var prettyDate = month + '/' + currentDay + '/' + myDate.getFullYear();
        var testStartDate = document.getElementById("startDate");
        //alert(prettyDate);
        
        if (testStartDate != null) {
        $("#startDate").val(prettyDate);
        }
        
        
    //document.getElementById("select").options[1].selected = true;
    
    myUrl = location.href; 
    var url_check = myUrl.indexOf("monterey"); 
    var url_check1 = myUrl.indexOf("orange_county");
    var url_check2 = myUrl.indexOf("santa_clara");
    var testRid = document.getElementById("RestaurantID");
    if ( url_check != -1 ) { 
        document.getElementById("select").options[1].selected = true;
        if (testRid != null) {
            $("#RestaurantID").val("11200");
            }
        //document.getElementById("RestaurantID").value= "11200";
    } else if ( url_check1 != -1 ) {
        document.getElementById("select").options[2].selected = true;
         if (testRid != null) {
                $("#RestaurantID").val("42475");
                }
        //document.getElementById("RestaurantID").value= "42475";
    } else if ( url_check2 != -1 ) {
        document.getElementById("select").options[3].selected = true;
         if (testRid != null) {
                $("#RestaurantID").val("40567");
                }
        //document.getElementById("RestaurantID").value= "40567";
    }
    else
    {
        document.getElementById("select").options[0].selected = true;
           if (testRid != null) {
                $("#RestaurantID").val("11200");
                }
    }   
}


function navigate() {
    
    //document.getElementById("sel").value = 3
var menuIndex = document.getElementById("select").selectedIndex; 
document.getElementById("select").selectedIndex = 1;

if (menuIndex != 0)
{
location = document.getElementById("select").options[menuIndex].value;

}
}

$(document).ready(function() {
     
    //ACCORDION BUTTON ACTION (ON CLICK DO THE FOLLOWING)
    $('.accordionButton').click(function() {

        //REMOVE THE ON CLASS FROM ALL BUTTONS
        $('.accordionButton').removeClass('on');
          
        //NO MATTER WHAT WE CLOSE ALL OPEN SLIDES
        $('.accordionContent').slideUp('normal');
   
        //IF THE NEXT SLIDE WASN'T OPEN THEN OPEN IT
        if($(this).next().is(':hidden') == true) {
            
            //ADD THE ON CLASS TO THE BUTTON
            $(this).addClass('on');
              
            //OPEN THE SLIDE
            $(this).next().slideDown('normal');
            
            $("div.accordionButtonSelected").removeClass().addClass("accordionButton");
            $(this).removeClass().addClass("accordionButtonSelected");

         } 
          
     });
      
    
    /*** REMOVE IF MOUSEOVER IS NOT REQUIRED ***/
    
    //ADDS THE .OVER CLASS FROM THE STYLESHEET ON MOUSEOVER 
    $('.accordionButton').mouseover(function() {
        $(this).addClass('over');
        
    //ON MOUSEOUT REMOVE THE OVER CLASS
    }).mouseout(function() {
        $(this).removeClass('over');                                        
    });
    
    /*** END REMOVE IF MOUSEOVER IS NOT REQUIRED ***/
    
    
    /********************************************************************************************************************
    CLOSES ALL S ON PAGE LOAD
    ********************************************************************************************************************/   
    $('.accordionContent').hide();

});




 
