jQuery.noConflict();

jQuery(window).load(function() {
								
    jQuery('#slideshow').nivoSlider({
			effect:'boxRainReverse', //fade
			slices:1,
			animSpeed:700,
			pauseTime:3000,
			directionNav:false,
			controlNav:false
		});

		 if(jQuery("a[rel*='lightbox']").length > 0){
			jQuery("a[rel*='lightbox']").fancybox({ titlePosition: 'inside' });
		}
		
		// go to top link
		//jQuery('.gototop').topLink({fadeSpeed: 500});
		
		jQuery('a#top').click(function(e){
			if(location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname){
				e.preventDefault();
				var $target = jQuery(this.hash);
				$target = $target.length && $target || jQuery('[name=' + this.hash.slice(1) +']');
				if($target.length){
					var targetOffset = $target.offset().top;
					jQuery('html,body').animate({scrollTop: targetOffset}, 1000);
					//return false;
				};
			}
		}); 
		/*
		jQuery('#accordion h3').click(function() {
			jQuery(this).next().toggle('slow');
			return false;
		}).next().hide();
		jQuery('#accordion h3').each(function(){
														  jQuery(this).next().hide();
														  });
		jQuery('#accordion > h3:last').show();
		*/
		jQuery("#accordion").accordion({ active: 2, autoHeight: false });
		jQuery(".accordion2").accordion({ active: false, autoHeight: false });
		
		noSpam();
});

function noSpam() {
    if (document.getElementById) {
		var at = "@";
	  	var links = document.getElementsByTagName('a');
	  
	  	for (var i = 0; i < links.length; i++) {
		  	var linkElem = links[i];
			
		  	if (linkElem.className == 'escape') {
		  		var mail = linkElem.firstChild; var domain = linkElem.lastChild;
		  		mail.nextSibling.firstChild.innerHTML = at;
		  		linkElem.href = "mailto:" + mail.data + at + domain.data;
		  	}
			
	  	} // End for
	  
    } // End if
}
