jQuery.easing.easeOutQuart = function (x, t, b, c, d) {
	return -c * ((t=t/d-1)*t*t*t - 1) + b;
};


NAAN = {
	common: {
		getUrlParam: function(strParamName, currentUri) {
			currentUri = currentUri||false;
			strReturn = '';
			
			if( currentUri ) { procCurrentUri = currentUri; }
			else { procCurrentUri = location.href; }
			
			if ( procCurrentUri.indexOf("?") > -1 ){
				var strQueryString = procCurrentUri.substr(procCurrentUri.indexOf("?")).toLowerCase();
				var aQueryString = strQueryString.split("&");
				for ( var iParam = 0; iParam < aQueryString.length; iParam++ ){
					if ( aQueryString[iParam].indexOf(strParamName.toLowerCase() + "=") > -1 ) {
						var aParam = aQueryString[iParam].split("=");
						strReturn = aParam[1];
						break;
					}
				}
			}
			return unescape(strReturn);
		},
		openPopup: function(url, title, width, height) {
			if (screen.availWidth) {
				popupCenterX = screen.availWidth / 2 - width / 2;
				popupCenterY = screen.availHeight / 2 - height / 2;
			}
			else {
				popupCenterX = 0;
				popupCenterY = 0;
			}
			
			popupWindow = window.open( url, title, 'width='+width+',height='+height+',status=no,location=no,left='+popupCenterX+',top='+popupCenterY+',screenX='+popupCenterX+',screenY='+popupCenterY );
			popupWindow.focus();
			
			return false;
		},
		openPopupLink: function(linkElem) {
			popupUrl = jQuery(linkElem).attr('href');
			popupTitle = jQuery(linkElem).attr('rel');
			popupSizeRaw = jQuery(linkElem).attr('rev');
			popupWidth = 400;
			popupHeight = 400;
			
			if( popupSizeRaw ) {
				var popupSizeArr = popupSizeRaw.split(',');
				popupWidth = popupSizeArr[0];
				popupHeight = popupSizeArr[1];
			}
			
			this.openPopup( popupUrl, popupTitle, popupWidth, popupHeight );
			
			return false;
		}
	},
	layout: {
		init: function() {
			this.correctContentSidebar();
		},
		correctContentSidebar: function() {
		  var contentHeight = jQuery('#content').height();
		  var sidebarHeight = jQuery('#sidebar').height();
		  
		  if( sidebarHeight > contentHeight ) {
		  	jQuery('#content').height( sidebarHeight-15+'px' );
		  }
		  else if( sidebarHeight < contentHeight ) {
		  	jQuery('#sidebar').height( contentHeight+43+'px' );
		  }
		  
		  return;
		}
	}
}



