var diagnose = function(boxy) {
	alert("Position: " + boxy.getPosition() +
		  "\nSize: " + boxy.getSize() +
		  "\nContent size: " + boxy.getContentSize() +
		  "\nCenter: " + boxy.getCenter());
};

$(function() {
  
  Boxy.DEFAULTS.title = 'Turbodraft Fire Eductor';
  
  $('#diagnostics').click(function() {
	  new Boxy("<div><a href='#' onclick='diagnose(Boxy.get(this));'>Diagnose</a></div>");
	  return false;
  });

  var setContent = null;
  $('#set-content-open').click(function() {
	  setContent = new Boxy(
		"<div style='background-color:red'>This is content</div>", {
		  behaviours: function(c) {
			c.hover(function() {
			  $(this).css('backgroundColor', 'green');
			}, function() {
			  $(this).css('backgroundColor', 'pink');
			});
		  }
		}
	  );
	  return false;
  });
  $('#set-content').click(function() {
	  setContent.setContent("<div style='background-color:blue'>This is new content</div>");
	  return false;
  });
  
});