//scroll
$(function(){
jQuery.easing.quart = function (x, t, b, c, d) {
    return -c * ((t=t/d-1)*t*t*t - 1) + b;
};

jQuery(document).ready(function(){
    jQuery('a[href^=#],area[href^=#]').click(function() {
        if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
            var $target = jQuery(this.hash);
            $target = $target.length && $target || jQuery('[name=' + this.hash.slice(1) +']');
            if ($target.length) {
                var targetOffset = $target.offset().top;
                jQuery('html,body').animate({ scrollTop: targetOffset }, 800, 'quart');
                return false;
			}
            }
        });
    });

});

//menu
$(document).ready(function(){  
   $('#menu-area a').hover(function(){  
   $(this).stop().animate({'opacity' : '0'}, 250);  
   }, function(){$(this).stop().animate({'opacity' : '1'}, 250);});  
});


//ie6
try { document.execCommand('BackgroundImageCache', false, true); } catch(e) {}

//table
$(document).ready(function(){
  $('table tr:even').addClass('even');
});

//window open
function s_window(url,winame,width,height) {
 var param="location=no, menubar=no, status=yes, scrollbars=yes, resizable=yes, toolbar=no";
 param+=", width="+width;
 param+=", height="+height;
  window.open(url,winame,param);
}

//analytics
  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-15599218-1']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();
