$(document).ready(function() {
    /* 
    * attach a function to open all links with a class of "external" in a new window 
    * this avoids the use of target="_blank" and allows us to validate as XHTML strict
    */
    $("a[rel^='external']").click( function() {
        window.open(this.href);
        return false;
    });
    
    $('#slideshow').cycle({ 
        speed:  2000,
        timeout:  7000
    });
    
    $("a[rel^='prettyPhoto']").prettyPhoto();
    
    $('#contact_us_form').validate();
    $('#join_us_form').validate();
    
/*    var year = "";

    render_calendar(month,year);

    function render_calendar(month,year) {
        var minicalurl = "http://chippewafallsrotary.org/calendar/mini" + year + "/" + month ;
        $.post(
            minicalurl,
            { month : month, year : year },
            function(str) {
                $('#miniCal').html(str).fadeIn('fast');
            }
        );
    }

    $("a.prevNext").live('click',function(){
        $('#miniCal').fadeOut('fast');
        newDateArray = $(this).attr('id').split('-');
        month = newDateArray[0];
        year = newDateArray[1];
        render_calendar(month,year);
    });
    */
    
    $('#showAllEmail').click(function(){
        $('#allEmail').toggle('slow');
    });

    
});

