<!-- Image Selector
// Cameron Gregory - http://www.bloke.com/
// http://www.bloke.com/javascript/Random/
// This line and about must remain .. then you can use it for free...
//
// ChangeLog
//
// 
// Fri Apr 30 12:40:50 EDT 1999
//   Added target.
// Sat Sep 21 16:36:47 EDT 1996
//   Added associate URL list.
//
// Fri Sep 13 18:36:20 EDT 1996
//   Created from the base of Selector()
//
// Usage:
//  RandomImage(images)
//  RandomImageLong(images,iparams)
//  RandomImageLink(images,urls)
//  RandomImageLinkLongTarget(images,urls,iparams,hparams)
//     images		is space or comma separated file list
//     urls		is space or comma separated list of url's
//     iparams		params to add to <img>
//     hparams		params to add to <a href..>

function RandomImageLong(images,iparams)
{
/* si: start index 
** i: current index
** ei: end index
** cc: current count
*/
 si = 0; 
 ci=0;
 cc=0;
 imageSet = new Array();
 ei = images.length;
  for (i=1;i<ei;i++) {
    if (images.charAt(i) == ' ' || images.charAt(i) == ',') {
      imageSet[cc] = images.substring(si,i);
      cc++;
      si=i+1;
      }
    }
  ind = Math.floor(Math.random() *cc);
  document.write("<img "+iparams+" src="+imageSet[ind]+" alt=\""+imageSet[ind]+"\" class='testimonial' width='763px' height='150'>");
}

function RandomImage(images)
{
  RandomImageLong(images," ");
}

function RandomImageLinkLongTarget(images,urls,iparams,hparams)
{
/* si: start index 
** i: current index
** ei: end index
** cc: current count
*/
 imageSet = new Array();
 urlSet = new Array();
 si = 0; 
 ci=0;
 cc=0;
 ei = images.length;
  for (i=1;i<ei;i++) {
    if (images.charAt(i) == ' ' || images.charAt(i) == ',') {
      imageSet[cc] = images.substring(si,i);
      cc++;
      si=i+1;
      }
    }
  ind = Math.floor(Math.random() *cc);
 si = 0; 
 ci=0;
 cc=0;
 ei = urls.length;
  for (i=1;i<ei && cc <=ind ;i++) {
    if (urls.charAt(i) == ' ' || urls.charAt(i) == ',') {
      urlSet[cc] = urls.substring(si,i);
      cc++;
      si=i+1;
      }
    }

  //document.write("<img "+iparams+" src="+imageSet[ind]+" alt=\""+imageSet[ind]+"\">");
  document.write("<a "+hparams+" href=\""+urlSet[ind]+"\"><img "+iparams+" src="+imageSet[ind]+" alt=\""+imageSet[ind]+"\"></a>");
}

function RandomImageLinkLong(images,urls,iparams)
{
  RandomImageLinkLongTarget(images,urls,iparams,"");
}

function RandomImageLink(images,urls)
{
  RandomImageLinkLongTarget(images,urls,"border=0","");
}

// End Script -->


// JavaScript Document
function nav(href){
 		location.href=href;
		}
$(document).ready(function(){
		
						   
          jQuery('a.fademe').click(function(){
		         // jQuery('#footer').fadeOut(900);
									
          jQuery('#black').fadeOut(900);
          setTimeout("nav('"+this.href+"')",900);
          return false;
		  
    
});
 
				   
/*	$(document.body).fadeIn(500);					   
	//$("#pageWrapper").fadeOut(1);
	$("#logo").hide(1);
	$("#headerImages").hide(1);
	$("#navWrapper").hide(1);
	$("#content").hide(1);
	$("#contentWrapper").hide(1);
	$("#black").hide(1);
	$("#logo").show(1000);
	$("#contentWrapper").animate({opacity: 1.0}, 500);
	$("#contentWrapper").fadeIn(1000);
	$("#headerImages").animate({opacity: 1.0}, 1000);
	$("#headerImages").animate({width: 'show'}, 1000);
	$("#navWrapper").animate({opacity: 1.0}, 1500);
	$("#navWrapper").animate({height: 'show'}, 1000);
	$("#content").animate({opacity: 1.0}, 2000);
	//$("#content").animate({width: 'show'}, 2000);
	$("#content").fadeIn(1500);
	$("#footer").fadeIn(1500);
	//$("#headerImages").show(1000);

	//$("#pageWrapper").show(1000);*/
	
	 //$(".headerImages").animate({opacity: 0}, 0);
 	 //$(".headerImages").animate({opacity: 0}, 3750);
	 //$(".headerImages").animate({opacity: 1.0}, 1000);
	 //$(".headerImages").fadeIn(1000);
	 //$("#pageWrapper, #footer").hide(0);
 	 //$("#pageWrapper, #footer").fadeIn(1000);
	 $("#homeBody #content img").hide(0);
   	// $("#content").hide(0);
	 $("#black").hide(0);
 	 $("#black").fadeIn(1000);
	     $('#black').fadeIn(function() {
        if ($.browser.msie)
            this.style.removeAttribute('filter');
    });


	 $("#venuesBody #black").fadeIn(1000, function() {
									   if ($.browser.msie) 
         this.style.removeAttribute('filter');
									   });
 	
 	 //$("#content img").fadeIn(5000);
	 $("#homeBody #content img").animate({opacity: 1.0}, 3750);
	
     $("#homeBody #content img").fadeIn(3000);
	 //$("#homeBody #content .testimonial").animate({opacity: 0.0}, 0);
	 //$("#homeBody #content .testimonial").animate({opacity: 1.0}, 3750);
	 //$("#homeBody #content .testimonial").fadeIn(3000);


	 
	 //   $("#venuesBody content").fadeIn(3000, function() {
     //if ($.browser.msie) 
      //   this.style.removeAttribute('filter'); 
 //}); 

	 
	 //$("#footer").hide(0);
	 //$("#homeBody #footer").animate({opacity: 1.0}, 3750);
	 //$("#footer").show(0);
	 
 	 //$("#footer").fadeIn(2000);





    generateSprites(".nav", "current-", false, 200, "fade");
	
	$('#headerImages1').cycle({
    fx:    'turnDown',
    timeout: 5000
});
	
		$('#headerImages2').cycle({
    fx:    'turnDown',
    timeout: 5400
	});
		
		$('#headerImages3').cycle({
    fx:    'turnDown',
    timeout: 5800
});
			
		$('#headerImages4').cycle({
    fx:    'turnDown',
    timeout: 6200
});
		
				$('#headerImages5').cycle({
    fx:    'turnDown',
    timeout: 4000
});
				
						$('#headerImages6').cycle({
    fx:    'turnDown',
    timeout: 4400
});




		
});

