// JavaScript Document 
// something in this script pulls the page to the bottom when the profile 
// anchor is clicked, perhaps due to it being designed for the footer. 
// look into sollution asap


jQuery(function($) {
	var slide = false;
	var height = $('#profileview').height();
	$('.profile').click(function() {
		var docHeight = $(document).height();
		var windowHeight = $(window).height();
		
		//var scrollPos = docHeight - windowHeight + height; <--took out this line and no longer scrolls to bottom of page. is this the best sollution?
		
		$('#profileview').animate({ height: "toggle"}, 1000);
		if(slide == false) {
			if($.browser.opera) { //Fix opera double scroll bug by targeting only HTML.
				$('html').animate({scrollTop: scrollPos+'px'}, 1000);
			} else {
				$('html, body').animate({scrollTop: scrollPos+'px'}, 1000);
			}
                               slide = true;
		} else {
                               slide = false;
                       }
	});
});

