// Author:Devolux
// Author URI:http://devolux.org/

$(document).ready(function(){

//Superfish menu
//$("ul.sf-menu").supersubs().superfish(
//{
//            delay:       1000,                            // one second delay on mouseout
//            animation:   {opacity:'show'},  // fade-in and slide-down animation
//            speed:       'normal',                          // faster animation speed
//            autoArrows:  false,                           // disable generation of arrow mark-up
//            dropShadows: false                            // disable drop shadows
//        }
//);
// item 'Assoritment' niet klikbaar maken
$("ul.sf-menu li").has("ul").find("a").first().click(function() {
	return false;
});


// HOVER INTENT
function addMega(){
 $(this).find("ul").fadeIn();
}

function removeMega(){
 $(this).find("ul").fadeOut("slow");
}
var megaConfig = {    
     sensitivity: 3, 
     interval: 0, 
     over: addMega,    
     timeout: 500,   
     out: removeMega 
};
$(".sf-menu li").hoverIntent( megaConfig );

//Toggle functions
 $("#toggle-all").toggle(
                    function(){
                         $(".excerpt").hide('slow');
			 $("#toggle").attr("class","show-all");
                    }, function() {
                         $(".excerpt").show('slow');
			 $("#toggle").attr("class","hide-all");
                    });

$(".view-excerpt").click(function (event) {
	event.preventDefault();
      $(this).parents(".headline").next(".excerpt").toggle("normal");
    });



if ($('#carrousel-content').length>0) 
	$('#carrousel-content').crossSlide({
	  fade: 2, shuffle: true  }, [
	  {
		src:  'wp-content/themes/jq/img/home/home1.jpg',
		from: '100% 30% 1.4x',
		to:   '0% 100% 1x',
		time: 6
	  }, {
		src:  'wp-content/themes/jq/img/home/home2.jpg',
		from: '50% 0% 1x',
		to:   '50% 100% 1x',
		time: 6
	  }, {
		src:  'wp-content/themes/jq/img/home/home3.jpg',
		from: '0% 0% 1x',
		to:   '100% 100% 1.4x',
		time: 6
	  }
	]);

});

