// JavaScript Document

window.onload = DivSize;
window.onresize = DivSize;

//changes the background image if the screen is that weird size where the bg and the main id don't align.
// fixes weirdness from the navbar when the screen is small and the navbar is at 100% 
function DivSize()
{
	if(window.innerWidth < 980)
	{
		document.getElementById("navBar").style.width = "1020px";
		document.getElementById("back").style.backgroundImage = "url(images/bodyRepeat2.jpg)";
		document.getElementById("back").style.backgroundRepeat = "repeat-x";
		
	}
	if(window.innerWidth >=980)
	{
		document.getElementById("back").style.backgroundImage = "url(images/body2.jpg)";
		document.getElementById("back").style.backgroundRepeat = "no-repeat";
		document.getElementById("navBar").style.width = "100%";
	}
		
	
}


/************************   facebook heart   **************************************/

$(function() {
			$('ul.hover_block li').hover(function(){
				$(this).find('img').animate({top:'-20px'},{queue:false,duration:400});
			}, function(){
				$(this).find('img').animate({top:'0px'},{queue:false,duration:350});
			});
		});
$(function(){
	$('ul.hover_block li').click(function(){
		$(this).find('img').animate({top:'0px'},{queue:false,duration:500});
	});
});


/*********************  Js Form errors  **********************************************/

