$(document).ready(function(){

	// =====================================================================================
	// App wide
	// =====================================================================================
	// ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  // Rollovers
  $("a.rollover").hover(
    function() {
      curr = $(this).find("img").attr("src");
      overlen = curr.length;
      over = curr.substr(0, overlen-4);
      over = over+'_on.png';
      $(this).find("img").attr({ src: over});
    },
    function() {
      $(this).find("img").attr({ src: curr});
    }
  )
	// ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  // Rollovers - Preload images
  $("a.rollover").find("img").each(function(i){
    temp = this.src;
    prelen = temp.length;
    pre = temp.substr(0, prelen-4);
    pre = pre+'_on.png';
    preload_image_object = new Image();
    preload_image_object.src = pre;
  });




	$('a.propertyNavHeader').click(function () {
		var active_parent_id = $(this).parent().attr('id');
		$(this).next('ul').slideToggle('fast')
		$('div.propertyNavMenu').each(function() {
			if ($(this).children('ul').is(":visible") && $(this).attr('id') != active_parent_id ) {
				$(this).children('ul').slideUp('fast');
				// $(this).children('ul').fadeOut('fast');
			}
		});
		return false;
	});
	


});

