$(document).ready(function(){
	
	/*
	----------------------------------------------------------
	GENERAL
	---------------------------------------------------------- */
	//FONT REPLACEMENT 
    Cufon.replace('h1, h2, h3, sup, #title ul li a,#footer-interior ul li a, #homeMast p');  
	
	
	
	// CLEAR VALUE ON FOCUS
	$('.labelvalue').each(function() {
	    var default_value = this.value;
	    $(this).focus(function() {
	        if(this.value == default_value) {
	            this.value = '';
	        }
	    });
	    $(this).blur(function() {
	        if(this.value == '') {
	            this.value = default_value;
	        }
	    });
	});
	
	
	
	// EXTERNAL WINDOWS
	$('a[rel="external"]').click( function() {
        window.open( $(this).attr('href') );
        return false;
    });



	// MAKE ENTIRE AREA CLICKABLE
	$("div.highlight").click(function(){
		if($(this).find("a").attr("rel") == "external") {
		    window.open($(this).find("a").attr("href"))
		} else{
		    window.location=$(this).find("a").attr("href"); return false;
		    return;
		}
	});
	
	
	// MONCUR LOGO ANIM
	$("#moncur a").hover(function() {
		$(this).next("span").animate({opacity: "show"}, "slow");
	}, function() {
		$(this).next("span").animate({opacity: "hide"}, "fast");
	});
	
		
});

    
/*
----------------------------------------------------------
COOKIES
---------------------------------------------------------- */
function readCookie(name,delimit)
{


  if (document.cookie == '')
  {
    return false;
  }
  else
  {
    var fC,lC;
    var mcookie = unescape(document.cookie);
    fC = mcookie.indexOf(name);
    var ph = fC + name.length;
    if ((fC != -1) && (mcookie.charAt(ph) == '='))
    {
      fC += name.length + 1;
      lC = mcookie.indexOf(delimit,fC);
      if (lC == -1) lC = mcookie.length;
      return unescape(mcookie.substring(fC,lC));
    }
    else
    {
      return false;
    }
  }
}




