$(function(){
/* glovalNavigation */
	$("ul#gNavi li").hover(function(){
		var t = $(this);
		clearTimeout(this._tim2);
		this._tim1 = setTimeout(function(){
			t.find('ul').slideDown('fast').hover(
				function(){$(this).show();},
				function(){$(this).hide();}
			);
		}, 150);
	},function(){
		var t = $(this);
		clearTimeout(this._tim1);
		this._tim2 = setTimeout(function(){
			t.find('ul').hide();
		}, 300);
	});
/* footerNavigation */
	$("div#footer ul li a").hover(function(){
		$(this).parent().find('ul').slideDown('fast').hover(function(){$(this).show();},function(){$(this).hide();});
	},function(){
		$(this).parent().find('ul').hide();
	});
/* smooth scroll */
	$('a[href*=#]').click(function() {
		if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
			var target = $(this.hash);
				target = target.length && target;
				if (target.length) {
				var sclpos = 30;
				var scldurat = 1200;
				var targetOffset = target.offset().top - sclpos;
				$('html,body')
				.animate({scrollTop: targetOffset}, {duration: scldurat, easing: "backout"});
				return false;
			}
		}
	});
/* PNG for IE6 */
	if ($.browser.msie && $.browser.version < 7.0) {
		DD_belatedPNG.fix('#header h1, #siteCatch, #iconLink a, #iconLink img, #mainBanner img, .banners p, .png_bg');
	}
});
