var sliderControls = new SliderControls();

$(document).ready(function(){
    sliderControls.init();
});


function SliderControls ()
{
}
 
SliderControls.prototype.init = function ()
{
    slider = jQuery('.slider');

    sliderList = jQuery('.slider');
    jQuery.each(sliderList, function() {
        slider = jQuery(this);
        slider.children().not(':first').wrapAll('<div class="hidden_content" />');
        slider.find('.hidden_content').hide();
        slider.append('<a class="show_link">Read More</a>');
        slider.append('<div class="clearer">&nbsp;</div>');
        slider.find('.show_link').css('cursor', 'pointer');
        slider.find(':first').addClass('no_bottom_margin');
        slider.find('.show_link').bind('click', function() {
           jQuery(this).prev().slideToggle('slow', function () {
               if (jQuery(this).css('display') == 'none'){
                  jQuery(this).next().html('Read More');
               } else {
                  jQuery(this).next().html('Hide');
               }
           });
        });
    });
    
}

