// JavaScript Document
$(document).ready(function(){
	 $("div#t_gallery_content_container").fadeTo(1, 0.9);
	 $("div#t_gallery_menu").fadeTo(1, 1);
	 if(typeof($("#t_sub_nav").attr("id")) !== "undefined"){
		 xPos = $("#t_sponsors").x();
		 yPos = $("#t_sponsors").y();
		 wHeight = $("#t_watermark").height();
		 $("#t_watermark").css("display", "block");
		 $("#t_watermark").css("left", xPos+"px");
		 $("#t_watermark").css("top", ((yPos-wHeight))+"px");
		//alert(document.getElementById("watermark_image").offsetHeight);
	 }
	 if ($.browser.msie) {	
		if($.browser.version.substr(0,1)<=7){
			 if(typeof($("#t_sub_nav").attr("id")) !== "undefined"){
				 $("#t_watermark").css("display", "none");
			 }
		}
	 }
});


$.fn.x = function(n) {
	var result = null;
	this.each(function() {
		var o = this;
		if (n === undefined) {
			var x = 0;
			if (o.offsetParent) {
				while (o.offsetParent) {
					x += o.offsetLeft;
					o = o.offsetParent;
				}
			}
			if (result === null) {
				result = x;
			} else {
				result = Math.min(result, x);
			}
		} else {
			o.style.left = n + 'px';
		}
	});
	return result;
};
		
		
$.fn.y = function(n) {
	var result = null;
	this.each(function() {
		var o = this;
		if (n === undefined) {
			var y = 0;
			if (o.offsetParent) {
				while (o.offsetParent) {
					y += o.offsetTop;
					o = o.offsetParent;
				}
			}
			if (result === null) {
				result = y;
			} else {
				result = Math.min(result, y);
			}
		} else {
			o.style.top = n + 'px';
		}
	});
	return result;
};
/*



*/
