	$(document).ready(function() {


			$(function () {
				if ($.browser.msie && $.browser.version < 7) return;
				
				$('#navigation li')
					.removeClass('highlight')
					.find('a')
					.append('<span class="hover" />').each(function () {
							var $span = $('> span.hover', this).css('opacity', 0);
							$(this).hover(function () {
								// on hover
								$span.stop().fadeTo(500, 1);
							}, function () {
								// off hover
								$span.stop().fadeTo(500, 0);
							});
						});
						
			});


			/*
			*   Popups
			*/
			$(function () {
			$(".iframeJuegos, #juegoResponsable").fancybox({
				'width'				:  700,
				'height'			: '85%',
		        'autoScale'     	: false,
		        'transitionIn'		: 'none',
				'transitionOut'		: 'none',
				'type'				: 'iframe'
			});


			$(".iframeVideos").fancybox({
				'width'				:  320,
				'height'			: 220,
		        'autoScale'     	: false,
		        'transitionIn'		: 'none',
				'transitionOut'		: 'none',
				'type'				: 'iframe'
			});


			$("a[rel=example_group], .iframeNews").fancybox({
			'transitionIn'	: 'none',
			'transitionOut'	: 'none',
			'titlePosition'  : 'outside',
							'width'				:  450,
							'height'			: 600



			});

			});

			$(function () {
			$("#popupMain a").fancybox();
			$("#popupMain").click();
			});

    
		/*
			*  portfolio image effect
			*/
			$(function () {
				$(document).ready(function() {
		  $("img.a").hover(
		  function() {  $(this).stop().animate({"opacity": "0.1"}, "slow");  },
		  function() {  $(this).stop().animate({"opacity": "1"}, "slow");  });
		  $("img.pthumb").hover(
		  function() {  $(this).stop().animate({"opacity": "0.1"}, "slow");  },
		  function() {  $(this).stop().animate({"opacity": "1"}, "slow");  });
					  
			});
			});

			/*mycarousel_initCallback*/
                
			function mycarousel_initCallback(carousel)
			{
				// Disable autoscrolling if the user clicks the prev or next button.
				carousel.buttonNext.bind('click', function() {
					carousel.startAuto(0);
				});
			
				carousel.buttonPrev.bind('click', function() {
					carousel.startAuto(0);
				});
			
				// Pause autoscrolling if the user moves with the cursor over the clip.
				carousel.clip.hover(function() {
					carousel.stopAuto();
				}, function() {
					carousel.startAuto();
				});
			};
			
			jQuery(document).ready(function() {
				jQuery('#mycarousel').jcarousel({
					auto: 3,
					wrap: 'circular',
					initCallback: mycarousel_initCallback
				});
			});
                


			/* Casino Tabs */
                
		$(function () {
			  $('div.casinoMenu> div').hide();
			  $('#openDiv').show();
			  $('div.casinoMenu> h3').click(function() {
			 $(this).next('div').slideToggle('fast').siblings('div:visible').slideUp('fast');
			  });
		});

			/*Calendario Next n Back*/

		$(function () {
			var tabContainers = $('div.casinoMenuInner > table');
			tabContainers.hide().filter(':first').show();
			
			$('table .tablaMes a').click(function () {
				tabContainers.hide();
				tabContainers.filter(this.hash).fadeIn('slow');
				return false;
			})
		});
		
		
			
		


		}); /*fin ready*/

