
var validator;

$(document).ready(function(){

    /* ********************************************************
       APPLY TEXT-SHADOW IN IE
       ********************************************************  */

    $('ul#nav li a').textShadow({
        x:0,
        y:1,
        radius:0,
        color:"#2d3666"
    });

    /* ********************************************************
       SET ANYTHINGSLIDER
       ******************************************************** */

    $('.anythingSlider').anythingSlider({
        easing: "easeInOutExpo",        // Anything other than "linear" or "swing" requires the easing plugin
        autoPlay: true,                 // This turns off the entire FUNCTIONALY, not just if it starts running or not.
        delay: 5000,                    // How long between slide transitions in AutoPlay mode
        animationTime: 1000
    });

    if ($.datepicker && 'undefined' != typeof(highlightAvailableDay))
    {
        $.datepicker.setDefaults($.datepicker.regional['jp']);
        /* Mon: 月
           Tue: 火
           Wed: 水
           Thu: 木
           Fri: 金
           Sat: 土
           Sun: 日

           Month: 月
        */
        var jpDays = ['日', '月', '火', '水', '木', '金', '土'];
        var months = ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'];
        
        $('.datepicker').datepicker({
            beforeShowDay: highlightAvailableDay,
            dayNamesMin: jpDays,
            dayNamesShort: jpDays,
            monthNames: months,
            monthNamesShort: months
        });
      
    }

    validator = $('.validate').validate({
        errorClass: 'incorrect',
        highlight: function( element, errorClass, validClass ) {
            $(element).addClass(errorClass).removeClass(validClass);
            $(element).parent('div').parent('div').addClass(errorClass).removeClass(validClass);
        },
        unhighlight: function( element, errorClass, validClass ) {
            $(element).removeClass(errorClass).addClass(validClass);
            $(element).parent('div').parent('div').removeClass(errorClass).addClass(validClass);
        }
    });

});



