$(document).ready(
	function ()
	{
		$(document).delegate('.success-div, .error-ul', 'click',
			function (e)
			{
				var $this = $(this);
				$this.parent().animate(
					{
						height: 'hide',
						opacity: 0
					},
					{
						duration: 700
					}
				);
			}
		);
		
		var windowLoc = window.location.href;
		windowLoc = windowLoc.substring(0, windowLoc.indexOf('/', 9));
		
		$('a').each(
			function (index, item)
			{
				var $this = $(this);
				var href = $this.attr('href');
				var target = $this.attr('target');
				
				if(-1 === href.indexOf(windowLoc) && (0 === href.indexOf('http://') || 0 === href.indexOf('https://')))
				{
					if(!target)
					{
						$this.attr('target','_blank');
					}
				}
			}
		);
	}
);

