$(document).ready(function() {

	/* LOGO */
	$('#logo').hover(function() {
		$(this).animate({top:'0'},{duration:200});
			}, function() {
		$(this).animate({top:'-5px'},{duration:200});
	});

	/* HOME ROTATOR */
	if($("#home_images").size()) {
		$('#home_images').cycle({
			fx: 'fade',
			next: '#next', 
			prev: '#prev'
		});
	}
	
	$('#featured_products ul li:nth-child(3n)').addClass('last');

	/* FEATURED PRODUCTS ROLLOVER */
	$('#featured_products ul li a').hover(function() {
		$(".title", this).stop().animate({bottom:'0'},{queue:false,duration:200});
				}, function() {
		$(".title", this).stop().animate({bottom:'-32px'},{queue:false,duration:200});
	});
	
	/* FEATURED POSTS ROLLOVER */
	$('#featured_posts ul li a').hover(function() {
		$(".title", this).stop().animate({bottom:'0'},{queue:false,duration:200});
				}, function() {
		$(".title", this).stop().animate({bottom:'-32px'},{queue:false,duration:200});
	});
	
	/* MEDIA ROTATOR */
/*
	$('.media_images').each(function() {
		var p = this.parentNode;
		var $this = $(this), $ss = $this.closest('.media ul li');
		var next = $ss.find('.media_images');
		$(this).cycle({
			fx: 'scrollHorz',
			speed:  300,
    		next: next, 
    		timeout: 0 
		});
	});
*/

	$('.media_images').cycle({
			fx: 'scrollHorz',
			speed:  300,
   		timeout: 1000 
	});
	
	$('.media_images').cycle('pause');
	
	$('.media_images').mouseenter(function() {
		$(this).cycle('resume');
	});
	
	$('.media_images').mouseleave(function() {
		$(this).cycle('pause');
	});
	
	$('.media ul li:nth-child(3n)').addClass('last');
	
	$(".videos span").css("opacity","0");
	$(".videos span").hover(function () {
		$(this).stop().animate({ opacity: 1.0 }, "fast"); 
	},
	function () {
		$(this).stop().animate({ opacity: 0 }, "fast"); 
	});

	
});
