﻿window.addEvents({
    'load': function() {
        /* thumbnails example , div containers */
        var a = new SlideItMoo({
            overallContainer: 'SlideItMoo_outer',
            elementScrolled: 'SlideItMoo_inner',
            thumbsContainer: 'SlideItMoo_items',
            itemsVisible: 7,
            elemsSlide: 1,
            duration: 300,
            itemsSelector: '.SlideItMoo_element',
            itemWidth: 127,
            showControls: 1,
            startIndex: 5,
            onChange: function(index) {
            }
        });
        //console.log($$('.HomepageMiddlezoneRightReferences'));
        $$('.HomepageMiddlezoneRightReferences')[0].setStyle('display', 'block');
    }
});

//    window.addEvents({
//        'load': function() {
//            /* thumbnails example , div containers */
//            new SlideItMoo({
//                overallContainer: 'SlideItMoo_outer',
//                elementScrolled: 'SlideItMoo_inner',
//                thumbsContainer: 'SlideItMoo_items',
//                itemsVisible: 7,
//                elemsSlide: 1,
//                duration: 300,
//                itemsSelector: '.SlideItMoo_element',
//                itemWidth: 127,
//                showControls: 1,
//                startIndex: 5,
//                onChange: function(index) {
//                }
//            });
//        }
//    });

//    window.addEvents({
//        'load': function() {
//            /*  Create SlideItMoo instance  */
//            var sMoo = new SlideItMoo({
//                overallContainer: 'SlideItMoo_info_outer',
//                elementScrolled: 'SlideItMoo_info_inner',
//                thumbsContainer: 'SlideItMoo_info_items',
//                itemsSelector: '.info_item',
//                itemsVisible: 1,
//                itemWidth: 470,
//                showControls: 1,
//                autoSlide: 5000,
//                transition: Fx.Transitions.Back.easeIn,
//                duration: 800,
//                direction: 1,
//                /* the onChange event fires when the current slide changes. We'll use it to display the next/previous article title ( in #announce ) */
//                onChange: function(index) {
//                    /* calculate the previous slide index and the next */
//                    var prev = index - 1 < 0 ? sMoo.elements.length - 1 : index - 1;
//                    var next = index + 1 >= sMoo.elements.length ? 0 : index + 1;
//                    /* titles are stored in h1 inside each .info_item. Grab the text and put it in our prev/next containers */
//                    //$('prev_title').set({ 'html': 'Previous: ' + sMoo.elements[prev].getElement('h1').get('text') }).morph({ 'opacity': [0, 1] });
//                    //$('next_title').set({ 'html': 'Next: ' + sMoo.elements[next].getElement('h1').get('text') }).morph({ 'opacity': [0, 1] });
//                }
//            });
//            /* set morph effect on previous and next article container ( inside #announce ) */
//            $('prev_title').set('morph', { wait: false, duration: 1000 }).addEvent('click', function() {
//                sMoo.bkwd.fireEvent('click');
//            });
//            $('next_title').set('morph', { wait: false, duration: 1000 }).addEvent('click', function() {
//                sMoo.fwd.fireEvent('click');
//            });
//            /* 
//            add functionality to our play/pause button 
//            to start and stop autoSlide we have two methods:
//            1. stopAutoSlide()
//            2. startAutoSlide()
//            */
//            $('pause_play').addEvent('click', function(event) {
//                new Event(event).stop();
//                /* isRunning stores whether our SlideItMoo instance is on autoSlide or not */
//                if (sMoo.isRunning) {
//                    /* if autoSlide is on, we'll need to stop it on click */
//                    this.addClass('paused').set('title', 'Playing. Click to pause.');
//                    sMoo.stopAutoSlide();
//                } else {
//                    /* ... and if is off, we need to start it */
//                    this.removeClass('paused').set('title', 'Paused. Click to start.'); ;
//                    sMoo.startAutoSlide();
//                }
//            })
//        }
//    });
