// JavaScript Document
$(document).ready(function(){
						   
	$('a.email-protector').each(function(){
		var a = $(this).text();
		$(this).attr('href','mailto:' + a);
		})

	$('.click-clear').focus(function(){
		if($(this).val()==$(this).attr('title')) $(this).val('');
		})

	$('.click-clear').blur(function(){
		if($(this).val().trim()=='') $(this).val($(this).attr('title'));
		})
	
	$('a.roll-over').hover(function(){
			var src = $(this).find('img').attr('src');
			if(src.substr(src.length - 5,1)!='o')
				{
				$(this).find('img').attr('orig',$(this).find('img').attr('src'));
				$(this).find('img').attr('src',src.substr(0,src.length - 4)+'o'+src.substr(src.length - 4,4));
				}
			else $(this).find('img').attr('orig',$(this).find('img').attr('src'));
		},function(){
			$(this).find('img').attr('src',$(this).find('img').attr('orig'));
		});

//=====================================================================================
/*
								DROPDOWN MENU
*/
$('.sub_menu').hide();

function sub_hide(){
	$('.sub_menu').hide();
	$('#top_menu .active').removeClass('active');
	}
	
$('#top_menu a').hover(function(){
		if($(this).next().hasClass('sub_menu')){
			$('.sub_menu').hide();
			$('#top_menu a.active').removeClass('active');
			$(this).next().css({'top':$(this).position().top,'left':$(this).position().left});
			$(this).next().show();
			$(this).addClass('active');
			clearTimeout(mo);
			}
	},function(){
		if($(this).next().hasClass('sub_menu')){
			mo = setTimeout(sub_hide,50);
			}
	});

$('#top_menu .sub').hover(function(){
		clearTimeout(mo);
	},function(){
		mo = setTimeout(sub_hide,100);
	});



});
var scat_scroll_interval = 0;
var pscroll_interval = 0;
var mo = 0;
