/*--------------------------------------------------------------------------*
 *  
 *  blinkAnchor JavaScript Library beta 3
 *  
 *  jQuery required.
 *  
 *  MIT-style license. 
 *  
 *  2008.08.31 Written by Koji Kimura @ STARRYWORKS inc.
 *  http://www.starryworks.co.jp/
 *  
 *  2009.06.05 changed to be not depend on the "interface elements for jQuery".
 *  
 *--------------------------------------------------------------------------*/

new function() {
	function blinkAnchor() {
		$(".blinkAnchor").click(clk);
	}
	function clk(e) {
		var a = e.target;
		var i = "";
		if (a.hash && a.hash.replace('#', '')) i = a.hash;
		else if (a.href.split("#").pop()) i = "#"+a.href.split("#").pop();
		if ( i ) {
//			$(i).fadeOut(200,function(e) {$(i).fadeIn(200,function(e) {$(i).fadeOut(200,function(e) {$(i).fadeIn(200,function(e) {$(i).fadeOut(200,function(e) {$(i).fadeIn(200);});});});});});
			$("html,body").animate({scrollTop:$(i).offset().top},1200);
		}
		return false;
	}
	$(blinkAnchor);
}
