jQuery().ready(function(){
	// Stop conflicts with mootools
	jQuery.noConflict();
	
	// simple accordion
	jQuery('#list1a').accordion({
		header: 'a.accord',
		active: true,
		alwaysOpen: true,
		//event: 'mouseover',
		// this line makes display locations the visible frame on home page.. need to make it 'similar homes' on pages that have similar homes!
		autoheight: true
	});
	
	// For any sort menus
	if (jQuery('div.sort')) {
		//jQuery('div.sort').bind('mouseout', function(e) { jQuery('div.sort').accordion('activate', -1); });
		jQuery('div.sort').accordion({
			header: 'h3',
			active: ":eq(1)",
			alwaysOpen: false,
			//event: 'mouseover',
			// this line makes display locations the visible frame on home page.. need to make it 'similar homes' on pages that have similar homes!
			autoheight: false
		});
		
		// add a slight opacity to the menu
		jQuery('div.sort > ul').css('opacity', 0.8);
	}
	
	/*if (jQuery('div.gallery')) {
		jQuery('div.gallery a').flyout();
	}*/
	
	if (jQuery('a.bookmark')) {
		jQuery('a.bookmark').bind('click', function(e) { 
			e.preventDefault();
			e.stopPropagation();	
			return !bookmarkMe(this); 
		});
	}
});