$('head').append('<style type="text/css">#header #logo h1 a {opacity:0; -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";filter: alpha(opacity=0);} h2, h3, h4, h5, h6, p, li, .comment-author, .commentdate, .commentsnumber, .datecat, .editlink, .metanavlinks {visibility:hidden;}</style>');


$(document).ready(function() {
	
	if (navigator && navigator.platform && navigator.platform.match(/^(iPad|iPod|iPhone)$/)) {
		//iPhone and iPad Lazy Loading is broken :(
	}
	else {
		jQuery('.bigimage img').lazyload({
			placeholder : "/images/static/lmv-spinner.gif",  threshold : 200, effect : "fadeIn"
		});
	}

	jQuery('#header #logo h1 a').delay(1000).fadeTo(5000, 1, function() {/* Animation complete */ });

	try{
		Typekit.load({
			loading: function(data) {
				// web fonts are loading.
			},

			active: function() {
				// web fonts have loaded!
				jQuery('h1, h2, h3, h4, h5, h6, p, li, .comment-author, .commentdate, .commentsnumber, .datecat, .editlink, .metanavlinks').css('visibility','visible');
				//add .css('display','none').fadeIn(400); for a gentle fadein
			},

			inactive: function() {
				// this browser doesn't support web fonts
				jQuery('h1, h2, h3, h4, h5, h6, p, li, .comment-author, .commentdate, .commentsnumber, .datecat, .editlink, .metanavlinks').css('visibility','visible');
			}
		});
	}
	catch(e){}
});


$(window).load(function() {
	//Run anything here once the page has fully loaded
});
