$(document).ready(function() {

$("#tabs").tabs();
	
$('.menu .sf-menu').append('<li class="page_item page-item-22222"><a href="http://www.heynowwhoanow.com/category/video/">Videos</a></li>');
	
$('.fadeThis').append('<span class="hover"></span>').each(function () {
var $span = $('> span.hover', this).css('opacity', 0);
$(this).hover(function () {
$span.stop().fadeTo(500, 1);
}, function () {
$span.stop().fadeTo(500, 0);
});
});

$('body.singular span.comments-link a').click(function(){
	var clabel1 = $(this).attr("title");
	clabel1 += " from article";
	pageTracker._trackEvent('Comments', 'View Comments', clabel1);
	pageTracker._setVar('Comment Interest');
});

$('body.not-singular span.comments-link a').click(function(){
	var clabel2 = $(this).attr("title");
	clabel2 += " from index";
	pageTracker._trackEvent('Comments', 'View Comments', clabel2);
	pageTracker._setVar('Comment Interest');
});

$('.download-link a').click(function(){
	var labelable = $(this).text();
	alert(labelable);
	pageTracker._trackEvent('Downloads', 'download clicked', labelable);
	pageTracker._setVar('Downloader');
});


$('input[type="text"]').addClass("idleField");
$('input[type="text"]').focus(function() {
	$(this).removeClass("idleField").addClass("focusField");
    if (this.value == this.defaultValue){ 
    	this.value = '';
	}
	if(this.value != this.defaultValue){
		this.select();
	}
});
$('input[type="text"]').blur(function() {
	$(this).removeClass("focusField").addClass("idleField");
    if ($.trim(this.value) == ''){
    	this.value = (this.defaultValue ? this.defaultValue : '');
	}
});
}); 
