
    public = {
        
        onload: function(){
            //ui.calendar("input.calendar");
            ui.thickBox();
			var em = "robflores@" + "robertoflores.com";
			$("#em-ad").html("Email: <a href='mailto:" + em + "'>" + em + "</a>");
        },
		
		viewContent: function(obj, type, id){
			item = id;
			var Obj = $(obj);
			var ObjParent = Obj.parent();
			var ObjParentNext = ObjParent.next();
			public.collapseOthers();
			if(ObjParentNext.html() != ""){
				ObjParent.hide();
				ObjParentNext.show();
				return false;
			}
			
			ObjParent.addClass("loader");
			var pars = "do=" + type + "-get&id=" + id;
            $.ajax({
                    type: "POST",
                    url: "core/controller/ajax/ajax.controller.php",
                    data: pars,
                    success: function(msg){
                        utilities.handleAjaxResponse(msg, function(result){
							ObjParent.hide();
							ObjParentNext.html(result);
                            ObjParentNext.show();
							ui.thickBox();
							top.location = "#item" + id;
                        }); 
                    }
            }); 
		},
		
		collapseOthers: function(){
			var cont = $(this).find("div.content");
			if($(this).attr("id") != "item" + item){
				cont.hide();
				cont.prev().show().removeClass("loader");
			}
		},
		
		closeContent: function(obj){
			var parent = $(obj).parent();
			parent.hide();
			parent.prev().show();
			parent.prev().removeClass("loader");
		},
		
		lans: function(lan){
			var a = $("#languages a");
			$("#languages div").mouseover(function(){
				$(this).show();
			}).mouseout(function(){
				$(this).hide();
			});
			a.each(function(){
				var This = $(this);
				if (This.hasClass(lan)){
					This
						.prependTo("#languages")
						.addClass("selected").mouseover(function(){
							$("#languages div").show();
						}).mouseout(function(){
							$("#languages div").hide();
						});
					
				}
			});
		}
        
    }; public.onload();
	
	