$(document).ready(function()
	{
	$(".imgright").load(function()
		{
		$(this).wrap(function()
			{
			return '<span class="' + $(this).attr('class') + '" style="background:url(' + $(this).attr('src') + ') no-repeat center center; width: ' + $(this).width() + 'px; height: ' + $(this).height() + 'px;" />';
			});
		$(this).css("opacity","0");
		});
	});
function addEvent(elm, evType, fn, useCapture)
	{
	if (elm.addEventListener)
		{
		elm.addEventListener(evType, fn, useCapture);
		return true;
		}
	else
		if (elm.attachEvent)
			{
			var r = elm.attachEvent('on' + evType, fn);
			return r;
			}
		else
			elm['on' + evType] = fn;
	}

function setTall()
	{
	if (document.getElementById)
		{
		var page = document.getElementById('page');
		var menu = document.getElementById('menu');
		var features = 	document.getElementById('features');
		var featureHeight = 0;
		if (features != null)
			featureHeight = features.offsetHeight;
		var footer = document.getElementById('footer');
		var maxHeight = Math.max(page.offsetHeight, menu.offsetHeight + 270 + 40);
		//var otherHeights = featureHeight + 1 + footer.offsetHeight + 6;
		var otherHeights = featureHeight + 1 + footer.offsetHeight + 10;
		maxHeight = Math.max(maxHeight, document.documentElement.clientHeight - otherHeights);
		page.style.height = maxHeight + 'px';
		footer.style.visibility = 'visible';
		}
	}

addEvent(window, 'load', setTall, false);
//addEvent(window, 'resize', setTall, false);

function showWin()
  {
  var w = window.open('','popup',
      'width=500,height=550,resizable,scrollbars,status,left=80,top=80');
  w.document.clear();
  w.focus();
  return true;
  }
// end x.js
function showPic()
  {
	var w = window.open('','gallery',
	    'width=400,height=400,resizable,scrollbars,status,left=0,top=0');
	w.document.clear();
	w.focus();
	return true;
	}
function mailIt()
	{
  var contact = "Adaminaby";
  var email = "info";
  var emailHost = "adaminaby.com";
  document.write('<a class="email" href="' + 'mail' + 'to:' + email + '@' + emailHost + '">' + contact + '</a>');
	}

