jQuery(window).ycodacss('css/slider.css');
        jQuery(window).bind("load", function() {
            jQuery("div.theSlider")
            .eq(0).ycodaslider().end()
            .eq(1).ycodaslider({easeFunc: "easeInOutExpo",easeTime: 750});
        });
		
		
function goRight()
{
	jQuery("div.theSlider").ycodaslider("right");
}

function goLeft()
{
	jQuery("div.theSlider").ycodaslider("left");
}

function goTo(num)
{
	var leftArrowDiv = document.getElementById('left-arrow');
	var rightArrowDiv = document.getElementById('right-arrow');
	
	// hide the tips
	//hideToolTips();
	
	// then destroy the old ones
	//destroyTTips();
	
	jQuery("div.theSlider").ycodaslider("go", num);
	
	if(num == 0)
	{	
		// remove the left hand arrow
		leftArrowDiv.innerHTML = '';
		
		// change the right arrow to the start page
		rightArrowDiv.innerHTML = getContent(1,'Start Over', 'right');

		// remake the tooltip
		//var rightTT = new Tooltip('right-arrow', 'home-tip');
	}
	else if(num == 1)
	{		
		// restore the left arrow
		leftArrowDiv.innerHTML = getContent(0,'About Luke', 'left');
		
		// change the right arrow to the contact page
		rightArrowDiv.innerHTML = getContent(2,'Contact Luke', 'right');
		
		// remake the tooltip
		//var rightTT = new Tooltip('right-arrow', 'nav-right');
		
		// remake the tooltip
		//var leftTT = new Tooltip('left-arrow', 'nav-left');
	}
	else if(num == 2)
	{		
		// restore the left arrow
		leftArrowDiv.innerHTML = getContent(1,'Start Over', 'left');
		
		// change the right arrow to the contact page
		rightArrowDiv.innerHTML = '';
		
		// remake the tooltip
		//var leftTT = new Tooltip('left-arrow', 'home-tip');
	}
}

function getContent(num, alt, name)
{
	return '<a href="javascript:goTo('+num+');"><img id="next-page" src="images/'+name+'-arrow.png" alt="'+alt+'" border="0" /></a>';	
}

function hideToolTips()
{
	parent.leftTT.hideTooltip();
	
	parent.rightTT.hideTooltip();
}

function destroyTTips()
{
	// destroy the old tooltip
	parent.rightTT.destroy();
	
	// destroy the old tooltip
	parent.leftTT.destroy();
}
