

/** Following function initializes when a page is loaded. It enables quick links,
 * search box hint, image rotator, makes data grid strips, hightlightable on hover, date picker workable, etc. 
 * @requirement:  jQuery is required in the <head>. 
 * @author: Henry Jin
 * @version: 2010-01-15
 */

/*********************************************************************************
 * Main entry. It runs when page loaded. Javascript framework jQuery is required.
 */
$(document).ready(function()
{
	jQueryInputHints();
	jQueryTooltips();
});





/*********************************************************************************
 * To enable Quick Links in header. It hides <select/> and displays a hoverable link
 * which pops up a <div> containing all links. Inspired by amazon.com's Wishlist.
 * @author jinh
 * @version 2010-01-15
 */
function jQueryInputHints()
{
	// find all the input elements with title attributes
	$('input[type="text"][title!=""]').hint();
	$('textarea[title!=""]').hint();
}


/*********************************************************************************
 * To enable Tooltip for <a class="tooltip" title=""></a>
 * @author jinh
 * @version 2010-02-24
 */
function jQueryTooltips()
{
	$('a.tooltip').tooltip({
		showURL: false,
		track: true
	});
}

/* End */