function domUpdated() {
	// If IE7.js is loaded then call this after DOM updates
	try {
		if (document.recalc) { document.recalc(); }
	}
	catch(err) {}
}

function collectionPagination() {

	$("#sectionCollections #collectionPagination a").click( function() {
		
		try {
			pageTracker._trackPageview( this.getAttribute("href") ); 
		}
		catch(err) {}

		$.ajax({
			url: this.href,
			cache: true,
			dataType: "html",
			success: function(html){
			$("#content").html( html );
		}, 
		complete: function() {
			collectionPagination();
		}
		});

		return false;

	});

	domUpdated();

}

$(document).ready(function() {

	collectionPagination();

	$("#sectionCollections #content").attr("aria-live","polite");

	if($("#diamondGuide")) {
		var readMore = $("#readMore");
		var diamondGuide = $("#diamondGuide");

		diamondGuide.addClass("accessibility");
		readMore.show();

		readMore.find("a").click(function() {

			try {
				pageTracker._trackEvent('Diamonds', 'Guide', 'Expand'); 
			}
			catch(err) { }

			$(this).parent("p").hide();
			diamondGuide.removeClass("accessibility").hide().fadeIn("slow");

			return false;
		});
	}	



});