// HEADER SLIDER
$(window).load(function() {
    $('#slider').nivoSlider({
        effect:'sliceUp', // Specify sets like: 'fold,fade,sliceDown'
        slices:1, // For slice animations
        boxCols: 0, // For box animations
        boxRows: 0, // For box animations
        animSpeed:1000, // Slide transition speed
        pauseTime:6000, // How long each slide will show
        startSlide:0, // Set starting Slide (0 index)
        directionNav:false, // Next & Prev navigation
        directionNavHide:false, // Only show on hover
        controlNav:false, // 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:true, // 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
	});
});

// TOPMENU
function mainmenu(){
	$(" #primary-nav ul ").css({display: "none"}); // Opera Fix
	$(" #primary-nav li").hover(function(){
			$(this).find('ul:first').css({visibility: "visible",display: "none"}).show(400);
			},function(){
			$(this).find('ul:first').css({visibility: "hidden"});
			});
	}

	$(document).ready(function(){					
	mainmenu();
});

// FADE
$(function() {
	// DEFAULT
	$(".fade, .social").css("opacity","0.5");
 
	// ON MOUSE OVER
	$(".fade, .social").hover(function () {
 
	$(this).stop().animate({
	opacity: 1.0
	}, "fast");
},

	// ON MOUSE OUT
	function () {
 
	$(this).stop().animate({
	opacity: 0.5
	}, "slow");
	});
});


// NO SELECT
$(function() {
	$("#carousel-wrapper, #colorbox").disableTextSelect();
});


// FOTOCAROUSEL
$(function() {
    jQuery('#carousel').jcarousel({
    	start: 3,
    	wrap: 'circular'
    });
});


// COLORBOX
$(document).ready(function(){
	$("a[rel='gallery']").colorbox({
		slideshow:false, 
		transition: 'elastic',
		maxHeight:'90%',
		maxWidth: '960px'
	});
});
