$(document).ready(function(){
    
    //vertical ticker
    $('.news_ticker_v').easyTicker({
        direction: 'up',
        easing: 'swing',
        speed: 'slow',
        interval: 4000,
        height: 'auto',
        visible: 4,
        mousePause: true,
        /*controls: {
            up: '',
            down: '',
            toggle: '',
            playText: 'Play',
            stopText: 'Stop'
        },
        callbacks: {
            before: false,
            after: false
        }*/
    });


    // marquee
    $('.marquee-news-ticker').AcmeTicker({
        type:'marquee',/*horizontal/horizontal/Marquee/type*/
        direction: 'left',/*up/down/left/right*/
        speed: 0.05,/*true/false/number*/ /*For vertical/horizontal 600*//*For marquee 0.05*//*For typewriter 50*/
        controls: {
            toggle: $('.acme-news-ticker-pause'),/*Can be used for horizontal/horizontal/typewriter*//*not work for marquee*/
        }
    });


    //banner rotator
    if ($(".banner_rotator").exists()) {
        $('.banner_rotator').each(function(){
            var $this = $(this);
            $($this).slick({
                //Default Options
                fade: false,
                dots: false,
                arrows: false,
                autoplay: true,
                autoplaySpeed: 5000,
                centerPadding: 0,
                pauseOnHover: true,
                lazyLoad: 'ondemand',
                infinite: true,
                rtl: false,
                edgeFriction: 0.35,
                easing: 'cubic-bezier(0.645, 0.045, 0.355, 1)',
                //easing: 'linear',
                touchThreshold: 150,
                speed: 600,
                waitForAnimate: true,
                slidesToShow: 1,
                initialSlide: 1,
                draggable: false,
                adaptiveHeight: true,
                variableWidth: false,
                centerMode: false,
                slidesToScroll: 1,
                setPosition: 1,
                swipe: true,
                touchMove: true,
                rows: 0,
                responsive: [{
                    breakpoint: 992,
                    settings: { slidesToShow: 1, slidesToScroll: 1 }
                    }, {
                    breakpoint: 600,
                    settings: { slidesToShow: 1, slidesToScroll: 1 }
                    }
                ]
            });
        });
    };


    //  CLOCK OPTIONS
    var intVal, myclock;
    //clock plugin constructor
    $('#myclock').thooClock({
        size:40,
        showNumerals:false,
        dialColor:'#fff',
        dialBackgroundColor:'transparent',
        secondHandColor:'#fff',
        minuteHandColor:'#fff',
        hourHandColor:'#fff',
        hourCorrection:'+0',
        onEverySecond:function(){
            //callback that should be fired every second
        },
        //alarmTime:'15:10',
    });


    //banner rotator
    if ($('select[name="monthlyarch"]').exists()) {
        $('select[name="monthlyarch"]').on('change', function() {
            if(this.value!=0)
                window.location.href = this.value;
        });
    };

});






