// JavaScript Document
window.addEvent('domready', function() {
//add flyouts for builders
//get id's for anchors

//get host name to use for URL so 
//it's friendly with permalinks

var myHost = location.hostname;
//code below
var myLI = $('nav_ul').getElement('.page-item-3');
var interactive = new Element('li', {id: 'aberdeen', 'html': '<a href="?page_id=17">Interactive Site Plan</a>'});
var aberdeen  = new Element('li', {id: 'aberdeen', 'html': '<a href="?page_id=3&village=aberdeen#aberdeen_0">Village of Aberdeen</a>'});
var buckland  = new Element('li', {id: 'buckland', 'html': '<a href="?page_id=3&village=buckland#buckland_0">Village of Buckland</a>'});
var castlecove  = new Element('li', {id: 'castlecove', 'html': '<a href="?page_id=3&village=castlecove#castlecove_0">Village of Castlecove</a>'});
var inverness  = new Element('li', {id: 'inverness', 'html': '<a href="?page_id=3&village=inverness#inverness_0">Village of Inverness</a>'});
var newbridge  = new Element('li', {id: 'newbridge', 'html': '<a href="?page_id=3&village=newbridge#newbridge_0">Village of Newbridge</a>'});
var prestwick  = new Element('li', {id: 'prestwick', 'html': '<a href="?page_id=3&village=prestwick#prestwick_0">Village of Prestwick</a>'});
var glasgow  = new Element('li', {id: 'glasgow', 'html': '<a href="?page_id=3&village=glasgow#glasgow_0">Village of Glasgow</a>'});
var hidden  = new Element('li', {id: 'hidden', 'html': '&nbsp;'});

var lwidth = 130 ;

 if (Browser.Platform.win) {
	 	lwidth = 150;
	} else if (Browser.Platform.other) {
		lwidth = 145;
	}
myLI.setStyle('display','none');
aberdeen.setStyle('width', lwidth);
buckland.setStyle('width', lwidth);
castlecove.setStyle('width', lwidth);
newbridge.setStyle('width', lwidth);
prestwick.setStyle('width', lwidth);
interactive.setStyle('width', lwidth);
inverness.setStyle('width', lwidth);
glasgow.setStyle('width', lwidth);
hidden.setStyle('display', 'none');//IE six
hidden.inject(myLI, 'before');
interactive.inject(myLI, 'before');
aberdeen.inject(myLI, 'before');
buckland.inject(myLI, 'before');
castlecove.inject(myLI, 'before');
glasgow.inject(myLI, 'before');
inverness.inject(myLI, 'before');
newbridge.inject(myLI, 'before');
prestwick.inject(myLI, 'before');

//code above
});

