// maze-ex2.js
// Sample JavaScript solution for Lab 4: Mouse Maze
// (Partial solution through Exercise 2)
// INFO 343, Autumn 2012
// Morgan Doocy
// When the page is ready, attach event handlers.
$(document).ready(function() {
// Lose the game when any boundary *inside the maze* is moused over (not
// including the example boundary).
$('div#maze div.boundary').mouseover(lose);
});
// Set the maze boundaries and status message to the "lost" state.
function lose() {
$('div#maze div.boundary').addClass('youlose');
}