$(document).ready(function() {
	
	
		$(function () {
			$(".listado_artistas").columnize({columns: 3});

		});
		
	
		//Set default open/close settings
			$('.acc_container').hide(); //Hide/close all containers
			$('.acc_trigger:first').addClass('active').next().show(); //Add "active" class to first trigger, then show/open the immediate next container
			
			//On Click
			$('.acc_trigger').click(function(){
				if( $(this).next().is(':hidden') ) { //If immediate next container is closed...
					$('.acc_trigger').removeClass('active').next().slideUp(); //Remove all "active" state and slide up the immediate next container
					$(this).toggleClass('active').next().slideDown(); //Add "active" state to clicked trigger and slide down the immediate next container
				}
				return false; //Prevent the browser jump to the link anchor
			});	
	
		//EFECTO HOVER SOBRE EL MENU
		$('#menu li a').each(function(){	
		$(this).hover(function(){	
			$(this).addClass('hover');
			$(this).animate({left: 10}, 200);
			},
		function(){	
			$(this).removeClass('hover');
			$(this).animate({left: 0}, 200);
			});	
		});	
		
		//LOGO ROLLOVER
				$(".logo_normal").hover(
				function() {
				$(this).stop().animate({"opacity": "0"}, "slow");
				},
				function() {
				$(this).stop().animate({"opacity": "1"}, "slow");
				});
		
		  /*ROLLOVER*/
			$('#wrapper_home').children().hover(function() {
				$(this).siblings().stop().fadeTo(300,0.7);
			}, function() {
				$(this).siblings().stop().fadeTo(250,1);
			});
			
			 /*ROLLOVER STAFF*/
			$('.staff_fichas').children().hover(function() {
				$(this).siblings().stop().fadeTo(300,0.5);
			}, function() {
				$(this).siblings().stop().fadeTo(250,1);
			});
			
			
			//HORIZONTAL TOGGLE
			    lastBlock = $("#a1");
			    maxWidth = 395;
			    minWidth = 111;	
			
			    $("#wrapper_staff .residentes ul li").hover(
			      function(){
			        $(lastBlock).animate({width: minWidth+"px"}, { queue:false, duration:400 });
				$(this).animate({width: maxWidth+"px"}, { queue:false, duration:400});
				lastBlock = this;
			      }
			    );
			    
			    
			//FORMULARIO NEWSLETTER
			var selected_class = {
		      'background' : 'url(http://www.danzoo.es/wp-content/themes/danzoo_theme/images/right_arrow_p.png) no-repeat left center', 
		      'font-weight' : 'bold'
		    }
			var inactive_class = {
		      'background' : 'none', 
		      'font-weight' : 'bold'
		    }
			  $('#form_nl_baja').hide();
			  $('#muestra_nl_baja').click(function() {
				$('#muestra_nl_baja').css(selected_class);
				$('#muestra_nl_alta').css(inactive_class);
				$('#form_nl_alta').hide();
			    $('#form_nl_baja').show();
			    return false;
			  });
			  $('#muestra_nl_alta').click(function() {
				$('#muestra_nl_alta').css(selected_class);
				$('#muestra_nl_baja').css(inactive_class);
				$('#form_nl_baja').hide();
			    $('#form_nl_alta').show();
			    return false;
			  });    
					
					
			//OTRAS WEBS
			$('#blotraswebs').hide();
			  $('#acopy').mouseover(function() {
			    $('#blotraswebs').show('slow');
			    return false;
			  });
			$('#blotraswebs').mouseleave(function() {
			    $(this).hide('slow');
			    return false;
			  });		
				
			


});		//Fin de document ready
			

	//NIVOSLIDER
$(window).load(function() {
    $('#slider').nivoSlider({
        effect:'boxRainGrow', // Specify sets like: 'fold,fade,sliceDown'
        slices:15, // For slice animations
        boxCols: 8, // For box animations
        boxRows: 4, // For box animations
        animSpeed:500, // Slide transition speed
        pauseTime:8000, // How long each slide will show
        startSlide:0, // Set starting Slide (0 index)
        directionNav:true, // Next & Prev navigation
        directionNavHide:false, // Only show on hover
        controlNav:true, // 1,2,3... navigation
        controlNavThumbs:false, // Use thumbnails for Control Nav
        controlNavThumbsFromRel:false, // Use image rel for thumbs
        controlNavThumbsSearch: '.jpg', // Replace this with...
        controlNavThumbsReplace: '_thumb.jpg', // ...this in thumb Image src
        keyboardNav:true, // Use left & right arrows
        pauseOnHover:false, // Stop animation while hovering
        manualAdvance:false, // Force manual transitions
        captionOpacity:0.8, // Universal caption opacity
        prevText: 'Prev', // Prev directionNav text
        nextText: 'Next', // Next directionNav text
        beforeChange: function(){}, // Triggers before a slide transition
        afterChange: function(){}, // Triggers after a slide transition
        slideshowEnd: function(){}, // Triggers after all slides have been shown
        lastSlide: function(){}, // Triggers when last slide is shown
        afterLoad: function(){} // Triggers when slider has loaded
    });
});


	var addthis_config = {
     ui_language: "es"
	}
	var addthis_share = {
	  templates: { twitter: '{{title}} - {{url}} @dnzmaxime' }
	}


