// JavaScript Document
window.addEvent('domready', function() {   
									 
	
	var showMaxExp = function() {
	  divIn = new Fx.Tween($('maximumExposure'), {
        property: 'opacity',
        duration: 2000, 
        transition: Fx.Transitions.Quart.easeInOut
      });   	  
      
      divIn.start(0.0, 1.0);
	}
	
	var hideMaxExp = function() {
	  divOut = new Fx.Tween($('maximumExposure'), {
        property: 'opacity',
        duration: 2000, 
        transition: Fx.Transitions.Quart.easeInOut
      });   	  
      
      divOut.start(1.0, 0.0);
	}
	
	
	//if (document.cookie.indexOf("maxseen") < 0)		
		//{
		  // document.cookie="maxseen=yes";	
		//}
		//else
		//{		
		   initialise = new Fx.Tween($('maximumExposure'), {
          property: 'opacity',
          duration: 1, 
          transition: Fx.Transitions.Quart.easeInOut
          });   	  
      
      initialise.start(1.0, 0.0);	
		  
		//}
	
	
	
	$('maximumExposureLink').addEvent('click', showMaxExp);
	$('closeButton').addEvent('click', hideMaxExp);
	
	

   
/*    var openHtml = '<img id="close" class="closeButton" src="images/maxexp/close.jpg" alt="close"/><p>Many thanks to the wonderful businesses displaying Breastique Art on their premises during October as part of the MAXIMUM EXPOSURE Exhibition to highlight Breast Cancer Awareness Month.</p>';

    var closedHtml = '<img id="open" src="images/maxexp/maxexpsmall.jpg" alt="open"/>';
  
    var enlargeDiv = function() {
		$('maximumExposure').set('html', '');
	  var morphDiv = new Fx.Morph($('maximumExposure'), {duration: 1200});
	  morphDiv.start('.opened');
	  $('maximumExposure').set('html', '<img id="close" class="closeButton" src="images/maxexp/close.jpg" alt="close"/><p>Many thanks to the wonderful businesses displaying Breastique Art on their premises during October as part of the MAXIMUM EXPOSURE Exhibition to highlight Breast Cancer Awareness Month.</p>');	
	  $('close').addEvent('click', shrinkDiv);	
  }
  
  var shrinkDiv = function() {
	$('maximumExposure').set('html', '');
	var closeDiv = new Fx.Morph($('maximumExposure'), {duration: 1200});
	closeDiv.start('.closed');	
	//$('maximumExposure').set('html', '<img id="open" src="images/maxexp/maxexpsmall.jpg" alt="open"/>');
	
	//$('open').addEvent('click', enlargeDiv);	
	
  }
      
 
 
   $('open').addEvent('click', enlargeDiv);	*/
  
  


									 
});
