/**
 * @class: Util
 * @description: Defines Util functions
 * @author: len.nguyenvan
 * @version: 1.0
 **/
 
var Util = new Class({	
	initialize: function(){
		// this.initBlockNewsHome();
	},		
	initBlockNewsHome: function(){
		var homeBlockNews = $('homeBlockNews');
        if(!homeBlockNews) return;
        
        var blocks = homeBlockNews.getElements('ul li a');
        blocks.each(function(blk, index){
            blk.fxObj = new Fx.Morph(blk);
            blk.getFirst().fxObj = new Fx.Morph(blk.getFirst());
            blk.getLast().fxObj = new Fx.Morph(blk.getLast());
            blk.removeEvents().addEvents({
                'mouseover': function(){
                    blk.fxObj.start({
                        'margin-top': [5,0]
                    });
                    blk.getFirst().fxObj.start({
                        'margin-left': [0,8]
                    });
                    blk.getLast().fxObj.start({
                       'background-position': [[0,0],[0,-160]]
                    });
                },
                'mouseout': function(){
                    blk.fxObj.start({
                        'margin-top': [0,5]
                    });
                    blk.getFirst().fxObj.start({
                        'margin-left': [8,0]
                    });
                    blk.getLast().fxObj.start({
                       'background-position': [[0,-160],[0,0]]
                    });
                }
            });
        });        
	}
});
