/* #################################################################
SCRIPT NAME: core.js
WRITTEN BY: andrew @ ica
FRAMEWORK: jQuery 1.3.2
If you wish to use any of this script then feel free to do so
- include this header blurb if you want or not; its up to you.
I Usually delete it so its only fair if you want to!
################################################################# */

$(document).ready(function(){

function loadInDate(linka){

//alert(linka);
$.ajax({
    url: '/sidebars/calendar.php?dates='+linka,
    type: 'GET',
    dataType: 'html',
    timeout: 2000,
	beforeSend: function() { $('#calloading').show(); },
    complete: function() { $('#calloading').hide(); },
    error: function(){
    },
    success: function(html){
	$("#calendar").html(html);
	bindcal();
    }
}); 

}


function bindcal(){
$(".calarrow").bind("click", function(e){
		e.preventDefault();
		loadInDate($(this).attr("rel"));
    });
}

bindcal();
});
