$(document).ready(function() {

	// Initialize drop-down menus
	$("ul.sf-menu").supersubs({ minWidth: 8, maxWidth: 27, extraWidth: 1 }).superfish({ autoArrows:  false, dropShadows: false });

	// Highlight every other row in the property details "tables"
	$("#sidebar dl").each(function () { 
						   
		$(this).children("dt:even, dd:even").css("background-color", "#EFEFEF");
	});
	
	// Initialize accordion for properties grouped by region or type
	var accordion = $("#accordion");
	
	if (0 != accordion.length)
		accordion.accordion({ active: false, animated: false, autoHeight: false, collapsible: true, header: "h3", icons: {header: "ui-icon-circle-arrow-e", headerSelected: "ui-icon-circle-arrow-s"} });

	// Initialize slideshow on homepage
	var slideshow = $("#slideshow");

	if (0 != slideshow.length)
		slideshow.jqFancyTransitions({ "delay": 3000, "direction": "random", "height": slideshow.height(), "links": false, "navigation": false, "position": "top", "stripDelay": 20, "strips": 40, "titleOpacity": .6, "titleSpeed": 1500, "width": 840 });
});
