//details page only

var alts = new Array();
alts[1] = 'Inside Living';
alts[2] = 'Outside living';
alts[3] = 'Bedrooms';
alts[4] = 'Bathrooms';
alts[5] = 'Kitchen &amp; Laundry';
alts[6] = 'Little Luxuries';
alts[7] = 'Parking &amp; Access';
alts[8] = 'Concierge';

var captions = new Array();
captions[1] = '<h1>Inside Living</h1><ul><li>Open plan living, dining and kitchen area stretching over 200 square meters across the length of the property.</li>'
	+ '<li>Floor to ceiling windows to maximize the views.</li>'
    + '<li>Remote control gas fire, underfloor heating, state of the art integrated entertainment system including a 42 inch wall mounted plasma TV, Sky TV, PVR (mySKY), DVD player, CD player and built in surround sound.</li>'
    + '<li>Within this vast open plan living area there is also a work area with desk, internet connectivity, formal dining table for 10 and breakfast bar.</li></ul>';

captions[2] = '<h1>Outside living</h1><ul><li>Four separate terraces, accessed from the living room, dining area &amp; from all 4 bedrooms.'
    + '</li><li>The downstairs main terrace is accessed from the living area</li>'
    + '<li>The master bedroom and includes a four burner gas BBQ, table for  8 &amp; stone gas fire.</li>'
    + '<li>A further side &#8220;breakfast&#8221; terrace downstairs includes a table for 6.</li>'
    + '<li>Upstairs, the two main bedrooms open on to a huge entertaining terrace with a table for six, bedroom 4 opens onto a further rear terrace backing onto reserve forest.</li></ul>';

captions[3] = '<h1>Four bedrooms</h1><ul>'
	+ '<li>Downstairs: Master bedroom with stunning ensuite bathroom, double walk-in rainhead shower, terrace & views, LCD TV, 2 built in wardrobes.</li>'
	+ '<li>Upstairs: Bedroom 2 - double with ensuite shower room, terrace &amp; views, 2 built in wardrobes.</li>'
	+ '<li>Upstairs: Bedroom 3 - double / twin with separate family bathroom, terrace &amp; views, 2 built in wardrobes.</li>'
	+ '<li>Upstairs: Bedroom 4 / TV room with double leather fold out couch, terrace, sharing family bathroom.</li></ul>';

captions[4] = '<h1>Four bathrooms, including two ensuite</h1><ul>'
	+ '<li>Ensuite off master bedroom with spa bath, walk in double rain head shower, underfloor heating, hairdryer, heated towel rail &amp; heated (fog free) mirror.</li>'
	+ '<li>Ensuite upstairs with luxury rain head shower, hairdryer, heated towel rail.</li>'
	+ '<li>Bathroom upstairs with luxury rainhead shower, deep double bath, hairdryer &amp; heated towel rail.</li>'
	+ '<li>Downstairs toilet room</li>'
	+ '</ul>';

captions[5] = '<h1>Kitchen &amp; Laundry</h1><ul>'
	+ '<li>Bosch dishwasher, state of the art oven &amp; microwave.</li>'
	+ '<li>Large American style fridge freezer with water &amp; ice dispenser.</li>'
	+ '<li>Fully equipped for cooking &amp; dining.</li>'
	+ '<li>Large laundry room with washer &amp; dryer.</li>'
	+ '<li>Laundry facilitles include iron, drying rack &amp; washing powder provided.</li>'
	+ '<li>Fully furnished, with all linen &amp; towels provided</li></ul>';

captions[6] = '<h1>Little Luxuries</h1><ul>'
	+ '<li>Molton Brown toiletries provided, bathrobes in each room, hairdryers in all bathrooms.</li>'
	+ '<li>Meet &amp; greet service for your arrival.</li></ul>';

captions[7] = '<h1>Parking &amp; Access</h1><ul>'
	+ '<li>Secure garage parking for 2 cars, with automatic garage door control.</li>'
	+ '<li>Ski locker adjacent to garage.</li></ul>';

captions[8] = '<h1>Concierge</h1><ul>'
	+ '<li>The apartment is serviced after 7 nights, and daily servicing is available on request at an additional cost.</li>'
	+ '<li><a href="http://www.touchofspice.co.nz" target="_blank" title="Touch of Spice Concierge Services">Touch of Spice</a> professional concierge service are available to meet your every need - from buying food prior to your arrival through to booking babysitting. (At additional cost).</li>'
	+ '<li>We can also arrange for cots, high chairs and stair gates for our little guests.  Children are welcome at 25.</li></ul>';

function changeDetails (which)
{
    //change large image
	var lgImgObj    = document.getElementById('mainImg');
	lgImgObj.src    = 'images/details/'+ which +'.jpg'
	lgImgObj.alt    = alts[which];
	lgImgObj.title  = alts[which];

    //change caption
    var caption = document.getElementById('caption');
    caption.innerHTML = captions[which];
}

function addOnClicks()
{
    if (!document.getElementsByTagName) return false;
    var items = document.getElementById('rhNav').getElementsByTagName('a');
    for (var i=0; i < items.length; i++) {
        items[i].onclick = function() {
            changeDetails(this.id.substring(7));
//            alert(this.parentNode.style.className);//.value= 'current';
            return false;
        }
    }
}


//assign onclick events to all ul#rhNav a tags
window.onload = function () {
    addOnClicks();
}
