// JavaScript Document

// Using multiple unit types within one animation.
function winOpen(){
  var LeftPosition = (document.width) ? (document.width-495)/2 : 0;
  var TopPosition = (document.height) ? (document.height-0)/2 : 0;
  var LtPos = $(document).width() * .30;
  var tintwidth = (document.width) ? (document.width-0) : 0;
  var tintheight = (document.height) ? (document.height-0) : 0;
  
  var bblock = $('#block').attr('id');
  var ttint = $('#tint').attr('id');
  var vid = $('#closevid').attr('id');
  
  //bblock.style.left = LtPos + "px";
  //bblock.style.top = +70 + "px";
  
  //ttint.style.width = tintwidth + "px";
  //ttint.style.height = tintheight + "px";
  
  $("#block").animate({ 
	width: 495 + 'px',
	height: 100 + 'px',
	left: LtPos + "px",
	top: 70 + "px",
	opacity: 1,
	border: 5 + 'px'
  }, 500 );
  $("#tint").animate({ 
	opacity: 0.5
  }, 500 );
  //ttint.style.display = "block";
  //vid.style.display = "block";
  $('#block').show();
  $('#closevid').show();
  $('#tint').show();
  $('#tint').width(tintwidth + "px");
  $('#tint').height(tintheight + "px");
}
function winClose(){
	
  var bblock = $('#block').attr('id');
  var ttint = $('#tint').attr('id');
  var vid = $('#closevid').attr('id');
  
  $("#block").animate({ 
	width: 0 + 'px',
	height: 0 + "px",
	opacity: 0
  }, 500 );
  $("#tint").animate({ 
	opacity: 0
  }, 500 );
  
  //vid.style.display = "none";
  $('#block').hide();
  $('#closevid').hide();
  $('#tint').hide();
  $('#tint').width(0 + "px");
  $('#tint').height(0 + "px");
  //bblock.style.width = 0 + 'px';
  //bblock.style.height = 0 + 'px';
  //bblock.style.opacity = 0;
  //bblock.style.display = "none";
  //ttint.style.width = 0 + 'px';
  //ttint.style.height = 0 + 'px';
  //ttint.style.opacity = 0;
  //ttint.style.display = "none";
}
