$(function() {
    $('.cform .dependent').each(function(){
        var dependsName = $(this).attr('dependson');
        var dependsValue = $(this).attr('dependsvalue');

        var dependsOn = $('[name*="'+ dependsName + '"]');
        var div = $(this).closest('div');

        if(dependsOn.val() != dependsValue){
            div.hide();
        }

        dependsOn.live('change', function(){
            if(dependsValue == $(this).val()){
                div.show();
            } else {
                div.hide();
            }
        });
    });
});

$(function() {
    $( "#FormDateOfVisit" ).datepicker({
        dateFormat: 'yy-mm-dd'
    });
});

 
$(document).ready(function() {
 
    $("#FormCcbLocation").change(function() {
        if($(this).val() == 'Fundraising'){
            $('#Step_2 > .time').slideUp();
            $('#Step_2 > .select').slideUp();
        } else 
        if($(this).val() == 'William Aberhart High School' ||
            $(this).val() == 'St. Francis High School' ||
            $(this).val() == 'Henry Wisewood High School'||
            $(this).val() == 'Bishop O`Byrne High School' || 
            $(this).val() == 'Western Canada High School' || 
            $(this).val() == 'Sir Winston Churchill High School'){
            $('#Step_2 > .time').slideDown();
            $('#Step_2 > .select').slideUp();
        } else {
            $('#Step_2 > .time').slideDown();
            $('#Step_2 > .select').slideDown();
        }
    });
    
    $("fieldset").corner("5px");
    $(":input:not(input[type=hidden])").corner("3px");
});
<!-- 0.7134s -->
