$(document).ready(function(){
	// Clear field value when clicked
	$(".has_default_value").focus(function(){
		if ( $(this).val() == $(this).attr("title") ) { 
			$(this).val("");
		}
	});
	$(".has_default_value").blur(function(){
		if ( $(this).val() == "" ) {
			$(this).val($(this).attr("title"));
		}
	});
	// Clickable Table Rows
	$("table.clickable_rows tr.clickable_rows").hover(function(){
		$(this).addClass("hover");
	},
	function(){
		$(this).removeClass("hover");
	});
	$("table.clickable_rows tr.clickable_rows").click(function(){
		$clickable_row_url = $(this).find("td:first").find("a:first").attr("href");
		top.location = $clickable_row_url;
	});
	// Pop-Out Menu
	jQuery.browser.msie6 = jQuery.browser.msie && parseInt(jQuery.browser.version) == 6 && typeof window['XMLHttpRequest'] != "object";
	if( $.browser.msie6 ) {
	}
	else {
		$.fn.fadeIn = function(speed, callback) {
			return this.animate({opacity: 'show'}, speed, function() {
				if (jQuery.browser.msie)
				this.style.removeAttribute('filter');
				if (jQuery.isFunction(callback))
				callback();
			});
		};
		$.fn.fadeOut = function(speed, callback) {
			return this.animate({opacity: 'hide'}, speed, function() {
				if (jQuery.browser.msie)
				this.style.removeAttribute('filter');
				if (jQuery.isFunction(callback))
				callback();
			});
		};
		$(".pop_out .pop_out_content").addClass("pop_out_hidden");
		$(".pop_out").hover(function(){
			$(this).children(".pop_out_content").fadeIn(150);
		},
		function(){
			$(this).children(".pop_out_content").fadeOut(150);
		});
		$(".pop_out .pop_out_content").addClass("pop_out_hidden");
		$(".pop_out").hover(function(){
			$(this).children(".pop_out_content").fadeIn(150);
		},
		function(){
			$(this).children(".pop_out_content").fadeOut(150);
		});
	}
	// Rollovers
	$(".rollover").hover(function(){
		this.src = this.src.replace("_off","_on");
	},
	function(){
		this.src = this.src.replace("_on","_off");
	});		  
	$(".rollover").each(function(){
		rollover_src = $(this).attr("src");
		rollover_activate = rollover_src.replace(/_off/gi, "_on");
		$("<img>").attr("src", rollover_activate);
	});
	// Shadowbox
	Shadowbox.init(document.ready);
});