$(function(){
   $('.foldmask').each(function(){
        var self = this;
        $(this).nextAll('.slideToggle').eq(0).toggle(function(){
            $(self).animate({'height':$(self).data('fullHeight')});
            $(this).children('img').attr('src','image/design/slideUp.png');
    },function(){
            $(self).animate({'height':$(self).data('orgHeight')});
            $(this).children('img').attr('src','image/design/slideDown.png');
        }).css('cursor','pointer').each(function(){
         
         if(typeof $(self).data('orgHeight') == 'undefined')
         {
             $(self).data('orgHeight',$(self).height());
         }
         if(typeof $(self).data('fullHeight') == 'undefined')
         {
             $(self).css('height','');
             $(self).data('fullHeight',$(self).height());
             $(self).css('height',$(self).data('orgHeight'));
         }
         
         
         
         if($(self).data('fullHeight') < $(self).data('orgHeight'))
         {
            $(self).css('height',$(self).data('fullHeight'));
            $(this).remove();
         }
         
         });
    });
   
    $('.printThing').eq(0).css('top','0px');
});
