$(window).load(function(){
						
	$('#slider').nivoSlider({
		effect:'fade', 
		slices:1,
		animSpeed:500, 
		pauseTime:7000, 
		directionNav:false, 
		controlNav:true, 
		keyboardNav:false, 
		pauseOnHover:false, 
		manualAdvance:false, 
        prevText: '', 
        nextText: '',
        afterLoad: function(){
			$(".nivo-controlNav").css("z-index","5000");
			var z = 1;
			$(".nivo-controlNav a").each(function(){
				$(this).css("z-index","500"+z);
				z++;
			});
			$(".nivo-controlNav").css("width",(z * 16));
		}
	});
	
	/*$("#main_services").parent("li").hover(function() {
		$("#main_services").next("ul").slideDown();
	}, function() {
		t = setTimeout(function() { $("#main_services").next("ul").slideUp(); }, 500);
	});*/
	
	$(function(){
		$("ul#navlist li").hover(function(){
			$(this).addClass("hover");
			$('ul:first',this).stop(true, true).slideToggle();
			$('ul:first',this).css('z-index', '200');
		}, function(){
			$(this).removeClass("hover");
			$('ul:first',this).stop(true, true).slideToggle();
			$('ul:first',this).css('z-index', '');
		});
	});
	
	
	var n = $(".email").val();
	var c = $(".email").css("color");
	
	$(".email").focus(function() {
		if($(this).val() == n) {
			$(this).val("").css({"color": "#000"});
		}
	}).blur(function() {
		if($(this).val() == "") {
			$(this).val(n).css({"color": c});
		}
	});
	
	$('marquee').marquee('pointer').mouseover(function () {
            $(this).trigger('stop');
        }).mouseout(function () {
            $(this).trigger('start');
        })
	
});
