
function loadSlide(id, load, animation) {
  $('#'+id).load(load, function() {
    $(this).css('display', 'none');   
    $(this).slideDown(animation);
  }).error(function () {
    // notify the user that the image could not be loaded
  });
}

function loadFade(id, load, animation, opacity) {
  $('#'+id).load(load, function() {
    $(this).css('display', 'none');   
    $(this).fadeTo(animation, opacity);
  }).error(function () {
    // notify the user that the image could not be loaded
  });
}

function photoLoadSlide(photo, photoClass, photoID, opacity) {
	var img = new Image();
  $(img).load(function () {
  	$(this).css('display', 'none'); // .hide() doesn't work in Safari when the element isn't on the DOM already
		$('#'+photoID).removeClass('loading').append(this); // $('#loader').removeClass('loading').append(this);
		$(this).slideDown('slow');
    $(this).fadeTo('slow', opacity);
	}).error(function () {
		// notify the user that the image could not be loaded
	}).attr('src', photo).attr('class', photoClass);
}
