 Shadowbox.init({players:["img","html","iframe"]}) 



function mycarousel_initCallback(carousel){
	carousel.buttonNext.bind('click', function(event) {
		//var s='';for(a in event){s+=a+' -'}alert(s)
		carousel.startAuto(0);
		event.preventDefault();
	});
	carousel.buttonPrev.bind('click', function(event) {
		carousel.startAuto(0);
		event.preventDefault();
	});
	
	// Pause autoscrolling if the user moves with the cursor over the clip.
	carousel.clip.hover(function() {
		carousel.stopAuto();
	}, function() {
		carousel.startAuto();
	});
}; 
jQuery(document).ready(function() {
    jQuery('#mycarousel').jcarousel({
        auto : 10,
		wrap : 'last',
		offset : 1, 
		size : 3, 
		start : 1,
		scroll : 1,
		buttonNextEvent : 'click',
		buttonPrevEvent : 'click',
		animation : 'slow',
		buttonNextHTML : '<a href="#"></a>',
		buttonPrevHTML : '<a href="#"></a>',
		initCallback: mycarousel_initCallback
    });
	
    jQuery('#portfolio').jcarousel({
        auto : 6,
		wrap : 'last',
		offset : 1, 
		start : 1,
		scroll : 1,
		animation : 'slow',
		buttonNextHTML : '<a href="#"></a>',
		buttonPrevHTML : '<a href="#"></a>',
		initCallback: mycarousel_initCallback 
    });	
	
	
	
	$('#logo').hover(
		function(){$(this).stop().animate({'left':'15px'}, 600)},
		function(){$(this).stop().animate({'left':'0px'}, 600)}
	);
	

	
});

String.prototype.reverse = function(){
	splitext = this.split("");
	revertext = splitext.reverse();
	reversed = revertext.join("");
	return reversed;
}


writeMailAntiSpam = 		function(extension, dominio, name){
	var mail = name.reverse()+'@'+dominio.reverse()+'.'+extension.reverse();
	document.write('<a class="email" href="mailto:'+mail+'">'+mail+'</a>')
	
}