/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

function searchTennisClassesByVenue() {
    var venue = document.getElementById('venue_select').value;
    var url = "listAllClasses.htm?venue=" + venue;
    location.href = url;
}

function searchHolidayProgrammeByVenue() {
    var venue = document.getElementById('venue_select').value;
    var url = "listHolidayClasses.htm?venue=" + venue;
    location.href = url;
}

function searchCoachById() {
    var coachId = document.getElementById('coach_select').value;
    var url = "listCoach.htm?id=" + coachId;
    location.href = url;
}

function slideSwitch() {

    var $active = $('#slideshow a.active');

    if ( $active.length == 0 ) $active = $('#slideshow a:last');

    var $next =  $active.next().length ? $active.next() : $('#slideshow a:first');

    $active.addClass('last-active');

    $next.css({
        opacity: 0.0
    })
    .addClass('active')
    .animate({
        opacity: 1.0
    }, 1000, function() {
        $active.removeClass('active last-active');
    });
}

$(function() {
    setInterval( "slideSwitch()", 10000 );
});





