$(document).ready(function() {

    // swap out headings for non-web font
    if(typeof sIFR == "function"){

	    sIFR.replaceElement(named({sSelector:"body #contentCol h1",sWmode: "transparent",sColor: "#2f693b",sFlashSrc:"/wp-content/themes/jungle/font.swf"}));
	    sIFR.replaceElement(named({sSelector:"body #contentCol h2",sWmode: "transparent",sColor: "#2f693b",sFlashSrc:"/wp-content/themes/jungle/font.swf"}));

	    // these are just on home page
	    sIFR.replaceElement(named({sSelector:"body #adoptBanner p.youCanHelp",sWmode: "transparent",sColor: "#2f693b",sFlashSrc:"/wp-content/themes/jungle/font.swf"}));
	    sIFR.replaceElement(named({sSelector:"body #adoptBanner p.adoptToday",sWmode: "transparent",sColor: "#832310",sFlashSrc:"/wp-content/themes/jungle/font.swf"}));
    };

    // fake home button
    jQuery('body').addClass('i');
    jQuery('#header strong').click(function(){ window.location='/'});

    // clear search text
    jQuery("#s").focus(function(){  if(jQuery(this).attr("value") == "enter search text") jQuery(this).attr({value:""}) });


    // anchor contact details to bottom
    eh = jQuery("#extraCols").height(); ch = jQuery("#contentCol").height();
    if (ch > eh) jQuery("#randomImages").css({paddingBottom:ch - eh+"px"});


    // display key links
    jQuery("#keyLinks ul li h2").mouseover(function(){
            jQuery(this).siblings("div").slideDown("fast");
        }).mouseout(function(){
            jQuery(this).siblings("div").slideUp("fast");
        });


    // external links
    jQuery("a.el").click(function(){ window.open(jQuery(this).attr("href")); return false;});

});
