$(document).ready(function() {
	
    // VALIDATE
//	$("#aspnetForm").validate();

    // ADD CLASSES
    $("ul li:first").addClass("vfirst");
    $("li:first-child,dl:first-child").addClass("first");
    $("ul li:last").addClass("vlast");
    $("li:last-child,dl:first-child").addClass("last");
    //check for nav item with children
    $("#lcol li:has(ul)").addClass("daddy");
	$(".gen-table tr:even,ul li:even").addClass('even');
	$(".gen-table tr:odd,ul li:odd").addClass('odd');
    $(".gen-table td:first-child,.gen-table th:first-child").addClass("firstcol");
    $(".gen-table td:last-child,.gen-table th:last-child").addClass("lastcol");
    $("img").filter(function() { return ($(this).css('float') == 'right') }).addClass("imgr");
    $("img").filter(function() { return ($(this).css('float') == 'left') }).addClass("imgl");
    // swap hr
    $("hr").replaceWith("<div class=\"hr\"></div>");
    // fancy blockquotes
	$("#rcol blockquote").wrap('<div class="bq"></div>');
	$(".bq blockquote").prepend("<span class=\"lq\">&ldquo;</span>").append("<span class=\"rq\">&rdquo;</span>");
	
	// SUPERFISH VERTICAL
		$("ul.sf-menu").supersubs({
			pathClass: 'current',
			minWidth: 16,
			maxWidth: 27,
			extraWidth: 1
		}).superfish({
			delay:			500,
			animation:		{opacity:'1',height:'show'},
			speed:			'slow',
			dropShadows:	false,
			autoArrows:		false
		
		});

	// SET ACTIVE MENUS
	$("#lnav li a, .mnav li a").each(function() {
		if(this.href == window.location.href.split("#")[0]) {
			$(this).addClass("active");
			$(this).parents("li:last").addClass("current");
		}
	});

	// THUMB HOVER
	$(".fundimages img,.teamtn img").hover(function(){
		$(this).fadeTo("fast", 0.6); // mouseover
	},function(){
		$(this).fadeTo("slow", 1.0); // mouseout
	});
	
	//FLASH
	 
	$("#homebanner").flash({
		src:'media/banner_home.swf',
		wmode:'transparent',
		width: 960,
		height: 170
	
	},
	{ update: false }
	);

});
// END JQUERY

function displayEmail(prefix,dispText)
{
	domain = "curopropertyfunds.com" ;
	addy = prefix + "@" + domain ;
	if ( dispText == "" ) dispText = addy ;
	document.write ( "<a href=mailto:" + addy + ">" + dispText + "</a>" ) ;
}
