$(document).ready(function() {
	if($('#mailbox').length){
		defaultValue = $('#mailbox').val();
		$('#mailbox').click(function() {
			if( this.value == defaultValue ) {
				$(this).val("");
			}
		});
		$('#mailbox').blur(function() {
			if( this.value == "" ) {
				$(this).val(defaultValue);
			}
		});
	}
	if($("#search-box").length){
		defaultValue2 = $('#search-box').val();  
		$('#search-box').click(function() {
			if( this.value == defaultValue2 ) {
				$(this).val("");
			}
		});
		$('#search-box').blur(function() {
			if( this.value == "" ) {
				$(this).val(defaultValue2);
			}
		});
	}
	if($("#slider").length){
		$("#slider").easySlider({
			auto: true, 
			continuous: true,
			numeric: true
		});
	}
});

$(document).ready(function() {
	if ($('.nav .dd').length){
	$('.dd ul').append('<li> <span><span><span></span></span></span> </li>')
	$('.nav li').hover(
		function(){
			var sub = $(this).find('.dd:eq(0)');
			if( sub.length == 0 ) return false;
			
			
			if($(this).parent().parent().hasClass('dd-test')) {
				
			}
			
			sub.show();
			var t = (parseInt(sub.css('top').replace('px', '')) - 5);
			sub.hide();
			var new_t = t + 5;
			
			sub
				.css({ 'top' : t+'px' })
				.animate({ 'top' : new_t + 'px', opacity : 'show' }, 200, function(){
					$(this).css({ 'top' : new_t + 'px' });
				 });
				
				
			$(this).find('a:eq(0)').addClass('hover');
		},
		function(){
			var sub = $(this).find('.dd:eq(0)');
			
			sub.hide();
			$(this).find('a:eq(0)').removeClass('hover');
		}
	);
	
	}
});
