
function prswap(imgid,imgurl)
 { document.getElementById(imgid).src=imgurl; }

window.onload = function() {
  // Apartment Photo Gallery
  if (document.getElementById('aptgallery')) {
    window.addEvent('domready', function(){
      var myShow1 = new Slideshow.KenBurns('show1', [
	'ECA-02-GrandRoom.jpg', 'ECA-03-Pool.jpg', 'ECA-04-Volleyball.jpg', 'ECA-05-Interior.jpg', 
        'MCF-Pool.jpg',
	'Oaks-02-GrandRoom-H420.jpg', 'Oaks-03-Pool-H420.jpg','Oaks-04-Interior-H420.jpg',
	'TTP-01.jpg', 'TTP-02.jpg', 'TTP-03.jpg', 'TTP-04.jpg', 'TTP-05.jpg', 
	'MCS-01-Clubhouse-H420.jpg', 'MCS-02-GrandEntry-H420.jpg', 'MCS-03-Pool-H420.jpg','MCS-04-Interior-H420.jpg', 
	'MPR-02-GrandRoom.jpg', 'MPR-03-Interior.jpg','MPR-04-Exteriors.jpg'
                                            ], { controller: false, thumbnails: true, random: true, hu: '/gallery/apartments/', transition: 'back:in:out', width: 500, height: 260, delay: 2500, duration: 1200 });
     });
   }   

  // Active Adult Community Photo Gallery
  if (document.getElementById('activeadultgallery')) {
    window.addEvent('domready', function(){
      var myShow1 = new Slideshow.KenBurns('show1', [
	'BMK-01.jpg','BMK-02.jpg','BMK-03.jpg','BMK-04.jpg','BMK-05.jpg','BMK-06.jpg',
	'MST-01.jpg','MST-02.jpg','MST-03.jpg','MST-04.jpg','MST-05.jpg','MST-06.jpg',
	'BMD-01.jpg','BMD-02.jpg','BMD-03.jpg','BMD-04.jpg','BMD-05.jpg','BMD-06.jpg','BMD-07.jpg'
                                            ], { controller: false, thumbnails: true, random: true, hu: '/gallery/active-adult-gallery/', transition: 'back:in:out', width: 500, height: 260, delay: 2500, duration: 1200 });
     });
   }   

  // Single Family Home Gallery
  if (document.getElementById('homegallery')) {
    window.addEvent('domready', function(){
      var myShow1 = new Slideshow.KenBurns('show1', [
	'CLC-01.jpg','CLC-02.jpg','CLC-03.jpg','CLC-04.jpg',
        'MCH-N-02.jpg','MCH-N-03.jpg','MCH-N-04.jpg',
        'GG-01.jpg','GG-02.jpg','GG-03.jpg','GG-04.jpg',
	'AP-01.jpg','AP-02.jpg','AP-04.jpg','AP-05.jpg','AP-06.jpg',
        'TTP-01.jpg','TTP-02.jpg','TTP-03.jpg','TTP-04.jpg',
        'MCH-J-01.jpg','MCH-J-02.jpg','MCH-J-03.jpg','MCH-J-04.jpg',
	'MCH-S1-01.jpg','MCH-S1-02.jpg','MCH-S1-03.jpg',
        'MCH-S2-01.jpg','MCH-S2-02.jpg','MCH-S2-03.jpg',
        'MCH-C-01.jpg','MCH-C-02.jpg','MCH-C-03.jpg','MCH-C-04.jpg',
        'MK-01.jpg','MK-02.jpg'
                                            ], { controller: false, thumbnails: true, random: true, hu: '/gallery/single-family-homes/', transition: 'back:in:out', width: 500, height: 260, delay: 2500, duration: 1200 });
     });
   }   

  // Hotel / Resorts
  if (document.getElementById('commercialgallery')) {
    window.addEvent('domready', function(){
      var myShow1 = new Slideshow.KenBurns('show1', [
	'01-Hilton.jpg','02-Embassy_Suites.jpg','03-Lounge.jpg','04-Lobby.jpg','05-HolidayInn.jpg','06-Food.jpg','07-Sunset.jpg','09-Cascades.jpg',
        'MK-Vegas01.jpg','MK-Vegas02.jpg','MK-Vegas03.jpg','MK-Vegas04.jpg','MK-Vegas05.jpg','MK-Vegas06.jpg',
        '10-GolfDining.jpg','11-CascadesDining.jpg','12-CigarLounge.jpg','13-WineCellar.jpg','16-Patio.jpg'
                                            ], { controller: false, thumbnails: true, random: true, hu: '/gallery/hotels-and-resorts/', transition: 'back:in:out', width: 500, height: 260, delay: 2500, duration: 1200 });
     });
   }   

  // Front Page Slider
  if (document.getElementById('rotatoritems')) { 
    window.addEvent('domready', function(){
      new SlideItMoo({overallContainer: 'rotator', elementScrolled: 'rotatorinner', thumbsContainer: 'rotatoritems',
                      itemsVisible:1, itemsSelector: '.banner', showControls:0, autoSlide: 3000, transition: Fx.Transitions.Sine.easeOut, duration: 500, direction: 1 }); 
     });
   }
 }


function updatePricing(thisForm) {
  var x = document.getElementById('total');
  var total = 0;
  for (i=0;i<thisForm.length;i++) {
    if (thisForm[i].type=="checkbox") {
      if (thisForm[i].checked) {
        total += Number(thisForm[i].value.substring(thisForm[i].value.indexOf(";")+1));;
       }      
     }
   } 
  thisForm['total'].value = total;
 }