$(document).ready(
	function(){ 
		// Toggler
		$(".toggle").next().hide();
		$(".toggle").click(function(){
			if( $(this).next().is(":hidden") ) {
				$(this).next().slideDown('fast');
			} else {
				$(this).next().slideUp('fast');
			}
		});
		$(".toggleall").click(function(){
			if( $(".toggle").next().is(":hidden") ) {
				$(".toggle").next().slideDown('fast');
			} else {
				$(".toggle").next().slideUp('fast');
			}
		});
		
		// Smooth Scroller
		$('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;
				}
			}
		});
		
		$(".new").hide();
		$(".new").fadeIn('slow');
		
		$(".delete").click(function(){
			var command = $(this).attr('title');
			return confirm('Are you sure you want to ' + command + '?');
		});
	}
);