// JavaScript Document
var emailAddress = new Array();
//set the parameters for email(s) on page
//values: ID of the span, text to be hyperlinked, recipient, first part of domain, the second part of domain
emailAddress[0] = "sendemail,email,info,koolkatwebdesigns,com";
emailAddress[1] = "sendemail2,email,info,koolkatwebdesigns,com";

function isDefined(property) {
  return (typeof property != 'undefined');
}

function escramble() {
	//ensure user agent can do DOM
    var linkText;
	if ((isDefined(document.getElementById)) && (isDefined(document.createElement)))
	{
	//loop through email addresses
	  try {
   	    for (var i=0;i<emailAddress.length;i++) {
			//put data in array
	  	  var x = emailAddress[i].split(',');
		//grab the email span element
		  var element = document.getElementById(x[0]);
		 
		//create the actual link
		  var theLink = "mailto:" + x[2] + "@" + x[3] + "." + x[4];
		
		//build node for email link
		  emailLink = document.createElement("a");
		  emailLink.href = theLink;
		 //use span so IE 6 doesn't show mailto
		  var linkSpan = emailLink.appendChild(document.createElement("span"));
		  linkText = x[1];
		  if (x[1] == "email")
		  {
			 linkText = x[2] + "@" + x[3] + "." + x[4];
		  }
		  linkSpan.appendChild(document.createTextNode(linkText));
       
		//replace it!
		  element.parentNode.replaceChild(emailLink, element)
		 

	    }
	  }
		catch(err) {
			
		}
	}
}
function spriteInit() {
	jQuery(".menu").children("li").each(function() {
    jQuery(this).children("a").css({backgroundImage:"none"});
}); 
    attachNavEvents(".menu", "page-item-89");
attachNavEvents(".menu", "page-item-114");	
attachNavEvents(".menu", "page-item-112");
attachNavEvents(".menu", "page-item-2");
attachNavEvents(".menu", "page-item-108");
attachNavEvents(".menu", "page-item-5");
}

function attachNavEvents(parent, myDiv) {
    jQuery(parent + " ." + myDiv).mouseover(function() {
        jQuery(this).before('<div class="menu-' + myDiv + '"></div>');
        jQuery("div.menu-" + myDiv).css({display:"none"}) .fadeIn(300);

    }).mouseout(function() {
        jQuery("div.menu-" + myDiv).fadeOut(300, function() {
            jQuery(this).remove();
        });

    }).mousedown(function() {
        // do things here
    
    });
}
function hoverButton(imgDir){
	jQuery(".hoverbutton").hover(			   
      function () {
	   jQuery(this).attr({				 
		src: imgDir + "/images/" + this.id + "_on.gif"
		});

      }, 
      function () {
        jQuery(this).attr({ 
		src: imgDir + "/images/" + this.id + "_off.gif"
		});
      }
    );
}
function showTextLinks(){
  var noflash ='<ul id="noflash">\n'
  + '<li><a href="http://www.centeredispilates.com/" target="_blank" rel="nofollow" title="Centered Pilates">Centered Pilates</a></li>'
  + '<li><a href="http://www.flutterlights.com/" target="_blank" rel="nofollow" title="Flutterlights Custom Candles">Flutterlights Custom Candles</a></li>'
  + '<li><a href="http://depts.washington.edu/uwruca/" target="_blank" rel="nofollow" title="Rural-Urban Commuting Area Codes">Rural-Urban Commuting Area Codes</a></li>'
  + '<li><a href="http://www.findacounselor.net/" target="_blank" rel="nofollow" title="FindACounselor">FindACounselor</a></li>'
  + '<li><a href="http://www.walkwithmetours.net/" target="_blank" rel="nofollow" title="Walk with me Tours">Walk with me Tours</a></li>'
  + '<li><a href="http://www.etgfoundation.com/" target="_blank" rel="nofollow" title="ETG Foundation">ETG Foundation</a></li>'
  + '<li><a href="http://www.advantagebydesign.us/" target="_blank" rel="nofollow" title="Advantage by Design">Advantage by Design</a></li>'
  + '<li><a href="http://www.hip-ghana.org/" target="_blank" rel="nofollow" title="Health Improvement and Promotion Alliance">Health Improvement and Promotion Alliance</a></li>'
  + '<li><a href="http://www.ewajocentre.com/" target="_blank" rel="nofollow" title="Ewajo Dance">Ewajo Dance</a></li>'
  + '<li><a href="http://www.washingtoncash.org/" target="_blank" rel="nofollow" title="Washington CASH">Washington CASH</a></li>'
  + '<li><a href="http://www.pajenscustomsewing.com/" target="_blank" rel="nofollow" title="P.A. Jens Custom Sewing">P.A. Jens Custom Sewing</a></li>'
  + '<li><a href="http://www.celestiallivingarts.com/" target="_blank" rel="nofollow" title="Celestial Living Arts">Celestial Living Arts</a></li>'
  + '<li><a href="http://www.bookloverstravel.com/" target="_blank" rel="nofollow" title="BookLover\'s Travel">BookLover&rsquo;s Travel </a></li>'
  + '<li><a href="http://www.simplygreatjerky.com/" target="_blank" rel="nofollow" title="Simply Great Jerky</a></li>'
  + '</ul>';
  document.write(noflash);
}