//details page only

var alts = new Array();
alts[1] = 'Kitchen';
alts[2] = 'Living and Dining';
alts[3] = 'Outside Living';
alts[4] = 'Bedrooms';
alts[5] = 'Ensuite Bathrooms';
alts[6] = 'Guest Bathrooms';
alts[7] = 'Laundry';
alts[8] = 'Concierge';

var captions = new Array();
captions[2] = '<h3>Living &amp; Dining</h3>'
	+ '<ul><li>Spacious open plan living and dining area complete with luxury leather sofas.</li>'
    + '<li>Gas fire, integrated entertainment system and of course a view to die for!</li></ul>';

captions[3] = '<h3>Bedrooms</h3>'
	+ '<ul><li>Two spacious double bedrooms with ensuite bathrooms.</li>'
	+ '<li>Large, comfortable queen or twin beds and crisp bed linen will ensure the perfect nights sleep.</li></ul>';

captions[4] = '<h3>Ensuite Bathrooms</h3>'
	+ '<ul><li>Master bathroom with exquisite rain-head shower and bath complete with viewing panel enabling you to lie back and enjoy the magnificent view of Queenstown and Lake Wakatipu.</li>'
	+ '<li>The guest bathroom comes with the exquisite rain-head shower for added comfort.</li>'
	+ '<li>Each bathroom comes with heated towel rails, mirrors, hair dryers<br /> plus luxurious Molton Brown amenities.</li></ul>';

captions[1] = '<h3>Kitchen</h3>'
	+ '<ul><li>A sleek, contemporary kitchen with brushed stainless steel appliances and modern breakfast bar.</li>'
	+ '<li>Featuring quality modern kitchenware including a large fridge/freezer, dishwasher, oven and microwave.</li>'
    + '<li>All crockery, glassware and cutlery are provided - perfect for intimate dinner parties.</li>'
	+ '<li>Large private in-house laundry with washing machine and dryer.</li>'
	+ '<li>Laundry facilitles include iron, ironing board and washing powder provided.</li></ul>';

captions[5] = '<h3>Outside Living</h3>'
	+ '<ul><li>Large private balcony with outside furniture - perfect for al fresco entertaining.</li></ul>';

captions[7] = '<h3>Parking</h3>'
	+ '<ul><li>Secure garage parking</li></ul>';

//with lift access

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('sectionNav').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();
}

