$(document).ready(function(){
    $('ul#accordion').accordion({ 
        autoheight: true,
        header: ".opener",
        active: '.selected',
        selectedClass: 'active',
        alwaysOpen: true,
        event: "mouseover"
    });
    
    $('div.row').each(function(i,_el){
        var maxHeight = 0;
        $(_el).find('div').each(function(i,_el){
            if ($(this).height() > maxHeight) maxHeight = $(this).height();
        });
        if ($.browser.msie && $.browser.version == '6.0')
            $(_el).find('div').css('height',maxHeight);
        else
            $(_el).find('div').css('minHeight',maxHeight);
    });
    $('div.row div').each(function(i, _el) {
        _el._timer = false;
        
        $(_el).hover(function(){
            if (_el._timer) clearTimeout(_el._timer);
            $(this).addClass('hover');
        }, function(){
            var _this = $(this);
             _el._timer = setTimeout(function(){_this.removeClass('hover')},120);
        })
    })
});

$(document).ready(function(){
function externalLinks() {
	if (!document.getElementsByTagName) return;
	var anchors = document.getElementsByTagName("a");
	for (var i=0; i<anchors.length; i++) {
		var anchor = anchors[i];
		if (anchor.getAttribute("href") &&
		anchor.getAttribute("rel") == "external")
		anchor.target = "_blank";
	}
}
window.onload = externalLinks;

});


$(document).ready(function(){
	$('#site-map li:even').addClass('sitemap-even');
	$('#site-map li.heading').removeClass('sitemap-even')
});

/*$(document).ready(function() {
  var initHeight = $('#disclaimer').height();
  $('#disclaimer').click(function() {
    $(this).animate({height: $('> div', this).height()}, 500);
  }, function() {
    $(this).animate({height: initHeight}, 500);
  });

});*/

$(document).ready(function() {
	animatedcollapse.addDiv('disclaimer', 'fade=1,hide=1')
	/*add more divs here if i need diff heights: adjust this ^ for each div if needed*/
	animatedcollapse.init()
});
