//Needs Mootools - Shows and hides homepage content - Conor L.
window.addEvent('domready', function () {
    var contentPanel = $('ReadMoreContent');
    var panelToggler = $('ReadMoreToggler');
    var shown = false;


    // contentPanel.fade('hide');
    contentPanel.setStyle('visibility', 'visible');
    contentPanel.setStyle('height', '0');



    contentPanel.set('morph', { duration: '1000', transition: 'Sine:out' });
    //Morph transition


    panelToggler.addEvents({
        'click': function (e) {
            e.stop();
            if (shown == true) {
                contentPanel.morph({ height: 0 });
                //contentPanel.morph({ height: 22, opacity: 0 });
                panelToggler.setStyle('background-position', '0 0');
                shown = false;
            }
            else {
                contentPanel.morph({ height: 250 });
                //contentPanel.morph({ height: 295, opacity: 1 });
                panelToggler.setStyle('background-position', '0 -21px');
                shown = true;
            }
        }
    });
});

