$(document).ready(function(){
	$("#txt-smaller").fontscale("#text-wrapper","down");
	$("#txt-bigger").fontscale("#text-wrapper","up");

	if($(".footerScrollable .image").length)
	{
		$(window).load(function() {
			$('.footerScrollable .image img').each(function(){
				var tmp = $(this);
					tmp.css("margin-top",(230-tmp.height())/2+'px');
					tmp.css("margin-left",(150-tmp.width())/2+'px');
					tmp.fadeIn(1000);
			});
			$(".footerScrollable").scrollable({circular: true, mousewheel: true});

		});
	}

        $(window).load(function() {

            if($('#side-menu').length > 0)
            {
                    if($('#side-menu').height() < $('#page-content').height() - 363)
                            $('#side-menu').height($('#page-content').height() - 363);
            }
	});

        $('.shareButton').click(function(){
            var href = $(this).attr('href');
            window.open(href,'','width=600,height=600');
            return false;
        });

});
