// -- homepage expanders
/*
(function(boxes){
	boxes.each(function(){
		var caption = $(this).find(".caption"),
		capHeight = caption.outerHeight(),
		origTop = caption.css("top"),
		slideHeight = (capHeight >= origTop) ? origTop : 190 - capHeight;
		$(this).hover(function(){
			caption.stop().animate({"top":slideHeight},300);
		},function(){
			caption.stop().animate({"top":origTop},800);
		});
	});	
})($(".homeBox"));
*/
// -- tabbed section

//(function(links){
//	var curTab = 1;
//	links.each(function(i){
//		this.onclick = function(){
//			links[curTab].removeAttribute(classAttr);
//			links[i].setAttribute(classAttr,"on");
//			document.getElementById("tab" + (curTab+1)).style.display = "none";
//			document.getElementById("tab" + (i+1)).style.display = "block";
//			curTab = i;
//		};
//	});
//	links[0].onclick();	
//})($("#tabLinks").find("a"));

// -- homepage banner

(function() {
    var banner = $("#homeBanner");
    banner.ajaxStart(function(){
        this.innerHTML = "<h1 id='loader'>Loading...</h1>"
    });
    var x = $.ajax({
        type: 'GET',
        url: '/XML/TestXML.xml',
        dataType: 'xml',
        success: function(data) {
            banner[0].innerHTML = "";
            var jsData = jsObjFromXML(data.documentElement),
            topBanner = new Banner(banner,jsData);
        },
        error: function(e){window.ajaxResponseError = e;}
    });
})();

