
  $(document).ready(function(){
   
    $('div#williamsburg_tab').hover(function() {
        $('div#williamsburg_tab').css('background-color',  '#3a5986' );
		 },
		 function() {
        $('div#williamsburg_tab').animate({ backgroundColor: "#05162E" }, 'fast');
		 });
	    $('div#williamsburg_tab').click(function() {
        window.location = $(this).attr("url");
		 });
		
		 $('div#yorktown_tab').hover(function() {
        $('div#yorktown_tab').css('background-color',  '#3a5986' );
		 },
		 function() {
        $('div#yorktown_tab').animate({ backgroundColor: "#05162E" }, 'fast');
		 });
	    $('div#yorktown_tab').click(function() {
        window.location = $(this).attr("url");
		 });
    
	$('div#smithfield_tab').hover(function() {
        $('div#smithfield_tab').css('background-color',  '#3a5986' );
		 },
		 function() {
        $('div#smithfield_tab').animate({ backgroundColor: "#05162E" }, 'fast');
		 });
	    $('div#smithfield_tab').click(function() {
        window.location = $(this).attr("url");
		 });
		
			$('div#gloucester_tab').hover(function() {
        $('div#gloucester_tab').css('background-color',  '#3a5986' );
		 },
		 function() {
        $('div#gloucester_tab').animate({ backgroundColor: "#05162E" }, 'fast');
		 });
	    $('div#gloucester_tab').click(function() {
        window.location = $(this).attr("url");
		 });
   
     $('a#floorplan_trigger1').click(function() {
        $('#floorplan_hide').fadeIn('fast');
		$('#slideshow2').cycle('pause');
});
	 $('.closebox').click(function() {
        $('#floorplan_hide').fadeOut('fast');
		
});
   
   
    $('a#williamsburg_trigger').click(function() {
        $('#williamsburg_highlight').animate({ backgroundColor: "#6c140b" }, 'slow');
		 $('#williamsburg_highlight').animate({ backgroundColor: "#300905" }, 3000);
});
	
	
	  $('a#yorktown_trigger').click(function() {
        $('#yorktown_highlight').animate({ backgroundColor: "#6c140b" }, 'slow');
		 $('#yorktown_highlight').animate({ backgroundColor: "#300905" }, 3000);
});
	  	  $('a#smithfield_trigger').click(function() {
        $('#smithfield_highlight').animate({ backgroundColor: "#6c140b" }, 'slow');
		 $('#smithfield_highlight').animate({ backgroundColor: "#300905" }, 3000);
});
		  	  $('a#gloucester_trigger').click(function() {
        $('#gloucester_highlight').animate({ backgroundColor: "#6c140b" }, 'slow');
		 $('#gloucester_highlight').animate({ backgroundColor: "#300905" }, 3000);
});
			  
			  
			    $('a#abbey_trigger').click(function() { window.location = $(this).attr("url");
        $('#abbey_tab').animate({ backgroundColor: "#3a5986" }, 'slow');
		 $('#abbey_tab').animate({ backgroundColor: "#05162E" }, 3000);
});
	
	
	    $('a#canterbury_trigger').click(function() { window.location = $(this).attr("url");
        $('#canterbury_tab').animate({ backgroundColor: "#3a5986" }, 'slow');
		 $('#canterbury_tab').animate({ backgroundColor: "#05162E" }, 3000);
});
		
		    $('a#chateau_trigger').click(function() { window.location = $(this).attr("url");
        $('#chateau_tab').animate({ backgroundColor: "#3a5986" }, 'slow');
		 $('#chateau_tab').animate({ backgroundColor: "#05162E" }, 3000);
});
	    $('a#windsor_trigger').click(function() { window.location = $(this).attr("url");
        $('#windsor_tab').animate({ backgroundColor: "#3a5986" }, 'slow');
		 $('#windsor_tab').animate({ backgroundColor: "#05162E" }, 3000);
});
	
	
			  
			  
			  
	
    $("#phones").hover(
      function () {
       $("#phones").animate({ 
        top: "0px"
       
      }, 1000, "easeOutCubic" );
      }, 
      function () {
        $("#phones").animate({ 
        top: "-315px"
       
      }, 500, "easeOutCubic" );
      }
    );
  ///////////
  
  
  


    $('#pause').click(function() { $('#slideshow').cycle('pause');    $('#pause').css("display","none");  $("#play").css("display","inline"); return false; });
    $('#play').click(function() { $('#slideshow').cycle('resume');  $('#play').css("display","none");  $("#pause").css("display","inline"); return false; });
   
     $('#pause').click(function() { $('#slideshow2').cycle('pause');    $('#pause').css("display","none");  $("#play").css("display","inline"); return false; });
    $('#play').click(function() { $('#slideshow2').cycle('resume');  $('#play').css("display","none");  $("#pause").css("display","inline"); return false; });
    
  
////////
$('#abbeyclick').click(function() { 
	 
		$('#the_windsor').fadeOut(800); $('#the_canterbury').fadeOut(800); $('#the_chateau').fadeOut(800); $('#the_villa').fadeOut(800);
		$('#the_abbey').fadeIn(800);
		});
	
	//////////////
$('#windsorclick').click(function() { 
	 
		$('#the_abbey').fadeOut(800); $('#the_canterbury').fadeOut(800); $('#the_chateau').fadeOut(800); $('#the_villa').fadeOut(800);
		$('#the_windsor').fadeIn(800);
		});
	
	//////////////
	$('#canterburyclick').click(function() { 
	 
		$('#the_windsor').fadeOut(800); $('#the_abbey').fadeOut(800); $('#the_chateau').fadeOut(800); $('#the_villa').fadeOut(800);
		$('#the_canterbury').fadeIn(800);
		});
	
	//////////////
	$('#chateauclick').click(function() { 
	 
		$('#the_windsor').fadeOut(800); $('#the_canterbury').fadeOut(800); $('#the_abbey').fadeOut(800); $('#the_villa').fadeOut(800);
		$('#the_chateau').fadeIn(800);
		});
	
	$('#villaclick').click(function() { 
	 
		$('#the_windsor').fadeOut(800); $('#the_canterbury').fadeOut(800); $('#the_abbey').fadeOut(800); $('#the_chateau').fadeOut(800);
		$('#the_villa').fadeIn(800);
		});
	
	//////////////
	 
	  
	 
	 
    
    $('#slideshow').cycle({
        fx:     'fade',
        speed:   1000,
        timeout: 5000,
        next:   '#next',
        prev:   '#prev'
    });

   $('#slideshow2').cycle({
        fx:     'fade',
        speed:   1000,
        timeout: 5000,
        next:   '#next',
        prev:   '#prev'
    });

  
  
  
  $('#loading').fadeOut(3000); 
  
  ///////
  });
  
  $(document).ready(function() {
	$("a.group1").fancybox({
		'zoomSpeedIn':		300, 
		'zoomSpeedOut':	300, 
		'overlayShow':		false
	});
	$("a.sitefb").fancybox({
		'zoomSpeedIn':		300, 
		'zoomSpeedOut':	300, 
		'overlayShow':		false
	});
	
	$("a.mainshow").fancybox({
		'zoomSpeedIn':		300, 
		'zoomSpeedOut':	300, 
		'overlayShow':		false
	});
	
		$("a.mainshowx").fancybox({
		'zoomSpeedIn':		300, 
		'zoomSpeedOut':	300, 
		'overlayShow':		false
	});
	$("a.post_image").fancybox({
		'zoomSpeedIn':		300, 
		'zoomSpeedOut':	300, 
		'overlayShow':		false
	});
		$("a.learnmorelink1").fancybox({
		'zoomSpeedIn':		300, 
		'zoomSpeedOut':	300, 
		'overlayShow':		false
	});
	
	$("a.post_image2").fancybox({
		'zoomSpeedIn':		300, 
		'zoomSpeedOut':	300, 
		'overlayShow':		false
	});

$('#view_large2.mainshow').click(function() { $('#slideshow2').cycle('pause');  $('#pause').css("display","none");  $("#play").css("display","inline"); });

$("a.inlinee").fancybox({
	'hideOnContentClick': false,
	'frameHeight':		410,
	'frameWidth':		400,
	 caption:   false
	});

$('div.mmedia a').media({autoplay: true});


});
  



/*$(document).ready(function() {


			$("#vt1").click(function(){$('html, body').animate({scrollTop:0}, 'slow'); 
           $("#vtPlay")
             .text("Loading ...")
            .load("http://www.villa-communities.com/wp-content/themes/villa/vt1.php")
		   return false;});
			
			$("#vt2").click(function(){$('html, body').animate({scrollTop:0}, 'slow'); 
           $("#vtPlay")
             .text("Loading ...")
            .load("http://www.villa-communities.com/wp-content/themes/villa/vt2.php")
		   return false;});
   
				$("#vt3").click(function(){$('html, body').animate({scrollTop:0}, 'slow'); 
           $("#vtPlay")
             .text("Loading ...")
            .load("http://www.villa-communities.com/wp-content/themes/villa/vt3.php")
		   return false;});
   
   	$("#vt4").click(function(){$('html, body').animate({scrollTop:0}, 'slow');  
           $("#vtPlay")
             .text("Loading ...")
            .load("http://www.villa-communities.com/wp-content/themes/villa/vt4.php")
		   return false;});
   
   	$("#vt5").click(function(){$('html, body').animate({scrollTop:0}, 'slow'); 
           $("#vtPlay")
             .text("Loading ...")
            .load("http://www.villa-communities.com/wp-content/themes/villa/vt5.php")
		   return false;});
   
   	$("#vt6").click(function(){$('html, body').animate({scrollTop:0}, 'slow'); 
           $("#vtPlay")
             .text("Loading ...")
            .load("http://www.villa-communities.com/wp-content/themes/villa/vt6.php")
		   return false;});
   

});*/