$(document).ready(function(){
	
	
	$('div.hideComments').css('display','none');
			
		$(".comToggle").click(function () {
		
		if ($(this).parent().siblings(".hideComments").is(":hidden")) {
			
			$(this).parent().siblings(".hideComments").slideDown("slow");
			return false;
			
		} else {
			
			$(this).parent().siblings(".hideComments").slideUp();
			return false;
			
		}
	
		});
	
		$(".hideComments").prepend('<a class="close">&nbsp;</a>');
	
		$(".close").click(function () {
	
		$(this).parent().slideUp("slow");
	
		});

	// Live Comment Preview jQuery function
		$(function() {
		$('textarea.comment').one('focus',function() {
		});
		var $comment = '';
		$('textarea.comment').keyup(function() {
		$comment = $(this).val();
		$comment = $comment.replace(/\n/g, "<br />").replace(/\n\n+/g, '<br ><br />').replace(/(<\/?)script/g,"$1noscript");
		$('div.comment-preview p.live-preview').html($comment);
		});
		});
		
		$('a[href*=#]').click(function() {
	    if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'')
	    && location.hostname == this.hostname) {
	      var $target = $(this.hash);
	      $target = $target.length && $target
	      || $('[name=' + this.hash.slice(1) +']');
	      if ($target.length) {
	        var targetOffset = $target.offset().top;
	        $('html,body')
	        .animate({scrollTop: targetOffset}, 1000);
	        
	        
			
				       
	       return false;
	      }
	    }
	 });
	 

	//$("#infoContent").dropShadow({left: 10, top: 10, blur: 9});
		
});
