

var global = {
  
  preload:function() {
    
    imageObj = new Image();
    
    var imagesArray = new Array();
    imagesArray[0] = "/images/bg_hp_image.jpg";
    imagesArray[1] = "/images/bg_ab_image.jpg";
    imagesArray[2] = "/images/bg_qa_image.jpg";
    imagesArray[3] = "/images/bg_co_image.jpg";
    imagesArray[4] = "/images/bg_re_image.jpg";
    imagesArray[5] = "/images/bg_pr_image.jpg";
    imagesArray[6] = "/images/bg_er_image.jpg";
    imagesArray[7] = "/images/bg_x1_image.jpg";
    imagesArray[8] = "/images/bg_ah_image.jpg";
    
    var numImgs = 9;
    
    for(var i=0; i<numImgs; i++) {
      imageObj.src = imagesArray[i];
    }
  },
  
  /* Pause before moving forward
  ---------------------------------------------------------------------------------------- */
  pause:function(mils) {
    var date = new Date();
    curDate = null;
    do { var curDate = new Date(); }
    while ( curDate - date < mils);
  }
}

// global.preload();

$(document).ready(function(){



$("ul.thumb li.b8").hover(function() {
	$(this).css({'z-index' : '10'}); /*Add a higher z-index value so this image stays on top*/
	$(this).find('img').addClass("hover").stop() /* Add class of "hover", then stop animation queue buildup*/
		.animate({
			marginTop: '0', /* -110px The next 4 lines will vertically align this image */
			marginLeft: '0',    /* -110px */
			top: '-200px',
			left: '-20px',   /* 50% */
			width: '170px', /* Set new width */
			height: '120px', /* Set new height */
			padding: '0'
		}, 150); /* this value of "200" is the speed of how fast/slow this hover animates */

	} , function() {
	$(this).css({'z-index' : '0'}); /* Set z-index back to 0 */
	$(this).find('img').removeClass("hover").stop()  /* Remove the "hover" class , then stop animation queue buildup*/
		.animate({
			marginTop: '0', /* Set alignment back to default */
			marginLeft: '0',
			top: '0',
			left: '0',
			width: '71px', /* 84 Set width back to default */
			height: '50px', /* 70 Set height back to default */
			padding: '0'
		}, 200);
});

$("ul.thumb li.b9").hover(function() {
	$(this).css({'z-index' : '10'}); /*Add a higher z-index value so this image stays on top*/
	$(this).find('img').addClass("hover").stop() /* Add class of "hover", then stop animation queue buildup*/
		.animate({
			marginTop: '0', /* -110px The next 4 lines will vertically align this image */
			marginLeft: '0',    /* -110px */
			top: '-240px',
			left: '-70px',   /* 50% */
			width: '240px', /* Set new width */
			height: '200px', /* Set new height */
			padding: '0' // 40px 40px 0 40px

		}, 150); /* this value of "200" is the speed of how fast/slow this hover animates */

	} , function() {
	$(this).css({'z-index' : '0'}); /* Set z-index back to 0 */
	$(this).find('img').removeClass("hover").stop()  /* Remove the "hover" class , then stop animation queue buildup*/
		.animate({
			marginTop: '0', /* Set alignment back to default */
			marginLeft: '0',
			top: '0',
			left: '0',
			width: '84px', /* 84 Set width back to default */
			height: '70px', /* 70 Set height back to default */
			padding: '0'
		}, 200);
});





$("ul.thumb li.b10").hover(function() {
	$(this).css({'z-index' : '10'}); /*Add a higher z-index value so this image stays on top*/
	$(this).find('img').addClass("hover").stop() /* Add class of "hover", then stop animation queue buildup*/
		.animate({
			marginTop: '0', /* -110px The next 4 lines will vertically align this image */
			marginLeft: '0',    /* -110px */
			top: '-200px',
			left: '-20px',   /* 50% */
			width: '210px', /* Set new width */
			height: '128px', /* Set new height */
			padding: '0'
		}, 150); /* this value of "200" is the speed of how fast/slow this hover animates */

	} , function() {
	$(this).css({'z-index' : '0'}); /* Set z-index back to 0 */
	$(this).find('img').removeClass("hover").stop()  /* Remove the "hover" class , then stop animation queue buildup*/
		.animate({
			marginTop: '0', /* Set alignment back to default */
			marginLeft: '0',
			top: '0',
			left: '0',
			width: '82px', /* 84 Set width back to default */
			height: '50px', /* 70 Set height back to default */
			padding: '0'
		}, 200);
});






// var isUp = false;

$("ul.thumb li.alternative").click(function() {

     if(!isUp) {

	$(this).css({'z-index' : '10'}); /*Add a higher z-index value so this image stays on top*/
	$(this).find('img').addClass("hover").stop() /* Add class of "hover", then stop animation queue buildup*/
		.animate({
			marginTop: '0', /* -110px The next 4 lines will vertically align this image */
			marginLeft: '0',    /* -110px */
			top: '-200px',
			left: '-20px',   /* 50% */
			width: '220px', /* Set new width */
			height: '180px', /* Set new height */
			padding: '40PX'
		}, 200); /* this value of "200" is the speed of how fast/slow this hover animates */
		
	isUp = true;	

      } else {

	$(this).css({'z-index' : '0'}); /* Set z-index back to 0 */
	$(this).find('img').removeClass("hover").stop()  /* Remove the "hover" class , then stop animation queue buildup*/
		.animate({
			marginTop: '0', /* Set alignment back to default */
			marginLeft: '0',
			top: '0',
			left: '0',
			width: '84px', /* 84 Set width back to default */
			height: '70px', /* 70 Set height back to default */
			padding: '0'
		}, 400);
		
	isUp = false;

       }

});





});
