$(document).ready(function() {
	$(".pug_nav").hover(function(){
		$(this)
			.find('a')
			.animate({
				left	:	'0px',
				bottom	:	'0px'
			});
	}, function(){
		$(this)
			.find('a')
			.animate({
				left	:	'50px',
				bottom	:	'12px'
			});
	});
	
	$('#menu_fullsite > a').click(function(){
		$('link[href="iphone.css"]').remove();
		$('#slider').nivoSlider({
	    	effect:'fade',
	    	directionNavHide:false,
	    	controlNav:false,
	    	prevText: '',
	    	nextText: ''
	    });
	});
	
/*

	var $headcopied = false;	
	$(window).scroll(function(){

		var $tableHead = $('.stats_table thead');
		var $offSetTop = $tableHead.offset().top - $(window).scrollTop();
		
		var $cloneHead = $tableHead.clone();
		
		
		if($offSetTop <= 0){
			$cloneHead.css({'position': 'absolute', 'top' : 0, 'width' : '986px', 'display':'block'});
		};
	});

*/

	
	
	
	
});
$(window).load(function() {
    $('#slider').nivoSlider({
    	effect:'fade',
    	directionNavHide:false,
    	controlNav:false,
    	prevText: '',
    	nextText: ''
    });
});



if((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i))) {
    /*
if (document.cookie.indexOf("iphone_redirect=false") == -1) {
        window.location = "http://m.espn.go.com/wireless/?iphone&i=COMR";
    }
*/
	window.addEventListener('load', function() {
	    setTimeout(scrollTo, 0, 0, 1);
	    /*
document.getElementById('main_nav').style.top =
	     (window.pageYOffset + window.innerHeight) + 'px';
*/
	}, false);
	$(window).load(function() {
		$('#slider').data('nivoslider').stop(); //Stop the Slider
		
	});
	/*
window.onscroll = function() {
	  document.getElementById('main_nav').style.top =
	     (window.pageYOffset + window.innerHeight - 113) + 'px';
	};
*/
}
