function initMenu() {
    $('#right-menu ul ul').each(function(){
       var visible = false;
       if($(this).parent().hasClass('current')){

       }else{
         $(this).hide();
       }
    });

    $('#right-menu ul li a').click(
        function() {
            $(this).next().slideToggle('normal');
			$(this).parent().siblings().find('ul').slideUp('normal');
        }
     );
}
function topHover(){
	$('#menuTop li a span.tx').mouseenter(function(){
		$(this).parent().find('.bg').animate({opacity:1},300);
	});
	$('#menuTop li a span.tx').mouseleave(function(){
		$(this).parent().find('.bg').animate({opacity:0},600);
	});
};
function floater(){
	$("body").mousemove(function(e){
		var move = e.clientX  / 200;
      	$(".first").css('left', -move-6.5 + '%');
      	$(".second").css('left',-move-8.3 +'%');
      	$(".third").css('left',move-7.8 +'%');
      	$(".forth").css('left',move-5.9 +'%');
	});
}
$(document).ready(function() {
	topHover();
	initMenu();
	floater();
	$("#slideshow div").easySlider({
				prevId: 'left-nav',
				prevText: '',
				nextId: 'right-nav',
				nextText: '',
				auto: true, 
				continuous: true
			});
	
	$(function(){
  	    $('a.new-window').click(function(){
  	        window.open(this.href);
  	        return false;
  	    });
  	});
  	$(function(){
  	    $('.wtf div a').click(function(){
  	        window.open(this.href);
  	        return false;
  	    });
  	});
});

