﻿/* behaviours for Ron Pucherelli
   (c) Ron Pucherelli 2011

   by :Dan Wellman
*/
Cufon.replace('.league-gothic', { fontFamily: 'LeagueGothic', textShadow: '0 0 4px #000' });
Cufon.replace('.year, h1.title, h2.title, #reply-title, #comments, .featured-title', { fontFamily: 'LeagueGothic' });
Cufon.replace('ul#top-menu a, #breadcrumbs a', { fontFamily: 'DroidSans', fontWeight: 400, hover: true });
Cufon.replace('#breadcrumbs, p#copyright', { fontFamily: 'DroidSans' });

(function ($) {
    var strength = ".5",
        duration = "1000";
        
    $("#fadeLeft, #fadeRight").height($(document).height());

    $("td div").live("mouseover", function (e) {
        
        var el = $(this);

        el.find(".fade").stop(true).fadeTo(duration, strength);
        el.find(".button").stop(true).fadeTo(duration, 1);
        el.find(".title").stop(true).fadeTo(duration, 1);

    }).live("mouseout", function (e) {
        if (!$(e.relatedTarget).closest(".fade-container").length) {
            
            var el = $(this);

            el.find(".fade").stop(true, true).fadeTo(duration, 0);
            el.find(".button").stop(true, true).fadeTo(duration, 0);
            el.find(".title").stop(true, true).fadeTo(duration, 0);
        }
    });

    window.onresize = function() {
         jQuery("#fadeLeft, #fadeRight").height(jQuery(document).height());
    }

} (jQuery));
