$(function() {

    var $titles = $(".title"),
        $excerpts = $(".ex"),
        $blocks = $(".article-block");
        
    $titles.each(function() {
        $el = $(this);
        $el.data("origHeight", $el.height());
    });
    
    $excerpts.each(function() {
        $el = $(this);
        $el.data("origHeight", $el.height()).height(0);
    });
        
    $blocks.hover(function(e) {
        var $el    = $(this),
            $title = $el.find(".title"),
            $ex    = $el.find(".ex");
        
        $title.hoverFlow(e.type, { bottom: "99%", opacity: 1, height: $title.data("origHeight") })
        $ex.hoverFlow(e.type, { top: "95.5%", opacity: 1, height: $ex.data("origHeight") });
        
    }, function(e) {
        $(this)
            .find(".title").hoverFlow(e.type, { bottom: "50%", opacity: 0, height: 0 })
            .end()
            .find(".ex").hoverFlow(e.type, { top: "50%", opacity: 0, height: 0 });
    });
    
    $("body").mousewheel(function(event, delta) {
    
        this.scrollLeft -= (delta * 30);
        
        event.preventDefault();
    
    });
    
});
