	$(document).ready(function() {
							   
		$('#slider').nivoSlider({
		effect:'fade',
		animSpeed:350,
		pauseTime:4000,
		directionNav:true, //Next & Prev
		directionNavHide:true, //Only show on hover
		controlNav:true, //1,2,3...
		beforeChange: function(){},
		afterChange: function(){}
		});					   
	
		// footer positioning
		function getWindowHeight() {
			var windowHeight = 0;
			if (typeof(window.innerHeight) == 'number') {
				windowHeight = window.innerHeight;
			}
			else {
				if (document.documentElement && document.documentElement.clientHeight) {
					windowHeight = document.documentElement.clientHeight;
				}
				else {
					if (document.body && document.body.clientHeight) {
						windowHeight = document.body.clientHeight;
					}
				}
			}
			return windowHeight;
		}
		function setFooter() {
			if (document.getElementById) {
				var windowHeight = getWindowHeight();
				if (windowHeight > 0) {
					var contentHeight = document.getElementById('content').offsetHeight;
					var footerElement = document.getElementById('footer');
					var footerHeight  = footerElement.offsetHeight;
					if (windowHeight - (contentHeight + footerHeight) >= 0) {
						footerElement.style.top = (windowHeight - (contentHeight + footerHeight)) + 'px';
					}
					else {
						footerElement.style.top = '0px';
					}
				}
			}
		}
		window.onload = function() {
			setFooter();
		}
		window.onresize = function() {
			setFooter();
		}
		
		// hover effects

		$('.post-thumb-block').css('opacity', 0.8);
		$(".post").hover(function() {	
			$(this).find('.grid-post-wrapper').fadeTo("normal", 0.0);
			$(this).find('.post-thumb-block').fadeTo("normal", 1.0);
		},function() {
			$(this).find('.post-thumb-block').stop();
			$(this).find('.post-thumb-block').fadeTo("normal", 0.8);
			$(this).find('.grid-post-wrapper').stop();
			$(this).find('.grid-post-wrapper').fadeTo("normal", 1.0);
		});
		
		$('#link-wrapper img').css('opacity', 0.7);
		$("#link-wrapper img").hover(function() {				  
		$(this).fadeTo("fast", 1.0);
		},function() {
			$(this).stop();
			$(this).fadeTo("fast", 0.7);
		});
		
	});

	jQuery(document).ready(function($){vtip();})
	

