// remap jQuery to $
(function($){})(window.jQuery);

// JQUERY SMOOTH SCROLL EFFECT
$(document).ready(function() {
	$('a.anchor[href*=#]').bind("click", function(event) {
		event.preventDefault();
		var ziel = $(this).attr("href");

		$('html,body').animate({
			scrollTop: $(ziel).offset().top
		}, 2000 , function (){location.hash = ziel;});
});
return false;
});


/* trigger when page is ready */
$(document).ready(function (){

	//MOSAIC
	$('.fade').mosaic();
	$('.bar').mosaic({
		animation	:	'slide'		//fade or slide
	});
		
	//TOOGLE SIDEBAR
	$('aside .box_content ul li ul').hide();
	$('aside .box_content ul li a').click(function() {
		  $(this).next().slideToggle('normal');
		  if($(this).children('em').html() == '+'){$(this).children('em').html("-");}
		  else {$(this).children('em').html("+");}
	  }
	);
	  
	//TOOLTIPPS
	$("a.infotip").easyTooltip();


	//OPTISHARE
	$('.togglebox').hide();
	$('.toggle').click(function() {
		  $('.togglebox').slideToggle('600');
		  if($(this).html() == '+'){$(this).html("-");}
		  else {$(this).html("+");}
	  }
	);

});
