// Is used by content pages except the imagepage

(function($){
  myPage = function() {

	$("a[rel]").overlay({

		mask: 'darkred',
		top: 10,
		fixed: false,
		// effect: 'apple',

		onBeforeLoad: function() {

			// grab wrapper element inside content
			var wrap = this.getOverlay().find(".contentWrap");

			// load the page specified in the trigger
			wrap.load(this.getTrigger().attr("href"));
		}

	});


 //  	$('a.lightbox').lightBox({fixedNavigation:false});

	$("#footer a").click(function() {
		var mclass = $(this).attr('class'); //need to know this class for show/hide
		$(this).removeAttr("href"); //no href alowed, might be needed for nojs version
		$("#footer").removeClass().addClass(mclass); //remove this button
		$("#container").removeClass().addClass(mclass); //show the corresponding content

	})
	// end of the #footer a click function

	$("#navigation a").click(function() {
		var mclass = $(this).attr('class'); //need to know this class for show/hide
		$(this).removeAttr("href"); //no href alowed, might be needed for nojs version
		$("#footer").removeClass().addClass(mclass); //remove this button
		$("#container").removeClass().addClass(mclass); //show the corresponding content

	})
	// end of the #footer a click function


 };
})(jQuery);

