$(document).ready(function() {

    // Location search
    $("#locationSearch").submit(function(event) {
        var url = $("#locationList").val();
        if (url) {
            window.location = url;
        }
        event.preventDefault();
    });


    // Slider
    var slider = $("#sliderContainer #slider");
    var liCount = $(slider).children().children("li").length;
    // Only show if slider has more that one element
    if (liCount > 1) {
        $(slider).easySlider({
            numeric: true,
            numericId: 'sliderNav',
            continuous: true,
            pause: 15000,
            auto: true
        });
    }

    // Search Services textbox
    $("#searchServices").focus(function() {
        if ($(this).val() == 'Search Services')
            $(this).val('');
    });
});

