$(document).ready(function() {
	$("body").ezBgResize({
		img     : "http://www.whatnowgrad.com/imgs/bg.jpg", // Relative path example.  You could also use an absolute url (http://...).
		opacity : 1, // Opacity. 1 = 100%.  This is optional.
		center  : true // Boolean (true or false). This is optional. Default is true.
	});
	
	$(".navigation ul li").hover(function() {
		$(this).addClass("hover");
	}, function() {
		$(this).removeClass("hover");
	});
	
	$(".navigation ul li").click(function() {
		$(".navigation ul li").removeClass("selected");		
		$(this).addClass("selected");
	});
	
	
	
});

$(function(){
	// Vertical
	$("#vertical ul li a").hover(function(){
		$("img", this).stop().animate({top:"-165px"},{queue:false,duration:200});
	}, function() {
		$("img", this).stop().animate({top:"0px"},{queue:false,duration:200});
	});
});

$(document).ready(function() {
	$("#slideshow").css("overflow", "hidden");
	
	$("ul#slides").cycle({
		fx: 'fade',
		pause: 3,
		prev: '#prev',
		next: '#next'
	});
	
	$("#slideshow").hover(function() {
    	$("ul#nav").fadeIn();
  	},
  		function() {
    	$("ul#nav").fadeOut();
  	});
  	
  	// var top = $('#side_nav ').offset().top - parseFloat($('#side_nav').css('marginTop').replace(/auto/, 0));
 // $(window).scroll(function (event) {
    // what the y position of the scroll is
   /// var y = $(this).scrollTop();
  
    // whether that's below the form
  //  if (y >= top) {
      // if so, ad the fixed class
   //   $('#side_nav ').addClass('fixed');
   // } else {
      // otherwise remove it
     // $('#side_nav ').removeClass('fixed');
   // }
  //});
  		
});

$(function() {
	$('ul.hover_block li').hover(function(){
		$(this).find('img').animate({left:'270px'},{queue:false,duration:500});
	}, function(){
		$(this).find('img').animate({left:'0px'},{queue:false,duration:500});
	});
});

$(function() {
	$('ul.rh li').hover(function(){
		$(this).find('img').animate({left:'270px'},{queue:false,duration:500});
	}, function(){
		$(this).find('img').animate({left:'0px'},{queue:false,duration:500});
	});
});



