$(function(){
        
    $('.post').disableTextSelect();
    $('div.media').css('display', 'none');
    $('img[src*=feedburner]').css('dipsplay', 'none');
    $('a[href*=.jpg]').attr('rel', 'zoombox');
    $('a[href*=.jpg]').attr('rel', 'zoombox');
    $('a[href*=.png]').attr('rel', 'zoombox');
    $('a[href*=.gif]').attr('rel', 'zoombox');
    $('a[href*="attachment"]').attr('rel', 'zoombox');
	$('a[href*=blogspot]').attr('rel', '');
    $('.post img').css('max-width', '710px');
    $('.post img').css('height', 'auto');
    $('.post iframe, .post object, .post embed').attr('width', '710px');
    tooltip();
    $("#featured").easySlider({
        vertical:	false,
        speed: 		800,
        auto:		true,
        pause:		5500,
        continuous:	true, 
        numeric: 	true,
        numericId: 	'controls'
    });
	$('.widget li').prepend('&raquo;&nbsp;&nbsp;');
	$('table#wp-calendar').attr('cellspacing', '7');
	$('table#wp-calendar').attr('width', '100%');
	$('.comment:last').addClass('last-comment');
	var tabContainers = $('div.tabs > div');
    tabContainers.hide().filter(':first').show();
    
    $('div.tabs ul.modernprofile a').click(function () {
            tabContainers.hide();
            tabContainers.filter(this.hash).show();
            $('div.tabs ul.modernprofile a').removeClass('selected');
            $(this).addClass('selected');
            return false;
    }).filter(':first').click();
    
    $(document).bind("contextmenu",function(e){
        return false;
    });

    
});

this.tooltip = function(){	
	xOffset = 50;
	yOffset = -60;		
	$("a.tooltip").hover(function(e){											  
		this.t = this.title;
		this.title = "";									  
		$("body").append("<p id='tooltip'>"+ this.t +"</p>");
		$("#tooltip")
		.css("top",(e.pageY - xOffset) + "px")
		.css("left",(e.pageX + yOffset) + "px")
		.fadeIn("fast");		
    },
	function(){
		this.title = this.t;		
		$("#tooltip").remove();
    });	
	$("a.tooltip").mousemove(function(e){
		$("#tooltip")
		.css("top",(e.pageY - xOffset) + "px")
		.css("left",(e.pageX + yOffset) + "px");
	});
};

Cufon.replace('h2.title', { fontFamily: 'modern' });
Cufon.replace('h2.tag', { fontFamily: 'modern' });
Cufon.replace('h2.post-title', {hover:true, fontFamily: 'modern' });
Cufon.replace('ul.drop', {hover:true, fontFamily: 'modern' });
Cufon.replace('h2.searchby, h2.page-title, h1.photog-profile', {hover:true, fontFamily: 'modern' });