      window.addEvent('domready', function(){ 
                var totIncrement = 0;
                var increment_cells = 2;
                var cells_per_screen = 5;
                var cells_left = 4;
                var increment = 134*increment_cells;
                active_cells = 0;
                $$('.medium-wrapper').each(function(item, index){active_cells++;});

                var maxRightIncrement = increment/increment_cells*-(active_cells-cells_left);
                var fx = new Fx.Morph('media-wrapper', {duration: 1000, transition: Fx.Transitions.Back.easeInOut, wait:true});

                $$('#content-media-left-arrow').addEvents({ 
                'click' : function(event){ 
                        if(totIncrement<0){
                                              totIncrement += increment;
                                              fx.pause();
                                              fx.start({'margin-left': totIncrement});
                                      }
                              }                                    
            }); 
              
                $$('#content-media-right-arrow').addEvents({ 
                'click' : function(event){ 
                              if(active_cells>cells_per_screen && totIncrement>maxRightIncrement){
                                      totIncrement -= increment;
                                      fx.pause();
                                      fx.start({'margin-left': totIncrement});
                              }
                }                                    
            }); 
              
                $$('#content-media').addEvents({ 
                'mousewheel' : function(event){
                            event.preventDefault();
                            if(event.wheel >= 0){
                              if(totIncrement<0){
                                      totIncrement += increment;
                                      fx.pause();
                                      fx.start({'margin-left': totIncrement});
                              }
                            }
                            if(event.wheel < 0){
                              if(active_cells>cells_per_screen && totIncrement>maxRightIncrement){
                                      totIncrement -= increment;
                                      fx.pause();
                                      fx.start({'margin-left': totIncrement});
                              }
                            }
                }                                  

            })
   });
