// JavaScript Document

function toggle_post_comment( ahref )
{
	ahref.blur();
	jQuery('.post_comment_container').slideToggle(600, function()
	{
		scrollToPos = jQuery(this).offset().top;
		jQuery('html').animate({ scrollTop: scrollToPos }, 600);
	}); 
}
var xmlLoader = {
	options : {},
	load : function( options )
	{
		jQuery.extend( xmlLoader.options, options );
		
		xmlDoc = xmlLoader.loadDocument( xmlLoader.options.xml );
		
		if ( typeof( xmlLoader.options.xsl ) !== "undefined" )
		{
			xslDoc = xmlLoader.loadDocument( xmlLoader.options.xsl );	
		}
		
		if (window.ActiveXObject)
		{
			if ( typeof( xmlLoader.options.xsl ) !== "undefined" )
			{
				xmlDoc.transformNode()
			}
			else
			{
				xmlDoc.transformNode( xslDoc )
			}
		}
		else
		{
			xsltProcessor = new XSLTProcessor();
			if ( typeof( xmlLoader.options.xsl ) !== "undefined" )
			{
				xsltProcessor.importStylesheet( xslDoc );
			}
			XMLfile = xsltProcessor.transformToFragment( xmlDoc, document); 
		}
		
		$(xmlLoader.options.parent).append( XMLfile ).children(":last-child").hide().slideDown(1000, function(){
			$(this).prev().find("img").fadeOut(500);
		});
		
	},
	loadDocument : function( filename )
	{
		if (window.ActiveXObject)
		{
			xmlDocument = new ActiveXObject("Microsoft.XMLDOM");
		}
		else if (document.implementation && document.implementation.createDocument)
		{
			xmlDocument = document.implementation.createDocument("", "", null);
		}
		else
		{
			alert("Your browser does not support loading xml files\nWe advise you upgrade to Firefox - http://www.getfirefox.com");
		}
		xmlDocument.async = false;
		xmlDocument.load( filename );
		return xmlDocument; 	
	}
}