function initialize() {
	var the_href;


	////////// Setup NavBar link animations
				$("span.house_icon").hover(function() {
					$(this).stop().animate({ "padding-left": "10px" }, "fast");
					$(this).css( "cursor","pointer");
					$("img", this).attr("src","images/icon_house_red.png");
				}, function() {
					$(this).stop().animate({ "padding-left": "0px" }, "fast");
					$("img", this).attr("src","images/icon_house.png");
				});
				
	////////// Setup NavBar span clickage
				$("span.house_icon").each(function(index) {
					$(this).click(function() {
						the_href = $("a", this).attr("href");
						parent.location = the_href;
					});
					
				});
}


//	Used to ensure all fields are filled out when adding or editing a blog
function validate_blog() {
	var blog_title = document.getElementById("blog_title");
	var blog_post = document.getElementById("blog_post");

	
	if(blog_title.value.length == 0) {
		alert("Please enter a title for this blog in order to post it.");
		return false;
	}  else {
		var answer = confirm("Are you sure you want to post this blog?  It will be displayed immediately on your website!");
		
		if(answer) {
			return true;
		} else {
			return false;
		}
	}
}

// Used to handle other operations on admin_editBlog.php
function other_operations_blog(blog_id) {
	var selobj = document.getElementById("other_op");

	// If nothing selected
	if(selobj.selectedIndex == 0) {
		return;
	// If delete thsi blog selected
	} else if(selobj.selectedIndex == 1) {
		var answer = confirm("Are you sure you wish to delete this blog?");
	
		if(answer) {
			parent.location = "admin_deleteBlog.php?i="+blog_id;
		} else {
			return;
		}
	}
}



//	Used to ensure all fields are filled out when adding or editing an op-ed
function validate_oped() {
	var oped_title = document.getElementById("oped_title");
	var oped_post = document.getElementById("oped_post");

	
	if(oped_title.value.length == 0) {
		alert("Please enter a title for this op-ed contribution in order to post it.");
		return false;
	}  else {
		var answer = confirm("Are you sure you want to post this op-ed contribution?  It will be displayed immediately on your website!");
		
		if(answer) {
			return true;
		} else {
			return false;
		}
	}
}


// Used to handle other operations on admin_editOped.php
function other_operations_oped(oped_id) {
	var selobj = document.getElementById("other_op");

	// If nothing selected
	if(selobj.selectedIndex == 0) {
		return;
	// If delete thsi blog selected
	} else if(selobj.selectedIndex == 1) {
		var answer = confirm("Are you sure you wish to delete this op-ed contribution?");
	
		if(answer) {
			parent.location = "admin_deleteOped.php?i="+oped_id;
		} else {
			return;
		}
	}
}


//	Used to ensure all fields are filled out when adding or editing an op-ed
function validate_pub() {
	var pub_title = document.getElementById("pub_title");
	var pub_post = document.getElementById("pub_post");
	var pub_source = document.getElementById("pub_source");

	
	if(pub_title.value.length == 0) {
		alert("Please enter a title for this published writing in order to post it.");
		return false;
	} else if(pub_source.value.length == 0) {
		alert("Please enter where this writing was published in order to pos tit.");
		return false;
	}  else {
		var answer = confirm("Are you sure you want to post this published writing?  It will be displayed immediately on your website!");
		
		if(answer) {
			return true;
		} else {
			return false;
		}
	}
}



// Used to handle other operations on admin_editPublished.php
function other_operations_pub(oped_id) {
	var selobj = document.getElementById("other_op");

	// If nothing selected
	if(selobj.selectedIndex == 0) {
		return;
	// If delete thsi blog selected
	} else if(selobj.selectedIndex == 1) {
		var answer = confirm("Are you sure you wish to delete this published writing?");
	
		if(answer) {
			parent.location = "admin_deletePublished.php?i="+oped_id;
		} else {
			return;
		}
	}
}
