jQuery.noConflict();

jQuery(document).ready(function() {
	
	var interval;  
	jQuery('ul#homeRotator').roundabout({
	/* debug:true */
		minOpacity: .8, // invisible!
        minScale: .8, // tiny!
		easing: 'easeOutQuad',
		duration: 1200
    }).hover(function() {
		clearInterval(interval);
	},function() {
		interval = startAutoPlay();
	});
	interval = startAutoPlay();
	function startAutoPlay() {
		return setInterval(function() {
			jQuery('ul#homeRotator').roundabout_animateToNextChild();
		}, 10000);
	};
	
	//$('ul').roundabout_animateToNextChild([int duration[, string easing]]); 
	//jQuery('ul#homeRotator').roundabout_animateToNextChild([2]); 
	
	jQuery('ul#homeRotator li').mouseover(function(event){
		//alert(this);
		if(jQuery(this).hasClass('roundabout-in-focus')){
			jQuery(this).children('.desc').slideDown(200);
		}
		
	});
	
	
	jQuery('ul#homeRotator li').mouseleave(function(event){
		jQuery(this).children('.desc').slideUp(200);
	});
	
	jQuery('.rotatorItem .desc').hide();
	jQuery('.rotatorItem .desc').css({ opacity: 0.85 });
	
	jQuery('body.category-project #content .hentry').hover(tileMouseOver,tileMouseOut);
	//jQuery('body.category-project #content .hentry').mousemove(tileMouseOver);
   });
   
function tileMouseOver(tgt){
	jQuery(this).css({ 'background-color': '#CFE3E4'});
	jQuery('ul#homeRotator').roundabout_animateToNextChild(); 
}

function tileMouseOut(tgt){
	jQuery(this).css({ 'background-color': 'transparent'});
}


