$.preloadImages = function(){
	var a = arguments[0];
	$(document.createElement('img')).bind('load', function(){
		if(a[0]) this.src = a.shift();
	}).trigger('load');
}
$(document).ready(function() {
    if(typeof sIFR == "function"){
      $("#contentArea h2:not('.nof'),h1:not('.nof'),h3:not('.nof')").each(function(){ $(this).addClass("forSIFR")});
	    sIFR.replaceElement(named({sSelector:"body h1.forSIFR",sCase: "upper",nPaddingTop: "5", nPaddingBottom:"5",nPaddingLeft:"10",nPaddingRight:"10", sWmode: "transparent",sBgColor: "#002d67",sColor: "#FFFFFF",sFlashSrc:"/arialBlack.swf"}));
	    sIFR.replaceElement(named({sSelector:"body #contentArea h2.forSIFR",sCase: "upper",nPaddingTop: "2", nPaddingBottom:"2", sWmode: "transparent",sBgColor: "#002d67", sColor: "#000000", sFlashSrc:"/arialBlack.swf"}));
	    sIFR.replaceElement(named({sSelector:"body #contentArea h3.forSIFR",sCase: "upper",nPaddingTop: "2", nPaddingBottom:"2",nPaddingLeft:"4",nPaddingRight:"4", sWmode: "transparent",sBgColor: "#002d67", sColor: "#FFFFFF", sFlashSrc:"/arialBlack.swf"}));
    };

    $("a").filter(".el").each(function(){
        if(!$(this).attr("title")) {
            $(this).attr("title",'link opens in a new window');
        } else if($(this).attr("title").indexOf('link opens in a new window')== -1) {
            $(this).attr("title",$(this).attr("title")+' - link opens in a new window');
        }
    }).click(function(){
        window.open($(this).attr("href"));
        return false;
    }).end()    

    // content footer
    cf = $("#contentFooter").html();
    cf += '<span> | </span><a id="cf2" href="javascript:window.print()" title="Print this page">Print Page</a>';
    if($.browser.msie)  cf +=  '<span> | </span><a id="cf1" href="javascript:window.external.AddFavorite(document.location.href , document.title)" title="Add to Favourites">Add to Favourites</a>';
    $("#contentFooter").html(cf);
    $("#cf3").click(function() {emailPop($(this).attr("href"));return false; });
    $("#sl_enews").click(function() {enewsPop($(this).attr("href"));return false; });
    $(".enews").click(function() {enewsPop($(this).attr("href"));return false; });
});