/***********************************************
* Disable Text Selection script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/

function disableSelection(target){
if (typeof target.onselectstart!="undefined") //IE route
	target.onselectstart=function(){return false}
else if (typeof target.style.MozUserSelect!="undefined") //Firefox route
	target.style.MozUserSelect="none"
else //All other route (ie: Opera)
	target.onmousedown=function(){return false}
target.style.cursor = "default"
}


	function swapImage(link){
		var fileName = link.getAttribute("href");
		var image = document.getElementById("placeholder");
		image.setAttribute("src",fileName);
	}
	function swapImage2(link){
		var fileName = link.getAttribute("href");
		var image = document.getElementById("placeholder2");
		image.setAttribute("src",fileName);
	}
	function swapImage3(link){
		var fileName = link.getAttribute("href");
		var image = document.getElementById("placeholder3");
		image.setAttribute("src",fileName);
	}
	function swapImage4(link){
		var fileName = link.getAttribute("href");
		var image = document.getElementById("placeholder4");
		image.setAttribute("src",fileName);
	}
	function swapImage5(link){
		var fileName = link.getAttribute("href");
		var image = document.getElementById("placeholder5");
		image.setAttribute("src",fileName);
	}
	function swapImage6(link){
		var fileName = link.getAttribute("href");
		var image = document.getElementById("placeholder6");
		image.setAttribute("src",fileName);
	}
	function swapImage7(link){
		var fileName = link.getAttribute("href");
		var image = document.getElementById("placeholder7");
		image.setAttribute("src",fileName);
	}
	function swapImage8(link){
		var fileName = link.getAttribute("href");
		var image = document.getElementById("placeholder8");
		image.setAttribute("src",fileName);
	}
	function swapImage9(link){
		var fileName = link.getAttribute("href");
		var image = document.getElementById("placeholder9");
		image.setAttribute("src",fileName);
	}
	function swapImage10(link){
		var fileName = link.getAttribute("href");
		var image = document.getElementById("placeholder10");
		image.setAttribute("src",fileName);
	}
	function swapImage13(link){
		var fileName = link.getAttribute("href");
		var image = document.getElementById("placeholder13");
		image.setAttribute("src",fileName);
	}
	function showmenu(elmnt)
	{
		document.getElementById(elmnt).style.visibility="visible";
	}
	function hidemenu(elmnt)
	{
		document.getElementById(elmnt).style.visibility="hidden";
	}
	function showtxt(elmnt)
	{
		document.getElementById(elmnt).style.visibility="visible";
		document.getElementById(elmnt).style.color="#ffd235"
	}
	function showBeg(elmnt)
	{
		document.getElementById(elmnt).style.visibility="visible";
	}
	function hideBeg(elmnt)
	{
		document.getElementById(elmnt).style.visibility="hidden";
	}
	function showCh(elmnt)
	{
		document.getElementById(elmnt).style.visibility="visible";
		document.getElementById('solution').style.visibility="hidden";
		document.getElementById('result').style.visibility="hidden";
		document.getElementById('challenge_t').style.color="#ffd235"
		document.getElementById('solution_t').style.color="white"
		document.getElementById('result_t').style.color="white"
	}
	function showSo(elmnt)
	{
		document.getElementById(elmnt).style.visibility="visible";
		document.getElementById('challenge').style.visibility="hidden";
		document.getElementById('result').style.visibility="hidden";
		document.getElementById('solution_t').style.color="#ffd235"
		document.getElementById('challenge_t').style.color="white"
		document.getElementById('result_t').style.color="white"
	}
	function showRe(elmnt)
	{
		document.getElementById(elmnt).style.visibility="visible";
		document.getElementById('solution').style.visibility="hidden";
		document.getElementById('challenge').style.visibility="hidden";
		document.getElementById('result_t').style.color="#ffd235"
		document.getElementById('solution_t').style.color="white"
		document.getElementById('challenge_t').style.color="white"
	}
	function showNav(elmnt)
	{
		document.getElementById(elmnt).style.visibility="visible";
	} 
	function hideNav(elmnt)
	{
		document.getElementById(elmnt).style.visibility="hidden";
	}
	function showBtn(elmnt)
	{
		document.getElementById(elmnt).style.visibility="visible";
	}
	function hideBtn(elmnt)
	{
		document.getElementById(elmnt).style.visibility="hidden";
	}
	var scroll= false;
	
	function scrollit(){
		window.scrollBy(+150,0);
	}
	function scrollit2(){
		
    	window.scrollBy(-150,0);
	}
	function alertU(){
		alert("Use Arrow Buttons, Keys, or bottom scroll bar to navigate content");
	}
	var $j = jQuery;
		$j(document).ready(function() {  
  
    //get all link with class panel  
	
    $j('a.panel').click(function () {  
  
                //reset and highlight the clicked link  
        $j('a.panel').removeClass('selected');  
        $j(this).addClass('selected');  
          
        //grab the current item, to be used in resize function  
        current = $j(this);  
          
                //scroll it to the destination  
        $j('#main_content').scrollTo($j(this).attr('href'), 1000);        
          
                //cancel the link default behavior  
        return false;  
    });  
    
  
  
    //resize all the items according to the new browser size  
    $j(window).resize(function () {  
          
        //call the resizePanel function  
        resizePanel();  
    });  
      
});  
function resizePanel() {  
  
    //get the browser width and height  
    width = $j(window).width();  
    height = $j(window).height();  
  
    //get the mask width: width * total of items  
    mask_width = width * $j('.item').length;  
          
    //set the dimension   
    $j('#main_content, .item').css({width: width, height: height});  
    $j('#mask').css({width: mask_width, height: height});  
      
    //if the item is displayed incorrectly, set it to the corrent pos  
    $j('#main_content').scrollTo($j('a.selected').attr('href'), 0);  
          
}
