﻿
function gid (id)
{
    return document.getElementById(id);
}

function isMail (mail)
{
    var regExp = new RegExp("[A-Za-z0-9_]+([-+.][A-Za-z0-9_]+)*@[A-Za-z0-9_]+([-.][A-Za-z0-9_]+)*\\.[A-Za-z0-9_]{2,}([-.][A-Za-z0-9_]+)*");
    var result = regExp.exec(mail);
    return (null == result) ? false : true;
}

function isNotEmpty (value)
{
    var regExp = new RegExp("(.)+");
    var result = regExp.exec(value);
    return (null == result) ? false : true;
}
function setImage(img,newimg){
	document.images[img].src=newimg;
}
jQuery.noConflict();(function($){$(document).ready(function(){
	$('.textarea1 textarea').focusin(function(){$(this).css({border:'1px solid #333'}).animate({left:'-17px',top:'-50px',width:'300px',height:'150px'}, 500);});$('.textarea1 textarea').focusout(function(){$(this).animate({left:'4px',top:'4px',width:'261px',height:'79px'}, 500).css({border:'none'});})
	$.fn.lavaLamp = function(o) {
	    o = $.extend({ fx: "linear", speed: 500, 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", 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(); }
	            ).animate({
	                width: el.offsetWidth,
	                left: el.offsetLeft
	            }, o.speed, o.fx);
	        };

	    });
	};
	$(".b-mnav").lavaLamp({  speed: 300 });
	})})
(jQuery);
