/*//jQuery.noConflict();
jQuery.fn.hoverClass = function(c) {
    return this.each(function(){
        jQuery(this).hover( 
            function() { jQuery(this).addClass(c);  },
            function() { jQuery(this).removeClass(c); }
        );
    });
};*/

jQuery.preloadImages = function()
{
  for(var i = 0; i<arguments.length; i++)
  {
    jQuery("<img>").attr("src", arguments[i]);
  }
}

jQuery(document).ready(function($){
	jQuery(".album-photos a").fancybox();    
	jQuery("a.photobox").fancybox({
		'zoomSpeedIn':	0, 
		'zoomSpeedOut':	0,
		'overlayShow': true,
		'overlayOpacity': 0.75
	});    
	jQuery("a.youtube").fancybox({
		'zoomSpeedIn':	100, 
		'zoomSpeedOut':	100,
		'width': 480,
		'height': 385,
		'overlayShow': true,
		'overlayOpacity': 0.75
	});
	jQuery("a.popup").fancybox({
		'zoomSpeedIn':	100, 
		'zoomSpeedOut':	100,
		'width': 500,
		'height': 520,
		'type': 'iframe',
		'overlayShow': true,
		'overlayOpacity': 0.75
	});
	jQuery("a.login-popup").fancybox({
		'autoDimensions': false,
		'zoomSpeedIn':	100, 
		'zoomSpeedOut':	100,
		'width': 250,
		'height': 'auto',
		'overlayShow': true,
		'overlayOpacity': 0.75
	});
	/*jQuery(".nav li").hover(
        function(){ jQuery("ul", this).fadeIn("fast"); }, 
        function() { } 
    );
    if (document.all) {
        jQuery(".nav li").hoverClass ("sfHover");
    }*/

	$('.cycle').cycle({ 
	    fx:    'scrollRight', 
	    timeout:  3500,
	    speed: 500 
	});
	
	   	$('#sfeer-gallery').nivoSlider({
	        effect:'fold,sliceDownLeft', // Specify sets like: 'fold,fade,sliceDown'
	        slices:8, // For slice animations
	        boxCols: 2, // For box animations
	        boxRows: 4, // For box animations
	        animSpeed:500, // Slide transition speed
	        pauseTime:3500, // 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
	        keyboardNav:false, // Use left & right arrows
	        pauseOnHover:false, // Stop animation while hovering
	        manualAdvance:false, // Force manual transitions
	
	        prevText: 'Vorige', // Prev directionNav text
	        nextText: 'Volgende' // Next directionNav text
	    });
	    


 	$(".package-item").click(function () {
     	window.location = $(this).find('a').attr("href");
    });
    
 	$(".smallbox").click(function () {
     	if($(this).find('a').attr("href"))
     	window.location = $(this).find('a').attr("href");
    });
    

 	$("input.input-text, textarea.input-textarea").addClass("idle");
    $("input.input-text, textarea.input-textarea").focus(function(){
            $(this).addClass("activeField").removeClass("idle");
    }).blur(function(){
            $(this).removeClass("activeField").addClass("idle");
    });
});


function printPage() {
	window.print();
}
function switchLanguage(lang) {
    u = location.href.split('/');
    u[5] = lang;
    location.href = u.join('/');
}
