function setUnderline(elementToApplyTo){ /*for(i=1;i<6;i++){ document.getElementById('slideButton'+i).style.textDecoration='none'; document.getElementById('slideButton'+i).style.color='#A7B2AC'; } */ document.getElementById(elementToApplyTo).style.textDecoration='underline'; document.getElementById(elementToApplyTo).style.color='#FFF'; } $(document).ready(function(){ $('#pod1Link').mouseover(function() { $('#pod1').animate({ opacity: 0.80 }, 500); }); $('#pod1Link').mouseout(function() { $('#pod1').animate({ opacity: 0 }, 1000); }); $('#pod2Link').mouseover(function() { $('#pod2').animate({ opacity: 0.80 }, 500); }); $('#pod2Link').mouseout(function() { $('#pod2').animate({ opacity: 0 }, 1000); }); $('#pod3Link').mouseover(function() { $('#pod3').animate({ opacity: 0.80 }, 500); }); $('#pod3Link').mouseout(function() { $('#pod3').animate({ opacity: 0 }, 1000); }); $('#pod4Link').mouseover(function() { $('#pod4').animate({ opacity: 0.80 }, 500); }); $('#pod4Link').mouseout(function() { $('#pod4').animate({ opacity: 0 }, 1000); }); $('#slideButton1').click(function() { $('#statement').html($('#slideText1').html()); $('#slideTrack').animate({ marginLeft: "0px" }, 1500 ); }); $('#slideButton2').click(function() { $('#statement').html($('#slideText2').html()); $('#slideTrack').animate({ marginLeft: "-980px" }, 1500 ); }); $('#slideButton3').click(function() { $('#statement').html($('#slideText3').html()); $('#slideTrack').animate({ marginLeft: "-1960px" }, 1500 ); }); $('#slideButton4').click(function() { $('#statement').html($('#slideText4').html()); $('#slideTrack').animate({ marginLeft: "-2940px" }, 1500 ); }); $('#slideButton5').click(function() { $('#statement').html($('#slideText5').html()); $('#slideTrack').animate({ marginLeft: "-3920px" }, 1500 ); }); $('#slideButton6').click(function() { $('#statement').html($('#slideText6').html()); $('#slideTrack').animate({ marginLeft: "-4900px" }, 1500 ); }); $('#slideButton7').click(function() { $('#statement').html($('#slideText7').html()); $('#slideTrack').animate({ marginLeft: "-5880px" }, 1500 ); }); $('#slideButton8').click(function() { $('#statement').html($('#slideText8').html()); $('#slideTrack').animate({ marginLeft: "-6860px" }, 1500 ); }); $("#registrationForm").submit( function () { alert('ive been submitted woohoo'); }); /* AJAX homepage newsletter signup */ $('#registerFormLink').click(function(){ $.post("/js/xhr/register.php", { username: $('#email').val(), baseUrl: '/nfs/c03/h07/mnt/81244/domains/lenyestate.com/html/' }, function(response){ $('#registerComponents').fadeOut('500',function() { $('#registerComponentsThanks').html(response); $('#registerComponentsThanks').fadeIn('500'); }); }); return false; }); /* AJAX homepage newsletter signup */ $('#retry').click(function(){ $('#registerComponentsThanks').fadeOut('500',function() { $('#registerComponents').fadeIn('500'); }); return false; }); $('#yearLeft').click(function() { var curYear = parseInt($('#yearDisplay').html()); var maxYear = parseInt($('#maxYear').html()); var minYear = parseInt($('#minYear').html()); if(curYear==(minYear+1)){ $('#yearLeft').hide(); } $('#yearRight').show(); $('#yearDisplay').html((curYear-1)); $('#availabilityCalendarScroller').animate({ marginLeft: "+=711px" }, 0 ); }); $('#yearRight').click(function() { var curYear = parseInt($('#yearDisplay').html()); var maxYear = parseInt($('#maxYear').html()); var minYear = parseInt($('#minYear').html()); if(curYear==(maxYear-1)){ $('#yearRight').hide(); } $('#yearLeft').show(); $('#yearDisplay').html((curYear+1)); $('#availabilityCalendarScroller').animate({ marginLeft: "-=711px" }, 0 ); }); $('#filmStripLeft').click(function() { var curSlide = parseInt($('#galleryCurrent').html()); var maxSlide = parseInt($('#galleryTotal').html()); if(curSlide==1){ var distanceToMove = ((maxSlide-7)*123); $('#filmStrip').animate({ marginLeft: '-='+distanceToMove+'px' }, 1000 ); $('#galleryCurrent').html((maxSlide-6)); }else{ $('#galleryCurrent').html((curSlide-1)); $('#filmStrip').animate({ marginLeft: "+=123px" }, 500 ); } }); $('#filmStripRight').click(function() { var curSlide = parseInt($('#galleryCurrent').html()); var maxSlide = parseInt($('#galleryTotal').html()); if(curSlide==(maxSlide-6)){ var distanceToMove = (0); $('#filmStrip').animate({ marginLeft: '0px' }, 1000 ); $('#galleryCurrent').html(1); }else{ $('#galleryCurrent').html((curSlide+1)); $('#filmStrip').animate({ marginLeft: "-=123px" }, 500 ); } }); /* availability ajax functionality*/ $('.tabOffAlt,.tabOnAlt').click(function(){ $('.tabOnAlt').removeClass('tabOnAlt').addClass('tabOffAlt'); $(this).removeClass('tabOffAlt').addClass('tabOnAlt'); $('#availabilityCalendarScroller').html('

