/*******



	***	$J "flash like" menu plugin by Cedric Dugas   ***

	*** Http://www.position-absolute.com ***

	

	Licenced under the MIT LICENCE

	

*****/


$J=jQuery.noConflict();
$J(document).ready(function() {

	$J(".menuFlash li a").menuZoomer({

		speed:400,

		fontColor:"#515151",

		fontSize : "200%"

		

		/*easing : "easeOutExpo"*/

	})

});



$J.fn.menuZoomer = function(settings) {

	 settings = $J.extend({

		speed:400,

		fontColor:"#515151",

		fontSize : "200%",

		lineHeight:"30px",

		easing : "easeOutExpo"

	}, settings);



	return this.each(function(){

		/* INIT CSS */

		var initlineHeight = $J(this).css("lineHeight")

		var initcolor = $J(this).css("color")

		

		/* CORRECT A BUG IN IE WHERE THE FIRST ROLLOVER WOULD FAIL*/ 

		$J(this).animate({

			fontSize: "100%",

			color:initcolor,

			lineHeight:initlineHeight

			},{duration: settings.speed, easing: "easeOutExpo"})



		/* ON CLICK STAY STATE */

		$J(this).click(function(){

			$J(".openItem").animate({

				fontSize: "100%",

				color:initcolor,

				lineHeight:initlineHeight

				},{duration:settings.speed, easing: "easeOutExpo"})

			$J(".openItem").removeClass("openItem")

			$J(this).addClass("openItem")

		})

		

		/* OVER AND ROLLOUT */

		$J(this).hover(function () {

		

			$J(this).not(":animated").animate({

				fontSize: settings.fontSize,

				color:settings.fontColor,

				lineHeight:settings.lineHeight

				},{duration: settings.speed, easing: settings.easing})

				return false;

		},

		function () {

			$J(this).not(".openItem").animate({

				fontSize: "100%",

				color:initcolor,

				lineHeight:initlineHeight

				},{duration: settings.speed, easing: "easeOutExpo"})

			});	

		})

}	


