// define list of motos
var motos = [
	"More Makarori than Malibu",
	"More Raglan than Rarotonga",
	"More Waiheke than Waikiki",
	"More Himitangi than Hawaii",
	"More St Clair than St Tropez",
	"More Whangamata than Waikiki",
	"More Tauranga than Taihiti",
	"More Piha than Palms Beach",
	"More Whakatane than Waimea",
	"More Kumara Patch than Cabbage Patch",
	"More Shipwreck's Bay than Jeffrey's Bay",
	"More Mt Maunganui than Maui",
	"More Manu Bay than Mundaka",
	"More Taylors than Teahupopo",
	"More Wairarima than Waimea"
];

// recursive function which will change the text inside
// the moto element, incrementing x each recurs
function motoBanner(x) {
	
	// reset x if at end of array
	if (x == motos.length) x = 0;
	
	// change moto element text
	$("#moto-banner").text(motos[ x ]);
	
	// recurs function
	setTimeout("motoBanner("+(x+1)+")",2000);
}

// wait until document has loaded before running function
jQuery(document).ready(function(){
	// start if moto banner element found
	if ($("#moto-banner"))
		motoBanner(0);
});
