﻿$(document).ready(function () {

  $('#PressRoomPanel').mouseover(function () {
    $(this).stop().animate({ top: "-220px" }, 500)
		    .mouseout(function () {
		      $(this).stop().animate({ top: "0px" }, 500);
		    });
  });

  $('#ContactUsPanel').mouseover(function () {
    $(this).stop().animate({ top: "-220px" }, 500)
		    .mouseout(function () {
		      $(this).stop().animate({ top: "0px" }, 500);
		    });
  });



  $('#TextLine1').mouseover(function () {
    $(this).stop().animate({ backgroundPosition: '-1050px 0' }, 1300)
		    .mouseout(function () {
		      $(this).stop().animate({ backgroundPosition: '0px 0px' }, 600)
		    })
  });

  $('#TextLine2').mouseover(function () {
    $(this).stop().animate({ backgroundPosition: '-1060px 0' }, 1300)
		    .mouseout(function () {
		      $(this).stop().animate({ backgroundPosition: '0px 0px' }, 600)
		    })
  });
});


function ZoomIn(ImageID) {
  var $paneTarget = $('#ZoomImages');
  var $target = $paneTarget.find(ImageID);
  $target.css({ 'z-index': '10' });
  $target.find('img').addClass("hover").stop().animate({
    marginTop: '-65px', /* The next 4 lines will vertically align this image */
    marginLeft: '-75px',
    top: '50%',
    left: '50%',
    width: '150px', /* Set new width */
    height: '131px'
  }, 200);
}

function ZoomOut(ImageID) {
  var $paneTarget = $('#ZoomImages');
  var $target = $paneTarget.find(ImageID);
  $target.css({ 'z-index': '0' });
  $target.find('img').removeClass("hover").stop().animate({
    marginTop: '-27px', /* Set alignment back to default */
    marginLeft: '-31px',
    top: '50%',
    left: '50%',
    width: '63px', /* Set width back to default */
    height: '53px'
  }, 400);
}

