// JavaScript Document

jQuery.noConflict();
jQuery(document).ready(function($){
	
	// 토글
	

	$("#language_bar").hide();
	 
	 $("#language_toggle").click(function () {
	 $("#language_bar").slideToggle("fast");
	});

	
	// 지도 탭

	$('.map_tabs').ready(function() {
  								  $('#fac_inchon').addClass('active');
								  $(this).next("span").addClass('active');
								  $('#factories').load('/?mid=dongbo_intro_map1');
								  	return false;
								  });
	$('.map_tabs #fac_changwon').click(function() {
								  $(this).addClass('active');
								  $(this).next("span").addClass('active');
								  $('#factories').load('/?mid=dongbo_intro_map2');
								  $(this).siblings("li").removeClass("active");								  								  
								  return false;
									});
	$('.map_tabs #fac_kyungju').click(function() {
								  $(this).addClass('active');	
								  $(this).next("span").addClass('active');
								  $('#factories').load('/?mid=dongbo_intro_map3');								  
								  $(this).siblings("li").removeClass("active");								  								  
								  return false;
											   });
	$('.map_tabs #fac_inchon2').click(function() {
								  $(this).addClass('active');
								  $(this).next("span").addClass('active');
								  $('#factories').load('/?mid=dongbo_intro_map4');
								  $(this).siblings("li").removeClass("active");								  									  
								  return false;
								  });
	$('.map_tabs #fac_inchon').click(function() {
								  $(this).addClass('active');
								  $(this).next("span").addClass('active');
								  $('#factories').load('/?mid=dongbo_intro_map1');
								  $(this).siblings("li").removeClass("active");								  									  
								  return false;
								  });
	
	
});


// Hide And Show Toggle
var cc=0
function hideShow(id) {
    if (cc==0) {
        cc=1
        document.getElementById(id).style.display="none";
    } else {
        cc=0
        document.getElementById(id).style.display="block";
    }
}

// Show And Hide Toggle
var cc=0
function showHide(id) {
    if (cc==0) {
        cc=1
        document.getElementById(id).style.display="block";
    } else {
        cc=0
        document.getElementById(id).style.display="none";
    }
}

  // 이미지 슬라이더 

	(function($) {
	$(window).bind("load", function() { 
    $("div#toritori").slideViewerPro({ 
        thumbs: 6,  
        thumbsPercentReduction: 14, 
        galBorderWidth: 0, 
        galBorderColor: "aqua", 
        thumbsTopMargin: 10, 
        thumbsRightMargin: 10, 
        thumbsBorderWidth: 5, 
        thumbsActiveBorderColor: "#49b38e", 
        thumbsActiveBorderOpacity: 0.8, 
        thumbsBorderOpacity: 0, 
        buttonsTextColor: "#707070", 
        leftButtonInner: "<img src='js/larw.gif' alt='<' />", 
        rightButtonInner: "<img src='js/rarw.gif' alt='>'/>", 
        autoslide: true,  
        typo: true 
        });     
	}); 
	})(jQuery);
