var $j = jQuery.noConflict();
     
// Use jQuery via $j(...)
$j(document).ready(function(){
	jQuery.fn.fadeToggle = function(speed, easing, callback) {
	  return this.animate({opacity: 'toggle'}, speed, easing, callback);
	};
	$j(".titles").click(function() {
		var t = this.id;
		$j("#d_" + t).fadeToggle("slow");
		$j(".desc").click(function() {
			$j(this).fadeOut();
		});
	});
        $j(".action").jHelperTip({
         trigger: "hover",
         source: "attribute",
         attrName: "title",
         opacity: 0.8,
         autoClose:true
        });

  	$j('#form_contacto').bind('submit', function() {
            if($j("#nombre").val()=="") {
                alert("Ingrese su nombre");
                return false;
            }
            if($j("#email").val()=="") {
                alert("Ingrese su email");
                return false;
            }
            if($j("#asunto").val()=="") {
                alert("Escriba un mensaje");
                return false;
            }

            $j(this).ajaxSubmit({
                target: '.ret',
                success: function () {
                        $j("#form_contacto").hide();
                        $j(".cancel").click(function() {
                                $j("#comment").fadeOut("slow");
                        });
                }
            });
            $j(".ret").html("<img src='/images/loading.gif' />");
            return false; // <-- important!
        });

});
