// This site uses WordPress jQuery script, which initiates noConflict mode.
// In noConflict mode, use "jQuery(function($)" instead of "$(function()".

jQuery(function($) { // execute when DOM is ready

// home nav fades
$("body.home a").fadeTo("fast", 0.7);
$("body.home a").hover(
  function () {
	$(this).fadeTo("fast", 1);
  }, 
  function () {
	$(this).fadeTo("fast", 0.7);
  }
);

// background stretch
// backstretch() call is in footer.php 

// modal
$("body.shop .post a:has(img), .photos a:has(img)").colorbox({
	opacity: 0.5,
	title: function() { return $("img", this).attr("alt") },
	// hide elements that look "ugly" during loading phase
	onLoad: function() {
		$("#cboxTitle, #cboxCurrent, #cboxPrevious, #cboxNext, #cboxClose").css("visibility", "hidden");
	},
	// un-hide elements we hid during loading phase
	onComplete: function() {
		$("#cboxTitle, #cboxCurrent, #cboxPrevious, #cboxNext, #cboxClose").css("visibility", "visible");
	}
});
$("a.more-link").colorbox({
	opacity: 0.5,
	inline: true,
	initialWidth: 0,
	initialHeight: 0,
	width: 400,
	maxHeight: 350,
	href: function() { return $(this).attr("href") }
});

// pdf links
//$("a[href$='pdf']").append('<span class="small"> (PDF)</span>');

}); // end DOM ready execution