
$(document).ready(function() {

// $('.ie7 #write-vimeo, .ie8 #write-vimeo').html('<iframe src="http://player.vimeo.com/video/28507356?title=0&amp;byline=0&amp;portrait=0" width="640" height="359" frameborder="0" webkitAllowFullScreen allowFullScreen></iframe>');

$('.ie7 #write-gmaps, .ie8 #write-gmaps').html('<iframe width="489" height="425" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.co.uk/maps?f=q&amp;source=s_q&amp;hl=en&amp;geocode=&amp;q=Church+of+Christ+the+King+47+New+England+Street,+Brighton,+East+Sussex+BN1+4GQ+&amp;aq=&amp;sll=50.830553,-0.145655&amp;sspn=0.038165,0.071239&amp;vpsrc=6&amp;ie=UTF8&amp;hq=Church+of+Christ+the+King&amp;hnear=47+New+England+St,+Brighton,+East+Sussex+BN1+4GQ,+United+Kingdom&amp;t=m&amp;cid=2429872947390247635&amp;ll=50.839498,-0.133295&amp;spn=0.023036,0.041885&amp;z=14&amp;iwloc=A&amp;output=embed"></iframe>');

	$('#main').delay(800).animate({opacity: '1'}, 400);

	$('.ie8 header, .ie9 header, .not-ie header').delay(1800).animate({opacity: '1'}, 600);
	$('.header-nav li').delay(2600).animate({marginRight: '3px', width: '162px'}, 200);
	$('.not-ie .header-nav li a, .not-ie .header-nav li a:visited, .ie9 .header-nav li a, .ie9 .header-nav li a:visited').delay(3000).animate({color: '#ffffff'}, 300);
	// $('.not-ie .header-nav ul li a:hover, .ie9 .header-nav ul li a:hover').delay(3100).animate({color: '#232323'}, 300);
	$('#main article').delay(3900).animate({opacity: '1'}, 500);
	$('.home-temp').delay(3900).animate({opacity: '1'}, 500);




	// $('.not-ie #write-vimeo, .ie9 #write-vimeo').css('opacity', '0').delay(4700).html('<iframe src="http://player.vimeo.com/video/28507356?title=0&amp;byline=0&amp;portrait=0" width="640" height="359" frameborder="0" webkitAllowFullScreen allowFullScreen></iframe>').delay(500).animate({opacity: '1'}, 400);
	$('.not-ie #write-gmaps, .ie9 #write-gmaps').css('opacity', '0').delay(4700).html('<iframe width="489" height="425" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.co.uk/maps?f=q&amp;source=s_q&amp;hl=en&amp;geocode=&amp;q=Church+of+Christ+the+King+47+New+England+Street,+Brighton,+East+Sussex+BN1+4GQ+&amp;aq=&amp;sll=50.830553,-0.145655&amp;sspn=0.038165,0.071239&amp;vpsrc=6&amp;ie=UTF8&amp;hq=Church+of+Christ+the+King&amp;hnear=47+New+England+St,+Brighton,+East+Sussex+BN1+4GQ,+United+Kingdom&amp;t=m&amp;cid=2429872947390247635&amp;ll=50.839498,-0.133295&amp;spn=0.023036,0.041885&amp;z=14&amp;iwloc=A&amp;output=embed"></iframe>').delay(500).animate({opacity: '1'}, 400);



	// $('#home #free-bus-link').delay(6500).animate({backgroundColor: '#ffffff', color: '#232323'}, 150).delay(150).animate({backgroundColor: '#232323', color: '#ffffff'}, 150);



function resizeBg () {
		var windowWidth = $(window).width();
		$("#bg-fix").css('width', windowWidth+"px" ); 
}

if (window.ieCheck === 1) {
	resizeBg(); /* onload */
	$(window).resize(function(){ resizeBg(); }); /* on change */
}


});
