	$(document).ready(function(){
		$("body").css("overflow", "hidden");
		
		/*var copyright_icon= $('#copyright');
		copyright_icon.css("top",($(window).height()-30)+'px');
		$('#more_links').css("top",($(window).height()-30)+'px');
		$('#link_content').css("top",($(window).height()-30)+'px');
		$('#copyright_text').css("top",($(window).height()-30)+'px');
		$('#welcome_text').css("left",($(window).width()-503)+'px');*/
		
			
		$(function(){
		  $(".img-swap").live('click', function() {
			if ($(this).attr("class") == "img-swap") {
			  this.src = this.src.replace("_on","_off");
			} else {
			  this.src = this.src.replace("_off","_on");
			}
			$(this).toggleClass("on");
		  });
		});
		
		$('#copyrights').click(function(){
			$('#copyrighttexts').toggle();
		});
				
		 $('#more_links_img').click(function () {
			 $('#linkcontents').toggle();
		});

		$(window).resize(function() {
	  		bg_class.css("width", ($(window).width()) + 'px');
			bg_class.css("height", ($(window).height() ) + 'px');
			/*copyright_icon.css("top",($(window).height()-30)+'px');
			$('#copyright_text').css("top",($(window).height()-30)+'px');
			$('#more_links').css("top",($(window).height()-30)+'px');
			$('#link_content').css("top",($(window).height()-30)+'px');*/
			$('#welcome_text').css("left",($(window).width()-503)+'px');
		});


		
        var slider1 = $('#slider1').bxSlider({
            controls: false
        });
		var slider3 = $('#slider3').bxSlider({
            controls: false
        });
            
        $('#pre').click(function() {
            slider1.goToPreviousSlide();
			slider3.goToPreviousSlide();
            return false;
        });
        
        $('#next').click(function() {
            slider1.goToNextSlide();
			slider3.goToNextSlide();
            return false;
        });  
		        
    	$('#slider2').bxSlider({
			ticker:true,
            tickerSpeed: 8000,
			mode: 'vertical',
			tickerHover: 'true'
        });
		
		
		$("#pre_img").hover(function() {
			$(this).attr("src","images/pre_over_btn.png");
				}, function() {
			$(this).attr("src","images/pre_btn.png");
		});
		$("#next_img").hover(function() {
			$(this).attr("src","images/next_over_btn.png");
				}, function() {
			$(this).attr("src","images/next_btn.png");
		});
		
		 var copyright_icon= $('#footer');
		copyright_icon.css("top",($(window).height()-30)+'px');
		
		var tot = $('.bg').length;
		var whichImage = Math.round(Math.random()*(tot-1));
		$('.bg').each(function(idx) {
			if(idx == whichImage){
				$(this).show();
				$("#bg_text").attr("src", $(this).attr("bgtext"));
			} else { 
				$(this).hide();
			}
			
			$(this).css("width", ($(window).width()) + 'px');
			$(this).css("height", ($(window).height()) + 'px');
		});
	});

