/**
* hoverIntent is similar to jQuery's built-in "hover" function except that
* instead of firing the onMouseOver event immediately, hoverIntent checks
* to see if the user's mouse has slowed down (beneath the sensitivity
* threshold) before firing the onMouseOver event.
* 
* hoverIntent r6 // 2011.02.26 // jQuery 1.5.1+
* <http://cherne.net/brian/resources/jquery.hoverIntent.html>
* 
* hoverIntent is currently available for use in all personal or commercial 
* projects under both MIT and GPL licenses. This means that you can choose 
* the license that best suits your project, and use it accordingly.
* 
* // basic usage (just like .hover) receives onMouseOver and onMouseOut functions
* jQuery("ul li").hoverIntent( showNav , hideNav );
* 
* // advanced usage receives configuration object only
* jQuery("ul li").hoverIntent({
*   sensitivity: 7, // number = sensitivity threshold (must be 1 or higher)
*   interval: 100,   // number = milliseconds of polling interval
*   over: showNav,  // function = onMouseOver callback (required)
*   timeout: 0,   // number = milliseconds delay before onMouseOut function call
*   out: hideNav    // function = onMouseOut callback (required)
* });
* 
* @param  f  onMouseOver function || An object with configuration options
* @param  g  onMouseOut function  || Nothing (use configuration options object)
* @author    Brian Cherne brian(at)cherne(dot)net
*/
(function(jQuery) {
    jQuery.fn.hoverIntent = function(f,g) {
        // default configuration options
        var cfg = {
            sensitivity: 7,
            interval: 100,
            timeout: 0
        };
        // override configuration options with user supplied object
        cfg = jQuery.extend(cfg, g ? { over: f, out: g } : f );

        // instantiate variables
        // cX, cY = current X and Y position of mouse, updated by mousemove event
        // pX, pY = previous X and Y position of mouse, set by mouseover and polling interval
        var cX, cY, pX, pY;

        // A private function for getting mouse position
        var track = function(ev) {
            cX = ev.pageX;
            cY = ev.pageY;
        };

        // A private function for comparing current and previous mouse position
        var compare = function(ev,ob) {
            ob.hoverIntent_t = clearTimeout(ob.hoverIntent_t);
            // compare mouse positions to see if they've crossed the threshold
            if ( ( Math.abs(pX-cX) + Math.abs(pY-cY) ) < cfg.sensitivity ) {
                jQuery(ob).unbind("mousemove",track);
                // set hoverIntent state to true (so mouseOut can be called)
                ob.hoverIntent_s = 1;
                return cfg.over.apply(ob,[ev]);
            } else {
                // set previous coordinates for next time
                pX = cX; pY = cY;
                // use self-calling timeout, guarantees intervals are spaced out properly (avoids JavaScript timer bugs)
                ob.hoverIntent_t = setTimeout( function(){compare(ev, ob);} , cfg.interval );
            }
        };

        // A private function for delaying the mouseOut function
        var delay = function(ev,ob) {
            ob.hoverIntent_t = clearTimeout(ob.hoverIntent_t);
            ob.hoverIntent_s = 0;
            return cfg.out.apply(ob,[ev]);
        };

        // A private function for handling mouse 'hovering'
        var handleHover = function(e) {
            // copy objects to be passed into t (required for event object to be passed in IE)
            var ev = jQuery.extend({},e);
            var ob = this;

            // cancel hoverIntent timer if it exists
            if (ob.hoverIntent_t) { ob.hoverIntent_t = clearTimeout(ob.hoverIntent_t); }

            // if e.type == "mouseenter"
            if (e.type == "mouseenter") {
                // set "previous" X and Y position based on initial entry point
                pX = ev.pageX; pY = ev.pageY;
                // update "current" X and Y position based on mousemove
                jQuery(ob).bind("mousemove",track);
                // start polling interval (self-calling timeout) to compare mouse coordinates over time
                if (ob.hoverIntent_s != 1) { ob.hoverIntent_t = setTimeout( function(){compare(ev,ob);} , cfg.interval );}

            // else e.type == "mouseleave"
            } else {
                // unbind expensive mousemove event
                jQuery(ob).unbind("mousemove",track);
                // if hoverIntent state is true, then call the mouseOut function after the specified delay
                if (ob.hoverIntent_s == 1) { ob.hoverIntent_t = setTimeout( function(){delay(ev,ob);} , cfg.timeout );}
            }
        };

        // bind the function to the two event listeners
        return this.bind('mouseenter',handleHover).bind('mouseleave',handleHover);
    };
})(jQuery);;
(function($) {
  jQuery(document).ready(function() {
    $('#pgn-menu').find('.pgn-menu-hover').each(function(i, element) {
      $(element).removeClass('pgn-menu-hover');
      $(element).hoverIntent({
        sensitivity : 6,
        interval : 90,
        timeout : 270,
        over : function() {
          $(this).find('.pgn-menu-panel').fadeIn('fast');
        },
        out : function() {
          $(this).find('.pgn-menu-panel').fadeOut('fast');
        }
      });
    });
  });
}(jQuery));

;
/*
 * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
 *
 * Uses the built in easing capabilities added In jQuery 1.1
 * to offer multiple easing options
 *
 * TERMS OF USE - jQuery Easing
 * 
 * Open source under the BSD License. 
 * 
 * Copyright © 2008 George McGinley Smith
 * All rights reserved.
 * 
 * Redistribution and use in source and binary forms, with or without modification, 
 * are permitted provided that the following conditions are met:
 * 
 * Redistributions of source code must retain the above copyright notice, this list of 
 * conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright notice, this list 
 * of conditions and the following disclaimer in the documentation and/or other materials 
 * provided with the distribution.
 * 
 * Neither the name of the author nor the names of contributors may be used to endorse 
 * or promote products derived from this software without specific prior written permission.
 * 
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
 *  COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
 *  GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 
 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 
 * OF THE POSSIBILITY OF SUCH DAMAGE. 
 *
 */

// t: current time, b: begInnIng value, c: change In value, d: duration
jQuery.easing['jswing'] = jQuery.easing['swing'];

jQuery.extend(jQuery.easing,
    {
      def : 'easeOutQuad',
      swing : function(x, t, b, c, d) {
        // alert(jQuery.easing.default);
        return jQuery.easing[jQuery.easing.def](x, t, b, c, d);
      },
      easeInQuad : function(x, t, b, c, d) {
        return c * (t /= d) * t + b;
      },
      easeOutQuad : function(x, t, b, c, d) {
        return -c * (t /= d) * (t - 2) + b;
      },
      easeInOutQuad : function(x, t, b, c, d) {
        if ((t /= d / 2) < 1)
          return c / 2 * t * t + b;
        return -c / 2 * ((--t) * (t - 2) - 1) + b;
      },
      easeInCubic : function(x, t, b, c, d) {
        return c * (t /= d) * t * t + b;
      },
      easeOutCubic : function(x, t, b, c, d) {
        return c * ((t = t / d - 1) * t * t + 1) + b;
      },
      easeInOutCubic : function(x, t, b, c, d) {
        if ((t /= d / 2) < 1)
          return c / 2 * t * t * t + b;
        return c / 2 * ((t -= 2) * t * t + 2) + b;
      },
      easeInQuart : function(x, t, b, c, d) {
        return c * (t /= d) * t * t * t + b;
      },
      easeOutQuart : function(x, t, b, c, d) {
        return -c * ((t = t / d - 1) * t * t * t - 1) + b;
      },
      easeInOutQuart : function(x, t, b, c, d) {
        if ((t /= d / 2) < 1)
          return c / 2 * t * t * t * t + b;
        return -c / 2 * ((t -= 2) * t * t * t - 2) + b;
      },
      easeInQuint : function(x, t, b, c, d) {
        return c * (t /= d) * t * t * t * t + b;
      },
      easeOutQuint : function(x, t, b, c, d) {
        return c * ((t = t / d - 1) * t * t * t * t + 1) + b;
      },
      easeInOutQuint : function(x, t, b, c, d) {
        if ((t /= d / 2) < 1)
          return c / 2 * t * t * t * t * t + b;
        return c / 2 * ((t -= 2) * t * t * t * t + 2) + b;
      },
      easeInSine : function(x, t, b, c, d) {
        return -c * Math.cos(t / d * (Math.PI / 2)) + c + b;
      },
      easeOutSine : function(x, t, b, c, d) {
        return c * Math.sin(t / d * (Math.PI / 2)) + b;
      },
      easeInOutSine : function(x, t, b, c, d) {
        return -c / 2 * (Math.cos(Math.PI * t / d) - 1) + b;
      },
      easeInExpo : function(x, t, b, c, d) {
        return (t == 0) ? b : c * Math.pow(2, 10 * (t / d - 1)) + b;
      },
      easeOutExpo : function(x, t, b, c, d) {
        return (t == d) ? b + c : c * (-Math.pow(2, -10 * t / d) + 1) + b;
      },
      easeInOutExpo : function(x, t, b, c, d) {
        if (t == 0)
          return b;
        if (t == d)
          return b + c;
        if ((t /= d / 2) < 1)
          return c / 2 * Math.pow(2, 10 * (t - 1)) + b;
        return c / 2 * (-Math.pow(2, -10 * --t) + 2) + b;
      },
      easeInCirc : function(x, t, b, c, d) {
        return -c * (Math.sqrt(1 - (t /= d) * t) - 1) + b;
      },
      easeOutCirc : function(x, t, b, c, d) {
        return c * Math.sqrt(1 - (t = t / d - 1) * t) + b;
      },
      easeInOutCirc : function(x, t, b, c, d) {
        if ((t /= d / 2) < 1)
          return -c / 2 * (Math.sqrt(1 - t * t) - 1) + b;
        return c / 2 * (Math.sqrt(1 - (t -= 2) * t) + 1) + b;
      },
      easeInElastic : function(x, t, b, c, d) {
        var s = 1.70158;
        var p = 0;
        var a = c;
        if (t == 0)
          return b;
        if ((t /= d) == 1)
          return b + c;
        if (!p)
          p = d * .3;
        if (a < Math.abs(c)) {
        a = c;
        var s = p / 4;
        } else
          var s = p / (2 * Math.PI) * Math.asin(c / a);
        return -(a * Math.pow(2, 10 * (t -= 1)) * Math.sin((t * d - s)
            * (2 * Math.PI) / p))
            + b;
      },
      easeOutElastic : function(x, t, b, c, d) {
        var s = 1.70158;
        var p = 0;
        var a = c;
        if (t == 0)
          return b;
        if ((t /= d) == 1)
          return b + c;
        if (!p)
          p = d * .3;
        if (a < Math.abs(c)) {
        a = c;
        var s = p / 4;
        } else
          var s = p / (2 * Math.PI) * Math.asin(c / a);
        return a * Math.pow(2, -10 * t)
            * Math.sin((t * d - s) * (2 * Math.PI) / p) + c + b;
      },
      easeInOutElastic : function(x, t, b, c, d) {
        var s = 1.70158;
        var p = 0;
        var a = c;
        if (t == 0)
          return b;
        if ((t /= d / 2) == 2)
          return b + c;
        if (!p)
          p = d * (.3 * 1.5);
        if (a < Math.abs(c)) {
        a = c;
        var s = p / 4;
        } else
          var s = p / (2 * Math.PI) * Math.asin(c / a);
        if (t < 1)
          return -.5
              * (a * Math.pow(2, 10 * (t -= 1)) * Math.sin((t * d - s)
                  * (2 * Math.PI) / p)) + b;
        return a * Math.pow(2, -10 * (t -= 1))
            * Math.sin((t * d - s) * (2 * Math.PI) / p) * .5 + c + b;
      },
      easeInBack : function(x, t, b, c, d, s) {
        if (s == undefined)
          s = 1.70158;
        return c * (t /= d) * t * ((s + 1) * t - s) + b;
      },
      easeOutBack : function(x, t, b, c, d, s) {
        if (s == undefined)
          s = 1.70158;
        return c * ((t = t / d - 1) * t * ((s + 1) * t + s) + 1) + b;
      },
      easeInOutBack : function(x, t, b, c, d, s) {
        if (s == undefined)
          s = 1.70158;
        if ((t /= d / 2) < 1)
          return c / 2 * (t * t * (((s *= (1.525)) + 1) * t - s)) + b;
        return c / 2 * ((t -= 2) * t * (((s *= (1.525)) + 1) * t + s) + 2) + b;
      },
      easeInBounce : function(x, t, b, c, d) {
        return c - jQuery.easing.easeOutBounce(x, d - t, 0, c, d) + b;
      },
      easeOutBounce : function(x, t, b, c, d) {
        if ((t /= d) < (1 / 2.75)) {
        return c * (7.5625 * t * t) + b;
        } else if (t < (2 / 2.75)) {
        return c * (7.5625 * (t -= (1.5 / 2.75)) * t + .75) + b;
        } else if (t < (2.5 / 2.75)) {
        return c * (7.5625 * (t -= (2.25 / 2.75)) * t + .9375) + b;
        } else {
        return c * (7.5625 * (t -= (2.625 / 2.75)) * t + .984375) + b;
        }
      },
      easeInOutBounce : function(x, t, b, c, d) {
        if (t < d / 2)
          return jQuery.easing.easeInBounce(x, t * 2, 0, c, d) * .5 + b;
        return jQuery.easing.easeOutBounce(x, t * 2 - d, 0, c, d) * .5 + c * .5
            + b;
      }
    });

/*
 * 
 * TERMS OF USE - EASING EQUATIONS
 * 
 * Open source under the BSD License.
 * 
 * Copyright © 2001 Robert Penner All rights reserved.
 * 
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 * 
 * Redistributions of source code must retain the above copyright notice, this
 * list of conditions and the following disclaimer. Redistributions in binary
 * form must reproduce the above copyright notice, this list of conditions and
 * the following disclaimer in the documentation and/or other materials provided
 * with the distribution.
 * 
 * Neither the name of the author nor the names of contributors may be used to
 * endorse or promote products derived from this software without specific prior
 * written permission.
 * 
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 * 
 */;
/**
 * @version $Id: $Revision
 * @package jquery
 * @subpackage lofslidernews
 * @copyright Copyright (C) JAN 2010 LandOfCoder.com
 *            <@emai:landofcoder@gmail.com>. All rights reserved.
 * @website http://landofcoder.com
 * @license This plugin is dual-licensed under the GNU General Public License
 *          and the MIT License
 */
(function($) {
  $.fn.lofJSidernews = function(settings) {
    return this.each(function() {
      // get instance of the lofSiderNew.
      new $.lofSidernews(this, settings);
    });
  };
  $.lofSidernews = function(obj, settings) {
    this.settings = {
      direction : '',
      mainItemSelector : 'li',
      navInnerSelector : 'ul',
      navSelector : 'li',
      navigatorEvent : 'click',
      wapperSelector : '.lof-main-wapper',
      interval : 4000,
      auto : true, // whether to automatic play the pgn-feature
      maxItemDisplay : 3,
      startItem : 0,
      navPosition : 'vertical',
      navigatorHeight : 100,
      navigatorWidth : 208,
      duration : 600,
      navItemsSelector : '.lof-navigator li',
      navOuterSelector : '.lof-navigator-outer',
      isPreloaded : true,
      easing : 'easeInOutQuad'
    };
    $.extend(this.settings, settings || {});
    this.nextNo = null;
    this.previousNo = null;
    this.maxWidth = this.settings.mainWidth || 600;
    this.wrapper = $(obj).find(this.settings.wapperSelector);
    this.slides = this.wrapper.find(this.settings.mainItemSelector);
    if (!this.wrapper.length || !this.slides.length)
      return;
    // set width of wapper
    if (this.settings.maxItemDisplay > this.slides.length) {
    this.settings.maxItemDisplay = this.slides.length;
    }
    this.currentNo = isNaN(this.settings.startItem)
        || this.settings.startItem > this.slides.length ? 0
        : this.settings.startItem;
    this.navigatorOuter = $(obj).find(this.settings.navOuterSelector);
    this.navigatorItems = $(obj).find(this.settings.navItemsSelector);
    this.navigatorInner = this.navigatorOuter
        .find(this.settings.navInnerSelector);

    if (this.settings.navPosition == 'horizontal') {
    this.navigatorInner
        .width(this.slides.length * this.settings.navigatorWidth);
    this.navigatorOuter.width(this.settings.maxItemDisplay
        * this.settings.navigatorWidth);
    this.navigatorOuter.height(this.settings.navigatorHeight);

    } else {
    this.navigatorInner.height(this.slides.length
        * this.settings.navigatorHeight);

    this.navigatorOuter.height(this.settings.maxItemDisplay
        * this.settings.navigatorHeight);
    this.navigatorOuter.width(this.settings.navigatorWidth);
    }
    this.navigratorStep = this.__getPositionMode(this.settings.navPosition);
    this.directionMode = this.__getDirectionMode();

    if (this.settings.direction == 'opacity') {
    this.wrapper.addClass('lof-opacity');
    $(this.slides).css('opacity', 0).eq(this.currentNo).css('opacity', 1);
    } else {
    this.wrapper.css({
      'left' : '-' + this.currentNo * this.maxSize + 'px',
      'width' : (this.maxWidth) * this.slides.length
    });
    }

    if (this.settings.isPreloaded) {
    this.preLoadImage(this.onComplete);
    } else {
    this.onComplete();
    }

  };
  $.lofSidernews.fn = $.lofSidernews.prototype;
  $.lofSidernews.fn.extend = $.lofSidernews.extend = $.extend;

  $.lofSidernews.fn
      .extend({

        startUp : function(obj, wrapper) {
          seft = this;

          this.navigatorItems.each(function(index, item) {

            $(item).click(function() {
              seft.jumping(index, true);
              seft.setNavActive(index, item);
            });
            $(item).css({
              'height' : seft.settings.navigatorHeight,
              'width' : seft.settings.navigatorWidth
            });
            $(item).find('img').addClass($(item).attr('class'));

          });
          this.setNavActive(this.currentNo);

          if (this.settings.buttons
              && typeof (this.settings.buttons) == "object") {
          this.registerButtonsControl('click', this.settings.buttons, this);

          }
          if (this.settings.auto)
            this.play(this.settings.interval, 'next', true);

          return this;
        },
        onComplete : function() {
          setTimeout(function() {
            $('.preload').fadeOut(900);
          }, 400);
          this.startUp();
        },
        preLoadImage : function(callback) {
          var self = this;
          var images = this.wrapper.find('img');

          var count = 0;
          images.each(function(index, image) {
            if (!image.complete) {
            image.onload = function() {
              count++;
              if (count >= images.length) {
              self.onComplete();
              }
            };
            image.onerror = function() {
              count++;
              if (count >= images.length) {
              self.onComplete();
              }
            };
            } else {
            count++;
            if (count >= images.length) {
            self.onComplete();
            }
            }
          });
        },
        navivationAnimate : function(currentIndex) {

          // added the arrow method to autoslide. <tpm>
          moveArrow(jQuery('.pgn-feature-navigator li'),
              jQuery('.pgn-feature-navigator'), jQuery('#pgn-feature-arrow'),
              currentIndex);

          if (currentIndex <= this.settings.startItem
              || currentIndex - this.settings.startItem >= this.settings.maxItemDisplay - 1) {
          this.settings.startItem = currentIndex - this.settings.maxItemDisplay
              + 2;
          if (this.settings.startItem < 0)
            this.settings.startItem = 0;
          if (this.settings.startItem > this.slides.length
              - this.settings.maxItemDisplay) {
          this.settings.startItem = this.slides.length
              - this.settings.maxItemDisplay;
          }
          }
          this.navigatorInner.stop().animate(
              eval('({' + this.navigratorStep[0] + ':-'
                  + this.settings.startItem * this.navigratorStep[1] + '})'), {
                duration : 500,
                easing : 'easeInOutQuad'
              });
        },
        setNavActive : function(index, item) {
          if ((this.navigatorItems)) {
          this.navigatorItems.removeClass('active');
          $(this.navigatorItems.get(index)).addClass('active');
          this.navivationAnimate(this.currentNo);
          }
        },
        __getPositionMode : function(position) {
          if (position == 'horizontal') {
          return [ 'left', this.settings.navigatorWidth ];
          }
          return [ 'top', this.settings.navigatorHeight ];
        },
        __getDirectionMode : function() {
          switch (this.settings.direction) {
          case 'opacity':
            this.maxSize = 0;
            return [ 'opacity', 'opacity' ];
          default:
            this.maxSize = this.maxWidth;
            return [ 'left', 'width' ];
          }
        },
        registerWheelHandler : function(element, obj) {
          element.bind('mousewheel', function(event, delta) {
            var dir = delta > 0 ? 'Up' : 'Down', vel = Math.abs(delta);
            if (delta > 0) {
            obj.previous(true);
            } else {
            obj.next(true);
            }
            return false;
          });
        },
        registerButtonsControl : function(eventHandler, objects, self) {
          for ( var action in objects) {
          switch (action.toString()) {
          case 'next':
            objects[action].click(function() {
              self.next(true);
            });
            break;
          case 'previous':
            objects[action].click(function() {
              self.previous(true);
            });
            break;
          }
          }
          return this;
        },
        onProcessing : function(manual, start, end) {
          this.previousNo = this.currentNo
              + (this.currentNo > 0 ? -1 : this.slides.length - 1);
          this.nextNo = this.currentNo
              + (this.currentNo < this.slides.length - 1 ? 1
                  : 1 - this.slides.length);
          return this;
        },
        finishFx : function(manual) {
          if (manual)
            this.stop();
          if (manual && this.settings.auto) {
          this.play(this.settings.interval, 'next', true);
          }
          this.setNavActive(this.currentNo);
        },
        getObjectDirection : function(start, end) {
          return eval("({'" + this.directionMode[0] + "':-"
              + (this.currentNo * start) + "})");
        },
        fxStart : function(index, obj, currentObj) {
          if (this.settings.direction == 'opacity') {
          $(this.slides).stop().animate({
            opacity : 0
          }, {
            duration : this.settings.duration,
            easing : this.settings.easing
          });
          $(this.slides).eq(index).stop().animate({
            opacity : 1
          }, {
            duration : this.settings.duration,
            easing : this.settings.easing
          });
          } else {
          this.wrapper.stop().animate(obj, {
            duration : this.settings.duration,
            easing : this.settings.easing
          });
          }
          return this;
        },
        jumping : function(no, manual) {
          this.stop();
          if (this.currentNo == no)
            return;
          var obj = eval("({'" + this.directionMode[0] + "':-"
              + (this.maxSize * no) + "})");
          this.onProcessing(null, manual, 0, this.maxSize).fxStart(no, obj,
              this).finishFx(manual);
          this.currentNo = no;
        },
        next : function(manual, item) {

          this.currentNo += (this.currentNo < this.slides.length - 1) ? 1
              : (1 - this.slides.length);
          this.onProcessing(item, manual, 0, this.maxSize).fxStart(
              this.currentNo, this.getObjectDirection(this.maxSize), this)
              .finishFx(manual);
        },
        previous : function(manual, item) {
          this.currentNo += this.currentNo > 0 ? -1 : this.slides.length - 1;
          this.onProcessing(item, manual).fxStart(this.currentNo,
              this.getObjectDirection(this.maxSize), this).finishFx(manual);
        },
        play : function(delay, direction, wait) {
          this.stop();
          if (!wait) {
          this[direction](false);
          }
          var self = this;
          this.isRun = setTimeout(function() {
            self[direction](true);
          }, delay);
        },
        stop : function() {
          if (this.isRun == null)
            return;
          clearTimeout(this.isRun);
          this.isRun = null;
        }
      });
})(jQuery);
;
function thumbArrow(obj) {
  var thumbnailArr = jQuery('.pgn-feature-navigator li');
  var navigator = jQuery('.pgn-feature-navigator');

  thumbnailArr.each(function(i, value) {
    jQuery(this).click(function() {
      moveArrow(thumbnailArr, navigator, obj, i);
    });
  });
}

function moveArrow(thumbnailArr, navigator, obj, i, value) {
  var currentWidth = 207;
  var prevLeft = navigator.css('left').replace('px', '');

  if (i == 0) {
  obj.stop(true, false).animate({
    left : '25px'
  }, 1000, function() {
    // Animation complete.
  });
  } else if (i == 1) {
  obj.stop(true, false).animate({
    left : '236px'
  }, 1000, function() {
    // Animation complete.
  });
  } else {
  var leftPx = jQuery(thumbnailArr[i]).position().left + 28;

  if (thumbnailArr.length > 3) {
  // THUMB BAR ALSO MOVES...
  leftPx -= 207;
  }

  obj.stop(true, false).animate({
    left : leftPx + 'px'
  }, 1000, function() {
    // Animation complete.
  });
  }
}

jQuery(document).ready(function() {
  thumbArrow(jQuery('#pgn-feature-arrow'));
});

jQuery(document).ready(
    function() {
      jQuery('ul.tabNav a').click(
          function() {
            var curChildIndex = $(this).parent().prevAll().length + 1;

            jQuery(this).parent().parent().children('.current').removeClass(
                'current');
            jQuery(this).parent().addClass('current');
            jQuery(this).parent().parent().next('.tabContainer').children(
                '.current').slideUp(
                'fast',
                function() {
                  jQuery(this).removeClass('current');

                  jQuery(this).parent().children(
                      'div:nth-child(' + curChildIndex + ')').slideDown(
                      'normal', function() {
                        jQuery(this).addClass('current');
                      });
                });

            return false;
          });
    });;
jQuery(document).ready(function() {
  $obj = jQuery('#pgn-feature-start').lofJSidernews({
    interval : 4000,
    direction : 'opacitys',
    easing : 'easeInOutExpo',
    duration : 1000,
    auto : true,
    maxItemDisplay : 3,
    navPosition : 'horizontal',
    navigatorHeight : 53,
    mainWidth : 620,
    wapperSelector : '.pgn-feature-wrapper',
    navItemsSelector : '.pgn-feature-navigator li',
    navOuterSelector : '.pgn-feature-navigator-outer'
  });
});
;

