Cufon.replace('h1');
Cufon.replace('h2');

(function($) {
 $.fn.textDropShadow = function() {
     return this.each(function() {
        $(this).html('<span class="jq-shadow">'+$(this).html()+'</span><span>'+$(this).html()+'</span>');
     });
 }
})(jQuery);

$(window).bind("load", function() {
	$('#content .images-container a').fancybox({ 'zoomSpeedIn': 300, 'zoomSpeedOut': 300});

	$('#navigation ul li a').textDropShadow();
	$('#navigation ul li:last').addClass('last-child');

	var windowHeight = $(window).height();
	var footerPosition = $('#footer').offset();
	var footerHeight = $('#footer').height();
	var footerPaddingTop = $('#footer').css("padding-top").replace(/[^0-9]+/,'');
	
	if (windowHeight > footerPosition.top) {
		$('#sidebar').height($('#sidebar').height() + windowHeight - footerPosition.top - footerHeight - footerPaddingTop - 10);
	}

	if($.browser.msie){
		$("select").selecteSizer();
	}
}) 