// JavaScript Document

$(document).ready(function() {
	
	  // small ad 1 animations
	  $('div.fade1').hover(function() {
	  
		// animate big ad
		$('.bigadimg').fadeOut(150, function() {
			$(".bigadimg").attr("src","images/ahc-img-design.png");
			$('.bigadimg').fadeIn(150);
		});	
		$(".bigadurl").attr("href","creative-design-by-creative-designers.asp");
		
		// animate small ad
		var fade1 = $('> div', this);
		
		if (fade1.is(':animated')) {
		  fade1.stop().fadeTo(150, 1);
		} else {
		  fade1.fadeIn(150);
		}
	  }, function () {
		var fade1 = $('> div', this);
		if (fade1.is(':animated')) {
		  fade1.stop().fadeTo(150, 0);
		} else {
		  fade1.fadeOut(150);
		}	
	  });	
	  
	  
	  // small ad 2 animations
	  $('div.fade2').hover(function() {
	  
		// animate big ad
		$('.bigadimg').fadeOut(150, function() {
			$(".bigadimg").attr("src","images/ahc-img-printing.png");
			$('.bigadimg').fadeIn(150);
		});			
		$(".bigadurl").attr("href","printing.asp");
		
		// animate small ad
		var fade2 = $('> div', this);
		
		if (fade2.is(':animated')) {
		  fade2.stop().fadeTo(150, 1);
		} else {
		  fade2.fadeIn(150);
		}
	  }, function () {
		var fade2 = $('> div', this);
		if (fade2.is(':animated')) {
		  fade2.stop().fadeTo(150, 0);
		} else {
		  fade2.fadeOut(150);
		}			
	  });	


	  // small ad 3 animations
	  $('div.fade3').hover(function() {
	  
		// animate big ad
		$('.bigadimg').fadeOut(150, function() {
			$(".bigadimg").attr("src","images/ahc-img-distribution.png");
			$('.bigadimg').fadeIn(150);
		});
		$(".bigadurl").attr("href","leaflet-distribution-leicester-leaflet-distributors.asp");
		
		// animate small ad 
		var fade3 = $('> div', this);
		
		if (fade3.is(':animated')) {
		  fade3.stop().fadeTo(150, 1);
		} else {
		  fade3.fadeIn(150);
		}
	  }, function () {
		var fade3 = $('> div', this);
		if (fade3.is(':animated')) {
		  fade3.stop().fadeTo(150, 0);
		} else {
		  fade3.fadeOut(150);
		}			
	  });		  
	
	});
