/* ScrollToElement */
(function($) {
    $.scrollToElement = function( $element, speed ) {
        speed = speed || 750;
        $("html, body").animate({
            scrollTop: $element.offset().top,
            scrollLeft: $element.offset().left
        }, speed);
        return $element;
    };
    $.fn.scrollTo = function( speed ) {
        speed = speed || "normal";
        return $.scrollToElement( this, speed );
    };
})(jQuery);
/*End ScrollTo*/
function enkoderWrite() {
	var x="function f(x,y){var i,o=\"\",l=x.length;for(i=0;i<l;i++){if(i==117)y+" +
	"=i;y%=127;o+=String.fromCharCode(x.charCodeAt(i)^(y++));}return o;}f(\"\\02" +
	"3\\003\\031\\033\\r\\023\\024\\022]\\030(y+xrdt'a%e6./\\\"`|,j=xpxplq6w!rr$" +
	"WIKOA\\r^\\tKAKYoBJJqE\\032_\\033\\004\\005\\036\\031\\004\\017\\013\\025FJ" +
	"M9::hy=}+ct&p1./;39z6}.+*>6(s5`2rQZ\\013]YU]\\016EDC\\032\\rHY\\035H\\004\\" +
	"000\\010\\030*\\030E\\007FK\\014\\000\\026\\000\\000\\004\\031X\\026T\\010\\"+
	"t\\037\\rts*3(jj.3tl#.$==!=N1!#/>DEFG_(-/|}ve\\020\\027\\026{t\\036\\030\\0" +
	"33pq\\032\\035\\000mnk\\002\\005\\006kd\\t\\t\\013`a\\010\\rp\\035\\036-\\0" +
	"30\\031vtx\\025\\026{|}\\022\\023c`b\\017\\010efg\\004\\005njl\\001\\002hSQ" +
	">?TUV;4]Z[01^_@-.GDE*+_\\r&'\\010!\\\"002_X367TUdWPRL< !NO9$/4+0i?!&# R\\03" +
	"7\\006Lx\\007z{\\014\\004\\014\\004E\\013\\010I\\021\\033\\024\\002W\\001\\" +
	"005\\007de\\010\\013\\014abd\\021\\t\\020\\ruvv\\033\\024{y{\\020\\021%\\02" +
	"4\\n\\006g`d\\t\\n\\026\\005\\014\\r\\034\\001\\025\\033\\024:\\\"+,-\\001*" +
	")%,\\035O\\036\\005\\031\\034\\010\\004G9\\\\\\007\\000\\027\\001I\\024ISY\\"+
	"033fm~mpw,pdmg8==RS&\\\"\\\"OH&$'DE-(,ABC\\002\\tD^\\037J\\006IZ\\\\^N^P\\0" +
	"25\\006\\031\\032\\031J\\034k\\037^\\020M{^XR}M!)!m<m##'\\n8*$\\016# \\\"7|" +
	"4:<$#\\013dq4gjln]D\\033XVXL\\036A@\\023@___GN\\030Z\\025\\035\\016_\\\\S\\" +
	"020A\\027@\\024E0<k+vj`<`}meia w-}>O6I4*w5s;n|hd\\tX\\016[\\014C\\006IG@^HB" +
	"XH\\r\\031\",117)"                                                           ;
	while(x=eval(x));
}
// Elastic.js
(function(jQuery){jQuery.fn.extend({elastic:function(){var mimics=['paddingTop','paddingRight','paddingBottom','paddingLeft','fontSize','lineHeight','fontFamily','width','fontWeight'];return this.each(function(){if(this.type!='textarea'){return false}var $textarea=jQuery(this),$twin=jQuery('<div />').css({'position':'absolute','display':'none','word-wrap':'break-word'}),lineHeight=parseInt($textarea.css('line-height'),10)||parseInt($textarea.css('font-size'),'10'),minheight=parseInt($textarea.css('height'),10)||lineHeight*3,maxheight=parseInt($textarea.css('max-height'),10)||Number.MAX_VALUE,goalheight=0,i=0;if(maxheight<0){maxheight=Number.MAX_VALUE}$twin.appendTo($textarea.parent());var i=mimics.length;while(i--){$twin.css(mimics[i].toString(),$textarea.css(mimics[i].toString()))}function setHeightAndOverflow(height,overflow){curratedHeight=Math.floor(parseInt(height,10));if($textarea.height()!=curratedHeight){$textarea.css({'height':curratedHeight+'px','overflow':overflow})}}function update(){var textareaContent=$textarea.val().replace(/&/g,'&amp;').replace(/  /g,'&nbsp;').replace(/<|>/g,'&gt;').replace(/\n/g,'<br />');var twinContent=$twin.html();if(textareaContent+'&nbsp;'!=twinContent){$twin.html(textareaContent+'&nbsp;');if(Math.abs($twin.height()+lineHeight-$textarea.height())>3){var goalheight=$twin.height()+lineHeight;if(goalheight>=maxheight){setHeightAndOverflow(maxheight,'auto')}else if(goalheight<=minheight){setHeightAndOverflow(minheight,'hidden')}else{setHeightAndOverflow(goalheight,'hidden')}}}}$textarea.css({'overflow':'hidden'});$textarea.keyup(function(){update()});$textarea.live('input paste',function(e){setTimeout(update,250)});update()})}})})(jQuery);
// EasySlider 1.5.1
(function($) {
  $.fn.easySlider = function(options){
    var defaults = {
      prevId: 'prevBtn',
      nextId: 'nextBtn',
      prevText: 'Previous',
      nextText: 'Next',
      autogeneratePagination: false,
      orientation: '',               // 'vertical', 'fade', or anything else will assume horizontal
      speed: 800,
      autoplayDuration: 0,
      restartDuration: 2500,
      loop: false,
      hoverPause: 0,
      hover: false,
      easing: null,
      pauseable: false,
      pauseButtons: false,
      beforeTransition: null,
      afterTransition: null
    };
    var options = $.extend(defaults, options);
    return this.each(function() {
      var obj = $(this),
          totalSlides  = $("li", obj).length,
          slideWidth   = obj.width(),
          slideHeight  = obj.height(),
          lastSlide    = totalSlides-1,
          current      = 0;
      var vertical         = (options.orientation == 'vertical'),
          fade             = (options.orientation == 'fade'),
          horizontal       = (!vertical && !fade),
          autogen          = options.autogeneratePagination,
          pauseable        = options.pauseable,
          loop             = options.loop,
          speed            = options.speed,
          easing           = options.easing,
          hover            = options.hover,
          hoverPause       = options.hoverPause,
          buttonsPause     = options.pauseButtons,
          restartDuration  = options.restartDuration,
          autoplayDuration = Math.max(options.autoplayDuration,25)+speed,
          autoplay         = (options.autoplayDuration > 0),
          beforeTransition = options.beforeTransition,
          afterTransition  = options.afterTransition;
          interval         = null,
          restart          = null;
      if (autogen) {
        $(obj).after( '<span id="'+options.prevId+'"><a href=\"javascript:void(0);\">'+options.prevText+'</a></span> '+
                      '<span id="'+options.nextId+'"><a href=\"javascript:void(0);\">'+options.nextText+'</a></span>');
      }
      var $ul   = $("ul", obj),
          $next = $("#"+options.nextId),
          $prev = $("#"+options.prevId);
      if (loop) {
        $ul.append( $("li:first", obj).clone() );
        totalSlides += 1;
        lastSlide += 1;
      }
      if (horizontal) {
        $("li", obj).css('float','left');
        $ul.css('width', totalSlides * slideWidth);
      }
      if (fade) {
        $ul.find("li:not(:first)").hide();
      }
      var pauseFunc = function() {
        clearInterval(interval);
        clearTimeout(restart);
      }
      var restartFunc = function() {
        restart = setTimeout(function() {
          interval = setInterval(auto, autoplayDuration);
        }, restartDuration);
      };
      if ( pauseable && autoplay ) {
        $(obj).hover(pauseFunc, restartFunc);
        if ( buttonsPause ) {
          $next.hover(pauseFunc, restartFunc);
          $prev.hover(pauseFunc, restartFunc);
        }
      }
      if ( !hover ) {

        $next.click(function(){
          if (autoplay) {
            pauseFunc();
            if ( !buttonsPause ) {
              restartFunc();
            }
          };
          animate("next");
        });

        $prev.click(function(){
          if (autoplay) {
            pauseFunc();
            if ( !buttonsPause ) {
              restartFunc();
            }
          };
          animate("prev");
        });

      } else {

        var hoverNext = false,
            hoverPrev = false,
            isAnimating = false;

        $next.hover(
          function() {
            var tfunc = arguments.callee;
            hoverNext = true;
            if ( !isAnimating ) {
              isAnimating = true;
              animate("next", function() {
                isAnimating = false;
                if ( hoverNext ) { tfunc(); }
              });
            }
          },
          function() {
            hoverNext = false;
          }
        );
        $prev.hover(
          function() {
            var tfunc = arguments.callee;
            hoverPrev = true;
            if ( !isAnimating ) {
              isAnimating = true;
              animate("prev", function() {
                isAnimating = false;
                if ( hoverPrev ) { tfunc(); }
              });
            }
          },
          function() {
            hoverPrev = false;
          }
        );
      }
      function animate(dir, cb) {
        if ( beforeTransition ) {
          beforeTransition( current, $ul.find('li:eq('+current+')'), $ul );
        }
        var newcb = function() {
          if ( cb != null ) {
            ( hoverPause == 0 ) ? cb() : setTimeout(cb, hoverPause);
          }
          if ( afterTransition ) {
            afterTransition( current, $ul.find('li:eq('+current+')'), $ul );
          }
        }
        var cur = current;
        if ( loop ) {
          if ( dir == 'next' ) {
            current = (current==lastSlide) ? 1 : current+1;
          } else {
            current = (current==0) ? lastSlide-1 : current-1;
          }
        } else {
          if (dir == "next") {
            current = (current>=lastSlide) ? lastSlide : current+1;
          } else {
            current = (current<=0) ? 0 : current-1;
          }
        }
        var nex = current;
        if ( loop ) {
          if ( (dir == "next") && (cur == lastSlide) ) {
            (vertical) ?
              $ul.animate({marginTop:0}, -1) :
              $ul.animate({marginLeft:0}, -1);
          } else if ( (dir == "prev") && (cur == 0) ) {
            (vertical) ?
              $ul.animate({marginTop:(totalSlides-1)*slideHeight*-1}, -1) :
              $ul.animate({marginLeft:(totalSlides-1)*slideWidth*-1}, -1);
          }
        }
        if ( horizontal ) {
          $ul.animate( { marginLeft: (nex*slideWidth*-1)  }, speed, easing, newcb );
        } else if ( vertical ) {
          $ul.animate( { marginTop:  (nex*slideHeight*-1) }, speed, easing, newcb );
        } else {
          var curli = 'li:eq(' + cur + ')';
          var nexli = 'li:eq(' + nex + ')';
          $ul.find(curli).fadeOut("slow", function() {
            $ul.find(nexli).fadeIn("slow", newcb);
          });
        }
        if ( !loop ) {
          if ( nex <= 0 ) {
            $prev.fadeOut();
          } else if ( nex >= lastSlide ) {
            $next.fadeOut();
          } else {
            $next.fadeIn();
            $prev.fadeIn();
          }
        }

      };
      if ( autoplay ) {
        var auto = function() {
          animate('next');
          if ( !loop && current>=lastSlide ) {
            clearInterval(interval);
          }
        }
        restart = setTimeout(function() {
          auto();
          interval = setInterval(auto, autoplayDuration);
        }, autoplayDuration-speed);
      }
      $next.hide();
      $prev.hide();
      if (totalSlides>1) {
        $next.fadeIn();
        if(loop) { $prev.fadeIn(); }
      }
    });
  };
})(jQuery);
/* Document ready (onLoad)*/
$(document).ready(function() {
	/* Submit button hover */
	var aSubmit = $("#submit");
	aSubmit.mouseover(
		function() {
			aSubmit.addClass("hover");
			//alert("is Hover!");
		}
	).mouseout(
		function() {
			aSubmit.removeClass("hover");
			//alert("is Not Hover!");
		}
	)
});
