/* Author: 

*/

 function initialize() {
    var latlng = new google.maps.LatLng(51.4926406357673,-0.14077541993339);
    var myOptions = {
      zoom: 14,
      center: latlng,
      mapTypeId: google.maps.MapTypeId.ROADMAP
    };
    var map = new google.maps.Map(document.getElementById("google-map"),
        myOptions);

	var image = new google.maps.MarkerImage('img/map-icon.png',
      // This marker is 20 pixels wide by 32 pixels tall.
      new google.maps.Size(40, 57),
      // The origin for this image is 0,0.
      new google.maps.Point(0,0),
      // The anchor for this image is the base of the flagpole at 0,32.
      new google.maps.Point(20, 56));
      
	var marker = new google.maps.Marker({
        position: latlng,
        map: map,
        icon: image
    });

    $('#full-screen-image').css('position','absolute');
  }

 /* jQuery(function($){
	if ($('#contact').size()>0) {
		initialize();
	};
	
	var originalSize = $(window).height();
	var theheight = $(document).height();
	
	function checkWindow() {
		var flowersmargin = parseInt(theheight) - 300;
		//alert(flowersmargin);
		$('#flowers').css({'top':flowersmargin});
	}
	checkWindow();
	$(window).bind('resize', checkWindow);
  })*/
  

//this targets the element hat have an id called pageFooterOuter.you can use your own selector instead of that
/***function positionFooter(){
		$("#flowers").css({position: "absolute",top:($(window).scrollTop()+$(window).height()-$("#flowers").height())+"px"});	
	}

$(function(){
	positionFooter(); 
	 
	$(window)
		.scroll(positionFooter)
		.resize(positionFooter);
});
***/






 var tweet1 = function() {
		$('#tweet1').animate({'opacity':'0.6'}, 200, function() {
			$('#tweet1').animate({'opacity':'0.0', 'top':'40px'}, 900, function() {
				$('#tweet1').animate({'top':'60px'}, 10);																
			});
		});
  }
  
  var tweet2 = function() {
		$('#tweet2').delay(300).animate({'opacity':'0.6'}, 200, function() {
			$('#tweet2').animate({'opacity':'0.0', 'top':'55px'}, 900, function() {
				$('#tweet2').animate({'top':'75px'}, 10);
			});
		});  
  }
  
	$('#ani-lamp').delay(500).animate({'top':'0px'}, 400, function(){
		$('#ani-lamp').animate({'top':'-10px'}, 100);												   
	});
	
	$('#ani-bird').delay(1250).animate({'top':'0px'}, 750, 'easeOutExpo', function(){
																				   tweet1();
																				   tweet2();
																				   });
	$(document).ready(function(){
		$("a[rel^='prettyPhoto']").prettyPhoto();
	});
	
	 setInterval(function() {
        tweet1();
		tweet2();
    }, 10000);
