﻿/*******************************************************************************
=INIT ( Used to be ONDOMREADY in caps.js - splitting this out so other projects can use caps.js and supply their own unique ondomready events
*******************************************************************************/
Fool.onContent(function() {
	// register the Ajax handlers
	Ajax.Responders.register(Caps.Ajax.Global);
	//Attach hover events
	Caps.Hover.attach("mid");
	//Inject rounded corners markup
	Caps.Visual.Corners();
	// Prepare Player
	Caps.Player.prepare();
	//Prepare Utils
	Caps.Util.prepare();
	// Recs
	Caps.Recs.prepare();
	// Add to watchlist
	Caps.Watchlist.prepare();
	// Wall Street Sort
	Caps.Scorecard.WallStreet.prepare('active');
	// Equal heigth columns
	Caps.Visual.EqualHeight();

	/* Page specific stuff */
	if (document.location.href.toLowerCase().lastIndexOf('index.aspx') > -1) {
		Caps.Ajax.Global.showFeedback = false;
	}
	if (Prototype.Browser.IE &&
       (
	   document.location.href.toLowerCase().indexOf("viewPost.aspx") > -1 ||
	       document.location.href.toLowerCase().indexOf("viewBlog.aspx") > -1
       )) {
		SWFFormFix();
	}

});
