/**





*/

(function($) {

$.fn.lavaLamp = function(o) {

    o = $.extend({ fx: "linear", speed: 0, click: function(){} }, o || {});



    return this.each(function() {

		

        var me = $(this), noop = function(){},

            $back = $('<li class="back"><div class="left"></div></li>').appendTo(me),

            $li = $("li.li-parent", this), curr = $("li.current", this)[0] || $($li[0]).addClass("current")[0];

			

		

        $li.not(".back").hover(function() {

            move(this);

        }, noop);



        $(this).hover(noop, function() {

            move(curr);

        });



        $li.click(function(e) {

            setCurr(this);

            return o.click.apply(this, [e, this]);

        });



        setCurr(curr);



        function setCurr(el) {

            $back.css({ "left": el.offsetLeft +"px", "width": el.offsetWidth+"px" });

            curr = el;

        };



        function move(el) {

            $back.each(function() {

                $(this).dequeue("fx"); }

            ).animate({

                width: el.offsetWidth,

                left: el.offsetLeft

            }, o.speed, o.fx);

        };



    });

};

})(jQuery);



//----------------- BOF Vertical -----------------------------

(function($) {

$.fn.lavaVLamp = function(o) {

    o = $.extend({ fx: "linear", speed: 500, click: function(){} }, o || {});



    return this.each(function() {

		

        var me = $(this), 

        $marker = $('<li class="marker"><div class="left"></div></li>').appendTo(me),

        $li = $('li.li-parent', this),

        curr = $('li.current', this)[0] || $($li[0]).addClass('current')[0];



        $li.not('.marker').hover(function() { move(this); }, function() { move(curr); } );

//        $li.not('.marker').find('a').hover(function() { move(this.parentNode); }, function() { move(curr); } );

        $marker.css({'top': curr.offsetTop+'px'});





        function move(el) {



            $marker.each(function() {

                $(this).dequeue("fx"); }

            ).animate({

                top: el.offsetTop

            }, o.speed, o.fx);

        };



    });

};

})(jQuery);



function mainmenu(divID){

JYTC1(divID + " ul ").css({display: "none"}); // Opera Fix

JYTC1(divID + " li").hover(function(){

		JYTC1(this).find('ul:first').css({visibility: "visible",display: "none"}).show(400);

		},function(){

		

		

		 JYTC1(this).find('ul:first').css({visibility: "hidden"});

	

		});

JYTC1(divID + "  ul").bind("mouseleave",function(){

		el=JYTC1(" #firstCurrent ");

		move(el);

	});

JYTC1(divID).not(".inner").bind("mouseleave",function(){

		el=JYTC1(" #firstCurrent ");

		move(el);

	});

}


function mainmenuV(divID){

JYTC1(divID + " ul ").css({display: "none"}); // Opera Fix

JYTC1(divID + " li").hover(function(){

		JYTC1(this).find('ul:first').css({visibility: "visible",display: "none"}).show(400);

		},function(){

		 JYTC1(this).find('ul:first').css({visibility: "hidden"});

		});

JYTC1(divID + "  ul").bind("mouseleave",function(){

		el=JYTC1(" #firstCurrent ");

		//move(el);

	});

JYTC1(divID).not(".inner").bind("mouseleave",function(){

		el=JYTC1(" #firstCurrent ");

		//move(el);

	});

}

function move(el) {
		jQuery("li.back").each(function() {
			jQuery(this).dequeue(); }
		).animate({
			width: document.getElementById("firstCurrent").offsetWidth,
			left: document.getElementById("firstCurrent").offsetLeft
		}, 500, "backout");
	};

function moveV(el) {
		jQuery("li.marker").each(function() {
			jQuery(this).dequeue(); }
		).animate({
			width: document.getElementById("firstCurrent").offsetWidth,
			left: document.getElementById("firstCurrent").offsetLeft
		}, 500, "backout");
	};

