$(function() {
	$("a img:not(.imgover)").hover(
	  function () {
		  $(this).stop().fadeTo("fast", 0.6);
		  return false;
	  },
	  function () {
		  $(this).stop().fadeTo("fast", 1);
	  });
		  return false;
});


$(function($) {
	var postfix = '_o';
	$('img.imgover,input.imgover').not('[src*="'+ postfix +'."]').each(function() {
		var img = $(this);
		var src = img.attr('src');
		var src_o = src.substr(0, src.lastIndexOf('.'))
		           + postfix
		           + src.substring(src.lastIndexOf('.'));
		$('<img>').attr('src', src_o);
		img.hover(function() {
			img.attr('src', src_o);
		}, function() {
			img.attr('src', src);
		});
	});
});


$(document).ready(function(){
  $('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}, 1000);
       return false;
      }
    }
  });
});
