$(document).ready(function(){
	$(".tiptip").tipTip({maxWidth: 200, defaultPosition: 'top'});
	/*$(".tiptip").qtip({
      position: {
         corner: {
            target: 'topRight',
            tooltip: 'bottomRight'
         }
      },
      style: {
         name: 'cream',
         padding: '7px 13px',
         width: {
            max: 210,
            min: 0
         },
         tip: true
      }
   })*/
	
	$('#view_prev_month, #view_next_month').click(function() {
		var month_info = $(this).attr('rel').split(',');
		var page_status = month_info[2];
		var ps_length = page_status.length;
		var first_string;
		
		if (ps_length > 1) {
			var srch = page_status.search('&');
			first_string = page_status.substr(0,srch);
		}
		else {
			first_string = '?';
		}
		window.location = first_string+'&year='+month_info[1]+'&month='+month_info[0];
	});

	$('.no_link').click(function(event) {
		event.preventDefault();
	});
	$('.fancy_img').fancybox({
		'transitionIn'	:	'elastic',
		'transitionOut'	:	'elastic',
		'speedIn'		:	600, 
		'speedOut'		:	200,
		'overlayColor'	:	'#000',
		'overlayOpacity':	0.4,
		'overlayShow'	:	true
	});
	$(".fancy_frame").fancybox({
		'transitionIn'		: 'none',
		'transitionOut'		: 'none',
		'width'				: 560,
		'height'			: 350,
		'type'				: 'iframe',
		'overlayColor'	:	'#000',
		'overlayOpacity':	0.4,
		'overlayShow'	:	true
	});
});
