﻿$(document).ready(function() {

	$("a.mnuclkLogIn").click(function() {
		loadControl('Controls/Login.ascx');
	});
    $("a.mnuclkforgotLogIn").click(function() {
		loadControl('Controls/passwordrecovery.ascx');
	});
	$("a.mnuclkNewApp").click(function() {
		loadControl('Controls/NewFellow.ascx');
	});

	$("a.mnuclkNewHostSite").click(function() {
		loadControl('Controls/NewHostSite.ascx');
	});







	//Ajax call, returns html of the control passed into 'path' 
	function loadControl(path) {
		$.ajax({
			url: 'ajax.svc/renderuc?path=' + path,
			dataType: 'html',
			success: function(data) {
				$("#masContentDiv").html(data);
			},
			error: function(xhr, ajaxOptions, thrownError) {
				$("#masContentDiv").append(xhr.responseText);
			}
		});
	}
});
