//***************************************************
// setting zoom and form clearance
//***************************************************

function SetZoom() {
	//--- add a colorbox wrapper for custom alerts
	var colorwrap = $("<div />").css({display: "none"});
	var color = $("<div />").attr("id", "inline_alert").appendTo(colorwrap);
	var trigger = $("<a />").attr("href", "#").attr("class", "triggerme").attr("id", "triggerme").css({display: "none"});
	$('body').append(colorwrap);
	$('body').append(trigger);
	
	//--- setup the colorboxzoom itself
	$('a.zoom').colorbox({opacity:0.5});
	$("a#mlr-alert").colorbox({opacity:0.5, width:"400px", inline:true, href:"#inline_alert"});
	//--- colorbox used for collezione collection
	$("a#triggerme").colorbox({
		opacity: 0.5, 
		inline: true, 
		href: "#inline_alert",
		onClosed: function(){$('#inline_alert').html('');}
	});	
	
}

function SetForm() {
	$('form.clear input.txt').clearingInput();
	$('form.clear textarea').clearingInput();
	$('form.ftag input.txt').fieldtag();
}

jQuery.easing.def = "easeInOutQuint";

//***************************************************
// jquery goodness
//***************************************************
$(document).ready(function() {	

	SetZoom();
	SetForm();

	$('.mainnav a.active').parent('li').addClass('hover');
	$('.files a:even').addClass('odd');

	$('#featured').nivoSlider({effect: 'fold'});


	//*********************************
	// NIEUWSLIST FUNCTIES
	//*********************************
	$('.newslist li, .utillities li').click(function(e){
		var url = $('a',this).attr('href');
		location.href = url;
		e.preventDefault();
	}).hover(function(){
		$(this).addClass('hover');
	}, function(){
		$(this).removeClass('hover');
	}).css('cursor','pointer');
	
 
	//*********************************
	// NO CLICK PREVENT DEFAULT
	//*********************************
	$('a.noclick,a.noswitch').bind('click',function(e){
		e.preventDefault();
	});
	

	//*********************************

});





