
//scroll smooser
jQuery.easing.quart = function (x, t, b, c, d) {
    return -c * ((t=t/d-1)*t*t*t - 1) + b;
};

//equal height
function equalHeight(group) {
	tallest = 0;
	group.each(function() {
		thisHeight = $(this).height();
		if(thisHeight > tallest) {
			tallest = thisHeight;
		}
	});
	group.height(tallest);
}

/* IE background */
try {
  document.execCommand("BackgroundImageCache", false, true);
} catch(err) {}


$(document).ready(function(){
//  $("#map").css("width", "100%");
//  $(".imgr").jQIR("gif","/files/images/");
  equalHeight($(".cbox1"));
  equalHeight($(".cbox2"));
  equalHeight($(".cbox3"));
  $('a[href*=#]').click(function() {
    if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'')
          && location.hostname == this.hostname) {
            var $target = $(this.hash);
            $target = $target.length && $target
            || $('[name=' + this.hash.slice(1) +']');
            if ($target.length) {
              var targetOffset = $target.offset().top;
              $('html,body')
              .animate({scrollTop: targetOffset}, 900,'quart');
             return false;
            }
    }
  });
});