 jQuery(document).ready(function($) {
			
  //var interval;

  $('ul#slider_round').roundabout({
		//easing: 'easeInOutBack',
		//duration: 1000,
		clickToFocus: true,
		btnNext: '.next',
		btnPrev: '.previous',
		minOpacity: 1.00,
		minScale: 0.50
  }).hover(
		function() {
			//clearInterval(interval);
		},
		function() {
			//interval = startAutoPlay();
		}
	);
	
	$('.previous, .next').hover(
		function() {
			//clearInterval(interval);
		},
		function() {
			//interval = startAutoPlay();
		}
	);
	
	//var dir = "rl";
	
	$('.previous').click(
		function() {
			dir = "rl";
		}
	);
	
	$('.next').click(
		function() {
			dir = "lr";
		}
	);
	
	//interval = startAutoPlay();

	$('ul#slider_round li').focus(function() {
		var a = (typeof on[$(this).attr('id')] != 'undefined') ? on[$(this).attr('id')] : '';
		//$(this).html(a).fadeIn(200);
		
		
		var cl = "";

		if ($(this).attr("id") == "img1") {
			cl = "#de0223";
		}
		
		if ($(this).attr("id") == "img2") {
			cl = "#84a31e";
		}
		
		if ($(this).attr("id") == "img3") {
			cl = "#e97d1d";
		}
		
			
		$(this).flip({
			direction: dir,
			color: 'white',
			bgColor: cl,
			transparent: 'transparent',
			speed: 300,
			content: $(this).html(a),
			clickToFocus: false,
			dontChangeColor: true,
			onBefore: function(){
				action = false;
			},
			onAnimation: function(){ 
				action = false;
			},
			onEnd: function(){
				action = true;
			}

		});

		//$(this).html("ON");
		
	}).blur(function() {		
		//$('.big_img').fadeOut(100);
		//$(this).html("OFF");
		
		
		var b = (typeof off[$(this).attr('id')] != 'undefined') ? off[$(this).attr('id')] : '';
		$(this).html(b);

	});
	
	
  
});
/*
function startAutoPlay() {
	return setInterval(function() {
		$('ul#slider_round').roundabout_animateToNextChild();
	}, 3000);
}
*/
