/*
 * SimpleModal Basic Modal Dialog
 * http://www.ericmmartin.com/projects/simplemodal/
 * http://code.google.com/p/simplemodal/
 *
 * Copyright (c) 2009 Eric Martin - http://ericmmartin.com
 *
 * Licensed under the MIT license:
 *   http://www.opensource.org/licenses/mit-license.php
 *
 * Revision: $Id: basic.js 212 2009-09-03 05:33:44Z emartin24 $
 *
 *
*/
$(document).ready(function () {
	$('a.modalCloseImg simplemodal-close').click(function (e) {
		//e.preventDefault();
		$('#project-modal-content').html("");
	});
    
	$("#basic-modal a.basi").click(function(e){
        e.preventDefault();
		
        var id = $(this).attr("id");
        id = id.split("_");

        jQuery.ajax({
            type: "GET",
            dataType: "html",
            url: './project.php?id=' + id[1],
            timeout: 45000,   
            error: function() { alert("Failed to submit - "); },
            success: function(r) {
				//alert(r);
                $('#project-modal-content').html(r);
                $('#project-modal-content').modal();
            }
        })
        return false;
});
});

