/**
 * fis.initialize.js - Run required Javascript on each page load
 * 
 * This depends on and must be loaded after jQuery.
 */

$(document).ready(function() {

    /// --- EXTERNAL LINKS ---
    /// set all links with attribute rel="external" to open in a new window
    /// done like this because target="_blank" is not valid XHTML
    $('a[rel="external"]').each(function() {    
        $(this).click(function(e) {
            // stop the browser's normal response to a link click
            // otherwise the link would open in both the new and current window
            e.preventDefault();
            e.stopPropagation();

            window.open(this.href, "_blank");
        });
    });
    /// --- END EXTERNAL LINKS
    
    
    
    /// --- APPLY STICKYOOFTER ---
    /// pin the FIS footer to the bottom of the window
    $(".fis-footer_footer").pinFooter();
    $(window).resize(function() { // re-pin on resize
        $(".fis-footer_footer").pinFooter();
    });
    /// --- END STICKYFOOTER ---
    
});

