﻿/******************************************************
** Theme........: Christie Vineyards 10.04
** Title........: Home JavaScript
** Filename.....: /js/pages/home.js
** Website......: ChristieVineyards.com
**
** Author.......: Loren Dias, www.Dias.pro
** Build........: Elegance, April 2010
** Version......: 2010.04.14  16:00
*******************************************************/
/* (B)                                                */

// Script From: http://www.sohtanaka.com/web-design/greyscale-hover-effect-w-css-jquery/

$(document).ready(function() {
	
	// For Sidebar Images
	$("ul.billboards li").hover(function() { //On hover...
		
		var thumbOver = $(this).find("img").attr("src"); //Get image url and assign it to 'thumbOver'
		
		//Set a background image(thumbOver) on the &lt;a&gt; tag 
		$(this).find("a.thumb").css({'background' : 'url(' + thumbOver + ') no-repeat center bottom'});
		
		//Animate the image to 0 opacity (Fade It Out)
		$(this).find("span").stop().animate({opacity: 0}, 300);
	} , function() { //on hover out...
		
		//Animate the image back to 100% opacity (fade it back in)
		$(this).find("span").stop().animate({opacity: 1}, 300);
	});
	
	// For Theme Images
	$("ul#logo-menu li").hover(function() { //On hover...
		
		var thumbOver = $(this).find("img").attr("src"); //Get image url and assign it to 'thumbOver'
		
		//Set a background image(thumbOver) on the &lt;a&gt; tag 
		$(this).find("a.thumb").css({'background' : 'url(' + thumbOver + ') no-repeat center bottom'});
		
		//Animate the image to 0 opacity (Fade It Out)
		$(this).find("span").stop().animate({opacity: 0}, 300);
	} , function() { //on hover out...
		
		//Animate the image back to 100% opacity (fade it back in)
		$(this).find("span").stop().animate({opacity: 1}, 300);
	});
	
	
});

/* (E)                                                */
/******************************************************/
