$(function() {
	
	$('.dropdown_frame').hover(function() {
		
		$(this).parent().addClass('selected');
		
	},
	function() {
		
		$(this).parent().removeClass('selected');
		
	});
	
	$('.fadeThis1').hover(function() {
		var fade = $('.hover1', this);
		if (fade.is(':animated')) {
			fade.stop().fadeTo(500, 1);
		} else {
			fade.fadeIn(500);
		}
	}, function () {
		var fade = $('.hover1', this);
		if (fade.is(':animated')) {
			fade.stop().fadeTo(500, 0);
		} else {
			fade.fadeOut(500);
		}
	});
	$('.hover1').empty();
	
	$('.fadeThis2').hover(function() {
		var fade = $('.hover2', this);
		if (fade.is(':animated')) {
			fade.stop().fadeTo(500, 1);
		} else {
			fade.fadeIn(500);
		}
	}, function () {
		var fade = $('.hover2', this);
		if (fade.is(':animated')) {
			fade.stop().fadeTo(500, 0);
		} else {
			fade.fadeOut(500);
		}
	});
	$('.hover2').empty();
	
	
	$('li.has_div').hover(function() {
		
		$('li.has_div').removeClass('active');
		$('div.details_box').hide();
		
		$(this).addClass('active');
		$('div.details_box', $(this)).show();
		
		//Cufon.refresh();
		
	});
	
	/*$('#slider_box').cycle({ 
		fx:    'scrollHorz',
		next: '.r_arrow',
		prev: '.l_arrow',
		after:   onAfter
	});*/
	
});

function onAfter(curr, next, opts) {
	var index = opts.currSlide;
	$('div.details_div').hide();
	$('div.details_div').eq(index).fadeIn('slow');
	
}
