//PAGE LOAD
$(document).ready(function(){
	//SET TITLE = ALT FOR CROSS PLATFORM STUFF
	$("img").each(function(){
		if  ( ($(this).attr("title") == undefined) || ($(this).attr("title") == "") )  {
			if  ( ($(this).attr("alt") != undefined) && ($(this).attr("alt") != "") )  {
				$(this).attr( {title: $(this).attr("alt") });	
			}
		}
	});	
	//ADD A CLICK EVENT TO SOMETHING USING JQUERY
	//$("tag-id-class-here").click(function(){							
		// alert($(this).attr("rel"));
		//return false;
	//});
	
	//DO SOMETHING TO ALL SOMETHINGS ON A PAGE USING JQUERY
	//$("tag-id-class-here").each(function(){
		//$(this).append("HI");
	//});
	
	// APPLY SOMTHING TO ALL OF SOMETHING, WITHOUT NEEDING TO MANIPULATE LIKE ABOVE
	//$("#container-id-or-class > things-to-targer, actual-target-maybe-with-class").attr("attr-name","value-here");
	//EXAMPLE SET ALL A TAGS TARGET = BLANK
	//$("#container > a, a").attr("target","_blank");
	
	// ALT ROW CLASSES APPLY
	//	$("tbody > tr:even").addClass("evenRow");
	//	$("tbody > tr:odd").addClass("oddRow");
		
	// ADD FIRSTCHILD CLASS TO ALL LI FIRST CHILD ELEMENTS 
	//	$("ul li:first-child").addClass("firstChild");

	// REPLACE ALIGN RIGHT/LEFT WITH CLASSES
	//	jQuery("img[align='left']").addClass("floatLeft").removeAttr('align').removeAttr('hspace').removeAttr('vspace');
	//   jQuery("img[align='right']").addClass("floatRight").removeAttr('align').removeAttr('hspace').removeAttr('vspace');

}); // END PAGE LOAD

//BREAK OUT OF THICKBOX FROM BUTTON CLICK OR OTHER JAVASCRIPT, IF NOT IN GO BACK TO DEFAULT PAGE
function CancelClick() {
	if (document.location == top.location.href) { 
		top.location.href='http://www.google.com'; //PUT PAGE URL HERE
	} else {  
		top.location.href=top.location.href;
	}           
}

// THICKBOX CHANGED CASE, THIS IS A WRAPPER TO KEEP OLD WORKING
function TB_show(caption, url, imageGroup){
	tb_show(caption, url, imageGroup);
}
