﻿$(document).ready(function(){
	/*h = $('.mainArea').height() + 13;
	if ($('.sideArea').height() < h) { $('.sideArea').height(h); }*/

 initMenu();
 insImg();
 $("ul.smallImg li img").mouseover(
	 function() {
	 var imgSrc = $(this).attr('src');
	 $("div.bigImg img").attr("src", imgSrc);
	 }
 ) 
	
});

function insImg(){
 $("div.bigImg img").attr("src", $('ul.smallImg li:first img').attr('src'));
} 

function initMenu() {
  $('#menu div').hide();
  $('#menu div.first').prev('h4').addClass('current');
  $('#menu div.first').show();
  $('#menu li h4').click(
    function() {
      var checkElement = $(this).next();
      if((checkElement.is('div')) && (checkElement.is(':visible'))) {
        return false;
        }
      if((checkElement.is('div')) && (!checkElement.is(':visible'))) {
        $('#menu div:visible').slideUp('normal');
		$('#menu div:visible').prev('h4').removeClass('current');
        checkElement.slideDown('normal');
		$(this).addClass('current');
        return false;
        }
      }
    );
  }
$(window).resize(function(){					  
});
