$(document).ready(function() {
	$('#mainNav a').each(function() {
		//alert(this == window.location);
		if(window.location == this.href) {
			$(this).addClass('currentPage');
		}
	});
	$('#subNav a').each(function() {
		//alert(this == window.location);
		if(window.location == this.href) {
			$(this).addClass('currentPage');
		}
	});
	
	$('#sysmsg .description').each(function() {
		$(this).parent().addClass('with-shortdesc');
	});
	
	// save widows
	$('p').each(function() {
		
	});

	var parent;
	$('a.singlelink').each(function(counter,obj) {
		var href,title;
		var oLink = obj;
		href = $(this).attr('href');
		title = $(this).attr('title');
		parent = $(this).parent();
		
		parent.attr('title',title);

		parent.mouseover(function() {
				$(this).addClass('hover');
			});
		parent.mouseout(function() {
				$(this).removeClass('hover');
			});
		
		parent.click(function() {
			location.href = href;
		});
	});
	
	/*
	var parent;
	$('a.singlelink').each(function(counter,obj) {
		var href,title;
		var oLink = obj;
		href = $(this).attr('href');
		title = $(this).attr('title');
		parent = $(this).parent();
		
		parent.attr('title',title);

		parent.mouseover(function() {
				$(this).addClass('hover');
			});
		parent.mouseout(function() {
				$(this).removeClass('hover');
			});
		
		parent.click(function() {
			location.href = href;
		});
	});
	
	
	$('#s_packages tbody tr:nth-child(even)').each(function() {
		$(this).addClass('other');
	});
	
	var default_searchq;
	$('#domain_query').each(function() {
		default_searchq = $(this).attr('value');
		$(this).focus(function() {
			if($(this).attr('value')==default_searchq)
				$(this).attr('value','');
		});
		$(this).blur(function() {
			if($(this).attr('value')=='')
				$(this).attr('value',default_searchq);
		});
	});
	*/
});