
// all common js code
// goes here...

$(document).ready(function() {

	$("#fullbiotext p:gt(1)").hide();
	

	$('#fullbiotext a.rm').toggle(
      function () {
        $(this).html("Hide This (X)")
        	$("#fullbiotext p:gt(1)").slideDown();
      },
      function () {
        $(this).html("Read More...");
    		$("#fullbiotext p:gt(1)").slideUp();
      }
    );    	
	
	
	// show hide for BM
	$("a#other-bm-partners").click(function () { 
		$('#benchmark-team').hide();
		$('#extended-network').hide();
		$('#other-partners').fadeIn('slow');
    });

	// show hide for BM
	$("a#show-gp").click(function () { 
		$('#other-partners').hide();
		$('#benchmark-team').fadeIn('slow');
		$('#extended-network').show();
    });

	// show hide for monthly archive
	$("a#showfullmonthly").click(function () { 
		$('#monthly').hide();
		$('#fullmonthly').fadeIn('slow');
    });

	// show hide for monthly archive
	$("a#hidefullmonthly").click(function () { 
		$('#fullmonthly').hide();
		$('#monthly').show();
    });


	$.fn.inputclearer = function() {
		return this.focus(function() {
			if( this.value == this.defaultValue ) {
				this.value = "";
			}
		}).blur(function() {
			if( !this.value.length ) {
				this.value = this.defaultValue;
			}
		});
	};
	$('input').inputclearer();

	/*
	$(function() {

	    var $sidebar   = $("#sidebar .mover"),
	        $window    = $(window),
	        offset     = $sidebar.offset(),
	        topPadding = 35;

	    $window.scroll(function() {
	        if ($window.scrollTop() > offset.top) {
	            $sidebar.stop().animate({
	                marginTop: $window.scrollTop() - offset.top + topPadding
	            }, "slow");
	        } else {
	            $sidebar.stop().animate({
	                marginTop: 0
	            });
	        }
	    });

	});
	*/

	// removing trailing comma
	// var f = $("ul#fulllist li:last");
	// f.html(f.html().replace(",", ""));


});


