/** 
 * @author Arianna Winters <arianna.winters@nfl.com>
 * @copyright 2007 NFL
 * @package nfl.ui.behaviors
 * @version 1.0
 * @requires prototype
 * @requires nfl
 * 
 * @deprecated tabbed_thumbs_w_blurbs.js
 * @deprecated stats.js
 * @deprecated stats_home.js
 * 
 * namespaced methods for onXXX element behaviors
 * does away with confusing doMouseXXXX syntax
 * that was declared in the window scope from 
 * multiple files.
 * 
 **/
nfl.namespace("nfl.ui.behaviors");
nfl.ui.behaviors.mouseOver						= function(e,i,eClassName,iClassName){ if($(e)){ e.className = eClassName; } if($(i)){ i.className = iClassName; }}
nfl.ui.behaviors.mouseOut						= nfl.ui.behaviors.mouseOver;
nfl.ui.behaviors.swapImage						= function(the_image, new_image){ the_image.src = (typeof new_image.src == 'undefined') ? new_image : new_image.src; }

nfl.namespace("nfl.ui.behaviors.thumbs.tabs");
nfl.ui.behaviors.thumbs.tabs.mouseOver			= function(e,i){ nfl.ui.behaviors.mouseOver(e,i,'tabbedThumbRowsOver','videoImgOver'); }
nfl.ui.behaviors.thumbs.tabs.mouseOut			= function(e,i){ nfl.ui.behaviors.mouseOut(e,i,'tabbedThumbRowsOut','videoImgOut'); }
nfl.ui.behaviors.thumbs.tabs.rowClasses			= {on:'selectedPlayer',off:'deselectedPlayer'}

nfl.namespace("nfl.ui.behaviors.thumbs.images");
nfl.ui.behaviors.thumbs.images.badImage			= new Image();
nfl.ui.behaviors.thumbs.images.badImage.src		= nfl.global.imagepath +'/img/sr_pic0.gif';

nfl.namespace("nfl.ui.behaviors.thumbs.tabs.home");
nfl.ui.behaviors.thumbs.tabs.home.mouseOver		= function(e,i){ nfl.ui.behaviors.mouseOver(e,i,'tabbedThumbRowsOver','videoImgOver'); }
nfl.ui.behaviors.thumbs.tabs.home.mouseOut		= function(e,i){ nfl.ui.behaviors.mouseOut(e,i,'tabbedThumbRowsOut','videoImgOut'); }

nfl.namespace("nfl.ui.behaviors.thumbs.tabs.player");
nfl.ui.behaviors.thumbs.tabs.player.priorRows	= null;
nfl.ui.behaviors.thumbs.tabs.player.priorRow	= null;
nfl.ui.behaviors.thumbs.tabs.player.defaultRow	= {selection:'r1c1_1',image:'r1c1_thumb'};
nfl.ui.behaviors.thumbs.tabs.player.rowNumber	= '';
nfl.ui.behaviors.thumbs.tabs.player.mouseOver	= function(currentRow, container, new_image) {
	nfl.ui.behaviors.thumbs.tabs.player.rowNumber = currentRow.id.substring((currentRow.id.indexOf('_')+1), currentRow.id.length);
	for (i=1;$(container + "_" + i) != null;i++){ $(container + "_" + i).className = nfl.ui.behaviors.thumbs.tabs.rowClasses.off;}
	nfl.ui.behaviors.swapImage($(container + '_thumb'), new_image); currentRow.className = nfl.ui.behaviors.thumbs.tabs.rowClasses.on; 
}
nfl.ui.behaviors.thumbs.tabs.player.mouseOut	= function(currentRow, container){ nfl.ui.behaviors.thumbs.tabs.player.priorRow = currentRow; }

nfl.namespace("nfl.ui.behaviors.thumbs.tabs.team");
nfl.ui.behaviors.thumbs.tabs.team.priorRow		= null;
nfl.ui.behaviors.thumbs.tabs.team.mouseOver		= function(currentRow, container, new_image) { for (i=1;$(container + "_" + i) != null;i++){ $(container + "_" + i).className = nfl.ui.behaviors.thumbs.tabs.rowClasses.off; }; nfl.ui.behaviors.swapImage($(container + '_thumb'), new_image); currentRow.className = nfl.ui.behaviors.thumbs.tabs.rowClasses.on; }
nfl.ui.behaviors.thumbs.tabs.team.mouseOut		= function(currentRow, container){ nfl.ui.behaviors.thumbs.tabs.team.priorRow = currentRow; }