$(document).ready(function(){

	// XHTML Target _Blank
	$(function(){
		$('a[rel="external"]').click(function(){
			window.open(this.href);
			return false;
		});
	});

	// Currency Selector
	var currencySelection = false;
	$("#currencySelect").hide();
	$("#contribute").hover(
      function(){
      	if (currencySelection === false) {
        	$("#currencySelect").fadeIn(200);
        }
      }, 
      function() {
      	if (currencySelection === false) {
      		$("#currencySelect").fadeOut(200);
      	}
      }
    );
	$("#contribute form").click(function(){ 
		currencySelection = true;
    });

	// Comment View Toggle
	var commentsTotal = $("#comments div").length;
	$("#commentView").show();
	$("#show_latest").hide();
	$("#previous").hide();
	$("#show_all").click(function(){
		$(this).hide();
		$("#show_latest").show();
		$("#previous").slideDown("slow");
		return false;
	});
	$("#show_latest").click(function(){
		$(this).hide();
		$("#show_all").show();
		$("#previous").slideUp();
		return false;
	});

});