function loadwell(){
	var i=0;
    var pager=14;
    //if (hcc!=358)$('#vmHcMother p a:first').css('color','#000000');
	 $('#vmWellMother').empty();
	 $('#vmWellMother').append('<div id="loading"><img src="img/loader.gif"> Loading</div>');
     $('#vmWellMother p a').css('color','#000000');     
	 $.ajax({
                 type: "GET",
                 url: "dir/dir_selected.php?idc=387&well=true",
                 dataType: "xml",
                 success: function(xml) {
                    $('#vmWellMother').empty();
                 	$(xml).find('item').each(function(){
                 		$('#loading').remove();
						
							$('#vmWellMother').append('<p><a href="'+$(this).attr('href')+'" onmouseover="loadwellr('+$(this).attr('id')+')">'+$(this).attr('title')+' '+'('+$(this).attr('num')+')</a></p>')																		
                 		});
						$(xml).find('right').each(function(){
							$('#vmWellChild').empty().append('<p><a href="'+$(this).attr('href')+'"><strong>'+$(this).attr('title')+'</strong><br><br><img width="150" src="'+$(this).attr('image')+'" style="padding-bottom:2px"></a><br>'+$(this).attr('desc')+'...</p>');
                 		});                                             	
                }
            });
}
function loadwellr(id){
	 $.ajax({
                 type: "GET",
                 url: "dir/dir_selected.php?well=true&idc="+id,
                 dataType: "xml",
                 success: function(xml) {
                    $(xml).find('right').each(function(){
                 		$('#vmWellStretch2 #vmWellChild').empty().append('<p><a href="'+$(this).attr('href')+'"><strong>'+$(this).attr('title')+'</strong><br><br><img width="150" src="'+$(this).attr('image')+'" style="padding-bottom:2px"></a><br>'+$(this).attr('desc')+'...</p>');
                 		});    
                }
            });
    
}

$(function(){
	$('#wellNess a').click(function(){								
		$('#um_wellness').trigger('click');
	});	
	var closing = true;
	$('#wellNess,#vmWell').hover(
		function(){
			$('.vmContainer').css('display','none');
			$('#vmWell').css('display','block');
			closing = false;
		},
		function(){
			closing = true;
			setTimeout(function(){ 
				if(closing) $('#vmWell').css('display','none');
			},100);
		}
	);
	loadwell();
});

