window.log=function(){log.history=log.history||[];log.history.push(arguments);if(this.console){arguments.callee=arguments.callee.caller;var a=[].slice.call(arguments);(typeof console.log==="object"?log.apply.call(console.log,console,a):console.log.apply(console,a))}};
(function(b){function c(){}for(var d="assert,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,timeStamp,profile,profileEnd,time,timeEnd,trace,warn".split(","),a;a=d.pop();){b[a]=b[a]||c}})((function(){try
{console.log();return window.console;}catch(err){return window.console={};}})());


//ROTARY
(function(j){j.fn.extend({rotary:function(k){k=j.extend({auto:{interval:3E3},changer:"img",subchanger:false,control:{ind:false,arrows:false},onstage:{opacity:1},offstage:{opacity:0},ext:{queue:false,duration:500,easing:"swing"},hash:false},k);return this.each(function(){function f(g){e.children(a.changer).animate(a.offstage,{queue:a.ext.queue,easing:a.ext.easing,duration:a.ext.duration}).eq(g).animate(a.onstage,{queue:a.ext.queue,easing:a.ext.easing,duration:a.ext.duration});if(typeof a.subchanger== "object"){a.subchanger.container.eq(g).children(a.subchanger.element).css(a.subchanger.offstage).eq(0).css(a.subchanger.onstage);clearInterval(m);h=0;var n=a.subchanger.container.eq(g).children(a.subchanger.element).length-1;m=setInterval(function(){if(h>=n)h=0;else h++;var o=h;a.subchanger.container.eq(g).children(a.subchanger.element).animate(a.subchanger.offstage,{queue:a.subchanger.ext.queue,easing:a.subchanger.ext.easing,duration:a.subchanger.ext.duration}).eq(o).animate(a.subchanger.onstage, {queue:a.subchanger.ext.queue,easing:a.subchanger.ext.easing,duration:a.subchanger.ext.duration})},a.subchanger.interval)}typeof a.control.ind.onclass=="string"&&a.control.ind.element.removeClass(a.control.ind.onclass).eq(g).addClass(a.control.ind.onclass)}var a=k,e=j(this),i,m,d,h,b=false,c={auto:typeof a.auto,control:typeof a.control,changer:typeof a.changer,ind:typeof a.control.ind,arrows:typeof a.control.arrows,onclass:typeof a.control.ind.onclass};if(e.children(a.changer).length)var l=e.children(a.changer).length- 1;if(a.hash&&location.hash){first=location.hash.substr(1);if(first>e.children(a.changer).length)first=e.children(a.changer).length}else first=1;d=first-1;if(c.changer=="string"){e.children(a.changer).css(a.offstage).eq(first-1).css(a.onstage);f(0);c.onclass=="string"&&a.control.ind.element.removeClass(a.control.ind.onclass).eq(0).addClass(a.control.ind.onclass)}if(c.auto=="object"&&c.changer=="string"){d=first;i=setInterval(function(){f(d);if(d==l)d=0;else d++},a.auto.interval)}if(c.control=="object"&& c.changer=="string"){c.ind=="object"&&a.control.ind.element.bind(a.control.ind.binding,function(){c.auto=="object"&&clearInterval(i);ti=a.control.ind.element.index(this);if(c.arrows=="object")b=ti;f(ti);return false});if(c.arrows=="object"){a.control.arrows.nxt.bind(a.control.arrows.binding,function(){if(c.auto=="object"&&b===false){clearInterval(i);b=d}else{if(b===false)b=a.hash?d:0;if(b==l)b=0;else b++}f(b);return false});a.control.arrows.prv.bind(a.control.arrows.binding,function(){if(c.auto== "object"&&b===false){clearInterval(i);b=d}else{if(b===false)b=a.hash?d:0;if(b==0)b=l;else b--}f(b);return false})}}})}})})(jQuery);


//LAVALAMP
/**
 * LavaLamp - A menu plugin for jQuery with cool hover effects.
 * @requires jQuery v1.1.3.1 or above
 *
 * http://gmarwaha.com/blog/?p=7
 *
 * Copyright (c) 2007 Ganeshji Marwaha (gmarwaha.com)
 * Dual licensed under the MIT and GPL licenses:
 * http://www.opensource.org/licenses/mit-license.php
 * http://www.gnu.org/licenses/gpl.html
 *
 * Version: 0.1.0
 */

/**
 * Creates a menu with an unordered list of menu-items. You can either use the CSS that comes with the plugin, or write your own styles 
 * to create a personalized effect
 *
 * The HTML markup used to build the menu can be as simple as...
 *
 *       <ul class="lavaLamp">
 *           <li><a href="#">Home</a></li>
 *           <li><a href="#">Plant a tree</a></li>
 *           <li><a href="#">Travel</a></li>
 *           <li><a href="#">Ride an elephant</a></li>
 *       </ul>
 *
 * Once you have included the style sheet that comes with the plugin, you will have to include 
 * a reference to jquery library, easing plugin(optional) and the LavaLamp(this) plugin.
 *
 * Use the following snippet to initialize the menu.
 *   $(function() { $(".lavaLamp").lavaLamp({ fx: "backout", speed: 700}) });
 *
 * Thats it. Now you should have a working lavalamp menu. 
 *
 * @param an options object - You can specify all the options shown below as an options object param.
 *
 * @option fx - default is "linear"
 * @example
 * $(".lavaLamp").lavaLamp({ fx: "backout" });
 * @desc Creates a menu with "backout" easing effect. You need to include the easing plugin for this to work.
 *
 * @option speed - default is 500 ms
 * @example
 * $(".lavaLamp").lavaLamp({ speed: 500 });
 * @desc Creates a menu with an animation speed of 500 ms.
 *
 * @option click - no defaults
 * @example
 * $(".lavaLamp").lavaLamp({ click: function(event, menuItem) { return false; } });
 * @desc You can supply a callback to be executed when the menu item is clicked. 
 * The event object and the menu-item that was clicked will be passed in as arguments.
 */

(function($) {
$.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-menu-item")[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-20)+"px", "width": (el.offsetWidth+40)+"px" });
            curr = el;
        };

        function move(el) {
            $back.each(function() {
                $.dequeue(this, "fx"); }
            ).animate({
                width: (el.offsetWidth+40),
                left: (el.offsetLeft-20)
            }, o.speed, o.fx);
        };

    });
};
})(jQuery);

//COLORS
(function(d){function f(b){var a;return b&&b.constructor==Array&&b.length==3?b:(a=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(b))?[parseInt(a[1]),parseInt(a[2]),parseInt(a[3])]:(a=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(b))?[parseFloat(a[1])*2.55,parseFloat(a[2])*2.55,parseFloat(a[3])*2.55]:(a=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(b))?[parseInt(a[1],16),parseInt(a[2],16),parseInt(a[3],16)]:
(a=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(b))?[parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16),parseInt(a[3]+a[3],16)]:h[d.trim(b).toLowerCase()]}d.each("backgroundColor,borderBottomColor,borderLeftColor,borderRightColor,borderTopColor,color,outlineColor".split(","),function(b,a){d.fx.step[a]=function(c){if(c.state==0){var b;b=c.elem;var g=a,e;do{e=d.curCSS(b,g);if(e!=""&&e!="transparent"||d.nodeName(b,"body"))break;g="backgroundColor"}while(b=b.parentNode);b=f(e);c.start=b;c.end=f(c.end)}c.elem.style[a]=
"rgb("+[Math.max(Math.min(parseInt(c.pos*(c.end[0]-c.start[0])+c.start[0]),255),0),Math.max(Math.min(parseInt(c.pos*(c.end[1]-c.start[1])+c.start[1]),255),0),Math.max(Math.min(parseInt(c.pos*(c.end[2]-c.start[2])+c.start[2]),255),0)].join(",")+")"}});var h={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,
0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,
203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0]}})(jQuery);

//POPUP MASK
$(function(){$("body").append("<div class='pgewrapper'><div class='pgemask'></div><div class='pgecontainer'></div></div>");$(".pgemask").fadeTo(400,0.8);$(window).bind("resize",function(){$(".pgecontainer").pgeConCen()});$.fn.PgeMask=function(a){$(".pgecontainer").html($(this).html());$(".pgewrapper").show();$(".pgemask").fadeIn(300,function(){$(".pgecontainer").fadeIn(300,function(){if(jQuery.browser.msie){$(this).get(0).style.removeAttribute("filter")}}).pgeConCen();if(a!=undefined){a()}})};$.fn.PgeUnloadmask=function(){$(".pgecontainer").fadeOut(300,function(){$(".pgemask").fadeOut(300,function(){$(".pgewrapper").hide();$(".pgecontainer").empty()})})};$.fn.pgeConCen=function(){Pheight=$(window).height()/2;Thisheight=$(this).height()/2;Cheight=Pheight-Thisheight;$(this).animate({top:Cheight+"px"},{duration:200,queue:false})}});


//CHKEML

(function(a){a.fn.checkEmail=function(){var b;this.each(function(){var c=a(this).val();b=c.indexOf("@")==-1||c.lastIndexOf(".")==-1?false:true});return b}})(jQuery);
