jQuery(document).ready(function() {
    var container_e = jQuery('.event-showfront');
    if (container_e.find('li').length > 0)
    {
        container_e.carousel({
            'loop' :true,
            'pagination' : false,
            'nextBtn' : null,
            'prevBtn' : null,
            'effect' : 'slide',
            'direction': 'vertical',
            'dispItems' : 3,
            'autoSlide' : true,
            'autoSlideInterval' : 4000,
            'slideEasing' : 'swing',
            'animSpeed' : 300
        });
    }

	jQuery('#dialog_agenda').dialog({
		autoOpen: false,
		show: 'blind',
		hide: 'explode',
		width: 575
	});

	jQuery('#download_agenda').click(function() {
		jQuery('#dialog_agenda').dialog('open');
		return false;
	}).hover(function() {
		jQuery(this).addClass('hover');
	}, function() {
		jQuery(this).removeClass('hover');
	});
});

var update_value = function(ele, url) {
	var date = jQuery(ele).val().split('/');
	var download = jQuery('#dialog_agenda a');

	download.attr('href', url+'?month='+date[0]+'&year='+date[1]);
}
