$(function() {
// Set up some options objects: 'single_opts' for when a single area is selected, which will show just a border
// 'all_opts' for when all are highlighted, to use a different effect - shaded white with a white border
// 'initial_opts' for general options that apply to the whole mapster. 'initial_opts' also includes callbacks
// onMouseover and onMouseout, which are fired when an area is entered or left. We will use these to show or
// remove the captions, and also set a flag to let the other code know if we're currently in an area.
var inArea = false,
$image = $('#beatles-img'),
$captionBandMember = $('#beatles-caption-band-member'),
$captionInstructions = $('#beatles-caption-instructions'),
$captionHeader = $('#beatles-caption-header'),
$captionText = $('#beatles-caption-text'),
captions = {
paul: [
'Paul McCartney - Bass Guitar and Vocals',
"Paul McCartney's song, Yesterday, recently voted the most popular song " +
'of the century by a BBC poll, was initially composed without lyrics. ' +
"Paul used the working title 'scrambled eggs' before coming up with the final words."
],
ringo: [
'Ringo Starr - Drums',
"Dear Prudence was written by John and Paul about Mia Farrow's sister, Prudence, " +
"when she wouldn't come out and play with Mia and the Beatles at a religious retreat " +
'in India.'
],
john: [
'John Lennon - Guitar and Vocals',
"In 1962, The Beatles won the Mersyside Newspaper's biggest band in Liverpool " +
'contest principally because they called in posing as different people and voted ' +
'for themselves numerous times.'
],
george: [
'George Harrison - Lead Guitar and Vocals',
"The Beatles' last public concert was held in San Francisco's Candlestick " +
'Park on August 29, 1966.'
]
},
single_opts = {
fillColor: '000000',
...
Please Whitelist JSFiddle in your content blocker.
Help keep JSFiddle free for always by one of two ways:
Whitelist JSFiddle in your content blocker (two clicks)
Go PRO and get access to additional PRO features →
Join the 4+ million users, and keep the JSFiddle dream alive.
Ad-free
All ads in the editor and listing pages are turned completely off.
Fiddle Pages
Your fiddles accessible under a custom domain and a vanity path - the simplest hosting for your personal project.
Use pre-released features
You get to try and use features (like the Palette Color Generator) months before everyone else.
Fiddle collections
Sort and categorize your Fiddles into multiple collections.
Private collections and fiddles
You can make as many Private Fiddles, and Private Collections as you wish!
Get Fiddle Pages with PRO
Your fiddles accessible under a custom domain and a vanity path - the simplest hosting for your personal project.