//use to add any custom javascripts to this site

//function: set height of left nav using jquery
function setHeight() {
    if (document.getElementById("content")) {
        
        var height = $("#content").height();
        
	var sideBarHeight = 1500;    
	    
        if (height < sideBarHeight) {
            
            //height = height + 40; //add some to the height
            $("#sidebar").css("height", sideBarHeight + "px");
            //$("#innerleftbtm").css("height", height + "px");
            //var contentheight = height - 191; //subtract height of the banner
            //$("#contentbucket").css("height", contentheight + "px");
        }
	else{
		$("#sidebar").css("height", height + "px");
	}
    }
}


// function: add png class for PNG images
function addPNGfix() {
    //alert("images # " + document.images.length);
    for (i = 0; i < document.images.length; i++) {
        //get image extension
        imgSrc = document.images[i].src
        //alert(imgSrc)
        arrParts = imgSrc.split(".")
        ext = arrParts[arrParts.length - 1].toLowerCase()
        
        //if image is a PNG
        if (ext == "png") {
            //alert(ext);
            //if button is a png
            $(document.images[i]).addClass("png");
        }
    }
}

function init() {
  
    setHeight(); //set height of leftnav
    addPNGfix(); //add PNG fix
}
window.onload = init;
/////////////////////////////////////////////////////////////
// END
/////////////////////////////////////////////////////////////
