// JavaScript Document
function mainmenu(){
	$(" #nav ul ").css({display: "none"}); // Opera Fix
	$(" #nav li").hover(function(){
			$(this).find('ul:first').css({visibility: "visible",display: "none"}).slideDown(300);
			},function(){
			$(this).find('ul:first').css({visibility: "hidden"});
			});
$(" #navhere ").parents("ul.submenu").closest("li").unbind();
$(" #navhere ").closest("ul.submenu").css({visibility: "visible",display: "block"});

}

//$(" #navhere ").parents(" #nav li ").unbind();


$(document).ready(function(){					
//mainmenu();

/*
$("#plan").simpletip({ // Configuration properties  
persistent: true,
fixed:true,
position: [230, -60]});
*/

$("#plan").cluetip({
	attribute:'rel',
	cluetipClass:'other',
	sticky:false,
	dropShadow:false,
	showTitle:false,
	positionBy:'fixed',
	topOffset:-500,
	leftOffset:0,
	
});


$(".zoom").simpletip({ // Configuration properties  
persistent: true,
fixed:true,
position: [230, -60]});

$('#banner-image').cycle({ 
    timeout: 5000
});

});


$(document).ready (function() {
	$('a.tips').cluetip({
		width:400,
		attribute:'href',
		sticky:false,
		showTitle:false
	});
	
	var elem = location.href.split('#');
	var topdivshow = '';
	if (elem.length > 1) {
		var divshow = elem[1]+'div';
		topdivshow = elem[1];
	} 		

	$(' .hide ').each(function() {
		var cid = $(this).attr('id');
		//alert(cid + '=' + divshow);
		cid = cid.replace(" ", "_");
		if(cid != divshow){
			$(this).hide();
		}
	});
	
	if(topdivshow != ''){
		divshow = divshow.replace("_" , " ");
		alert(divshow);
		$("#"+divshow).hide();
		var target_offset = $("#"+divshow).prev('a').offset();
		var target_top = target_offset.top; 
		//goto that anchor by setting the body scroll top to anchor top
		$('html, body').animate({scrollTop:target_top}, 500);	
	}

	//$(' .hide ').hide();
	//tog = false;
	$(".opentitle").click(function () {
		$(this).next('.hide').slideToggle("normal");
		$(this).toggleClass("highlight");
		return false;
	});
	

	
}); 



$(document).ready(function(){
	$(" #nav a").hover(function(){
		$(this).css('color','#005d99');
	}, function(){
		$(this).css('color','');
	}
	
	);
});





