jQuery( document ).ready(function()
{
    var template = jQuery('.ads .overlayTemplate');
    if (template.size() != 1)
    {
        return;
    }

    jQuery('.bannerAds .banner').each(function()
    {
        this.overlay = template.clone(true).removeClass('overlayTemplate').addClass('overlay').appendTo( jQuery(this) )[0];

        jQuery(this).hover(

            function()
            {
                jQuery( this.overlay ).hide();
            },

            function()
            {
                if (navigator.appVersion.indexOf("Mac") == -1) // not mac
                {
                    var height = jQuery( this.overlay.parentNode ).height();
                    jQuery( this.overlay ).height( height ).show();
                }
            }
        );

    });

    template.remove();

});