/* Widget - Payment Processing */
var Descripcion = {

  init:function() {

	  if ($("#descripcion").size() == 0) return;

		$("#descripcion .item").each(function(i) {

			$("#descripcion .item a.expand").eq(i).click(function() {
				$(this).parent().siblings(".content").slideDown("norma");
				$(this).siblings(".collapse").show();
				$(this).hide();
				return false;
			});

			$("#descripcion .item a.collapse").eq(i).click(function() {
			  $(this).parent().siblings(".content").slideUp("normal");
			  $(this).siblings(".expand").show();
			  $(this).hide();
			  return false;
			});
		});

		if (document.URL != null) {
			Descripcion.autoOpenDiv(document.URL);
		}
  },

	autoOpenDiv:function(_documentURL) {

		if (_documentURL.lastIndexOf("#") != -1) {

			var anchorName = _documentURL.substr(_documentURL.lastIndexOf("#") + 1, _documentURL.length - (_documentURL.lastIndexOf("#") + 1));

			if ((anchorName != null) && ($.trim(anchorName) != ""))	{

				$("#auto-expand-" + anchorName).click();
			}
		}
	}
}
$(document).ready(function(){ Descripcion.init(); });


