$j(function() {

    // toggle between search input and drop downs
    $j("#chooseList1").click(function() {
        toggleDropDowns();
        return false;
    });
    // had to duplicate as can't use class because of datepicker js error
    $j("#chooseList2").click(function() {
        toggleDropDowns();
        return false;
    });

    function toggleDropDowns() {
        $j("#ftLocations").toggle();
        $j("#ftSearchString").toggle();
        $j("#pick1").toggle();
        $j("#pick2").toggle();

        // set this function here, as it doesn't work in IE 7/8 if it's done on dom ready
        $j("#ftLocations select").change(function() {
            showSteps();
        });
    }

    // when user clicks off destination input, show steps 2 and 3
    $j("input#ftSearchString").focus(function() {
        showSteps();
    });

    function showSteps() {
        $j("#ftDateRow").show("normal", function() {
            $j("#ftGuestsAndStar").show("normal");
        });
    }

});