jQuery.toggler = function(a){
	
	$(a).click(function(event){
						
							event.preventDefault();
						
							var onlineBox = $(this).parent().parent().parent().parent();
							
							var type = onlineBox.attr('id') + '-open';
							
							if(onlineBox.hasClass(type))
							{
								onlineBox.removeClass(type);
								$(this).parent().removeClass('button-open');
							}
							else							
							{
								onlineBox.addClass(type);
								$(this).parent().addClass('button-open');
								
							}
								
							$('#b-corners').css({'bottom' : document.getElementById('body').offsetHeight});
							var t = getY(document.getElementById(onlineBox.attr('id')))
							window.scrollTo(0, t - 15);
							
							}
						);
	
}

function getY(e){
	var y = 0;
	while(e){
		
		y += e.offsetTop;
		e = e.offsetParent;
		
		}
	return y;
	}