$(document).ready(function(){

	var _currentDocTitle = $("h2.section-head").text();;
	
	$("#ring").mouseover(function(){
			$(this).addClass("sfhover");					  
	});
	$("#ring").mouseout(function(){
			$(this).removeClass("sfhover");					  
	});

	$("").toggleClass("sfhover");

	$("#ring").draggable();
	
	$("#mmi_1").droppable({
		accept: "#ring",
		hoverClass: "touched",
		tolerance: "touch",
		over: function(ev, ui) {						
			var targetDocTitle = $("li#"+this.id+" a span").html();	
			$("h2.section-head").html(targetDocTitle);			
		},
		out: function(ev, ui) {
			$("h2.section-head").html(_currentDocTitle);
		},
		drop: function(ev, ui) {
			var targetDocHref = $("li#"+this.id+" a").attr('href');
			location.href = targetDocHref; 
		}
	});
	
	$("#mmi_2").droppable({
		accept: "#ring",
		hoverClass: "touched",
		tolerance: "touch",
		over: function(ev, ui) {
			var targetDocTitle = $("li#"+this.id+" a span").html();	
			$("h2.section-head").html(targetDocTitle);	
		},
		out: function(ev, ui) {
			$("h2.section-head").html(_currentDocTitle);
		},
		drop: function(ev, ui) {
			var targetDocHref = $("li#"+this.id+" a").attr('href');
			location.href = targetDocHref; 
		}
	});
	
	$("#mmi_3").droppable({
		accept: "#ring",
		hoverClass: "touched",
		tolerance: "touch",
		over: function(ev, ui) {
			var targetDocTitle = $("li#"+this.id+" a span").html();	
			$("h2.section-head").html(targetDocTitle);	
		},
		out: function(ev, ui) {
			$("h2.section-head").html(_currentDocTitle);
		},
		drop: function(ev, ui) {
			var targetDocHref = $("li#"+this.id+" a").attr('href');
			location.href = targetDocHref; 
		}
	});
	
	$("#mmi_4").droppable({
		accept: "#ring",
		hoverClass: "touched",
		tolerance: "touch",
		over: function(ev, ui) {
			var targetDocTitle = $("li#"+this.id+" a span").html();	
			$("h2.section-head").html(targetDocTitle);	
			//$("h2.section-head").replaceWith("<h2 class='section-head'>"+targetDocTitle+"</h2>");
		},
		out: function(ev, ui) {
			$("h2.section-head").html(_currentDocTitle);
			//$("h2.section-head").replaceWith("<h2 class='section-head'>"+_currentDocTitle+"</h2>");
		},
		drop: function(ev, ui) {
			var targetDocHref = $("li#"+this.id+" a").attr('href');
			location.href = targetDocHref;
		}
	});
	
	$("#mmi_5").droppable({
		accept: "#ring",
		hoverClass: "touched",
		tolerance: "touch",
		over: function(ev, ui) {
			var targetDocTitle = $("li#"+this.id+" a span").html();	
			$("h2.section-head").html(targetDocTitle);	
			//$("h2.section-head").replaceWith("<h2 class='section-head'>"+targetDocTitle+"</h2>");
		},
		out: function(ev, ui) {
			$("h2.section-head").html(_currentDocTitle);
			//$("h2.section-head").replaceWith("<h2 class='section-head'>"+_currentDocTitle+"</h2>");
		},
		drop: function(ev, ui) {
			var targetDocHref = $("li#"+this.id+" a").attr('href');
			location.href = targetDocHref;
		}
	});
	
	$("#mmi_6").droppable({
		accept: "#ring",
		hoverClass: "touched",
		tolerance: "touch",
		over: function(ev, ui) {
			var targetDocTitle = $("li#"+this.id+" a span").html();	
			$("h2.section-head").html(targetDocTitle);	
			//$("h2.section-head").replaceWith("<h2 class='section-head'>"+targetDocTitle+"</h2>");
		},
		out: function(ev, ui) {
			$("h2.section-head").html(_currentDocTitle);
			//$("h2.section-head").replaceWith("<h2 class='section-head'>"+_currentDocTitle+"</h2>");
		},
		drop: function(ev, ui) {
			var targetDocHref = $("li#"+this.id+" a").attr('href');
			location.href = targetDocHref;
		}
	});

  });





