$(function () {
    $('a[rel=thickbox-frame]').each(function () {
        this.href = this.href.replace('?', '?framed=true&');
    });
    $('.side-widget h2 span').each(function() {
        var th = $(this),
            width = th.css({'display':'inline'}).width();

        th.css({'display':'block'});
        if ( width > 225 ) {
            th.addClass('extra-small');
        } else if ( width > 155 ) {
            th.addClass('small');
        };

    	th.css({
    		'padding-top': (128 - parseInt(th.height()))/2
    	});
    });
    $('.side-widget').hover(function() {
    	$(this).addClass('hover');
    }, function() {
    	$(this).removeClass('hover');
    });
});
function showCalendar(year, month, lang) {
	url = '/templates/calendar.php?' + "property_id=" + _cal_prop_id + "&year=" + year + "&month=" + month + "&lang=" + lang;
	$.ajax({
	  'url': url,
	  cache: false,
	  success: function(html) {
	  	var responseText= html;
	    var calendars = document.getElementById('calendars');
	    calendars.innerHTML = responseText;
	  }
	});
}
