jamietre/ImageMapster — pull request #179 by zhad3 (2014-01-21 20:53:16+00:00)
Title: Quick implementation of minimum and maximum number of selected areas

I needed a way to have only 1 area selected at all times. With the singleSelect option it was still possible to deselect the area and with both events onClick and onStateChanged I couldn't manage to force the selection.

So in the end I did some additions which allows the usage of two new options **minSelected**=0 and **maxSelected**=null.
As their names imply, if minSelected is greater than 0 you won't be able to deselect any more areas once you hit that minimum. The same applies to maxSelected once changed.

I added the conditions to the isSelectable() and isDeselectable() functions and used those in the select and deselect functions.
I wasn't too sure whether the select and deselect functions should always work and override any condition, but since it had the singleSelect option as one I just added mine them aswell.

I didn't add a auto-select. Which means once you load the plugin and want to match the minSelected, you will have to select them manually after loading or just let the user select them until they hit the limit.

### Example
(have atleast one area selected)
```javascript
$('#map').mapster({
minSelected: 1
)}
```