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੐)|#o0aڱ$I>}k&1`U#V?YsV x>{t1[I~D&(I$I/{H0fw"q"y%4 IXyE~M3 8XψL}qE$I[> nD?~sf ]o΁ cT6"?'_Ἣ $I>~.f|'!N?⟩0G KkXZE]ޡ;/&?k OۘH$IRۀwXӨ<7@PnS04aӶp.:@\IWQJ6sS%I$e5ڑv`3:x';wq_vpgHyXZ 3gЂ7{{EuԹn±}$I$8t;b|591nءQ"P6O5i }iR̈́%Q̄p!I䮢]O{H$IRϻ9s֧ a=`- aB\X0"+5"C1Hb?߮3x3&gşggl_hZ^,`5?ߎvĸ%̀M!OZC2#0x LJ0 Gw$I$I}<{Eb+y;iI,`ܚF:5ܛA8-O-|8K7s|#Z8a&><a&/VtbtLʌI$I$I$I$I$I$IRjDD%tEXtdate:create2022-05-31T04:40:26+00:00!Î%tEXtdate:modify2022-05-31T04:40:26+00:00|{2IENDB`Mini Shell

HOME


Mini Shell 1.0
DIR:/chroot/home/laughingplants/public_html/js/extensions/source/
Upload File :
Current File : /chroot/home/laughingplants/public_html/js/extensions/source/revolution.extension.navigation.js
/********************************************
 * REVOLUTION 5.0 EXTENSION - NAVIGATION
 * @version: 1.0.3 (25.09.2015)
 * @requires jquery.themepunch.revolution.js
 * @author ThemePunch
*********************************************/

(function($) {

var _R = jQuery.fn.revolution,
	_ISM = _R.is_mobile();


///////////////////////////////////////////
// 	EXTENDED FUNCTIONS AVAILABLE GLOBAL  //
///////////////////////////////////////////
jQuery.extend(true,_R, {

		
	hideUnHideNav : function(opt) {	
		var w = opt.c.width(),
			a = opt.navigation.arrows,
			b = opt.navigation.bullets,
			c = opt.navigation.thumbnails,
			d = opt.navigation.tabs;

		if (ckNO(a)) biggerNav(opt.c.find('.tparrows'),a.hide_under,w,a.hide_over);	
		if (ckNO(b)) biggerNav(opt.c.find('.tp-bullets'),b.hide_under,w,b.hide_over);			
		if (ckNO(c)) biggerNav(opt.c.parent().find('.tp-thumbs'),c.hide_under,w,c.hide_over);	
		if (ckNO(d)) biggerNav(opt.c.parent().find('.tp-tabs'),d.hide_under,w,d.hide_over);		
		
		setONHeights(opt);
		
	},

	resizeThumbsTabs : function(opt) {	
		
		
		if ((opt.navigation && opt.navigation.tabs.enable) || (opt.navigation && opt.navigation.thumbnails.enable)) {
			var f = (jQuery(window).width()-480) / 500,
				tws = new punchgs.TimelineLite(),
				otab = opt.navigation.tabs,
				othu = opt.navigation.thumbnails;

			tws.pause();
			f = f>1 ? 1 : f<0 ? 0 : f;
			
			if (ckNO(otab) && otab.width>otab.min_width) rtt(f,tws,opt.c,otab,opt.slideamount,'tab');	
			if (ckNO(othu) && othu.width>othu.min_width) rtt(f,tws,opt.c,othu,opt.slideamount,'thumb');

			tws.play();	
			
			setONHeights(opt);
		}
		return true;
	},


	// PUT NAVIGATION IN POSITION AND MAKE SURE THUMBS AND TABS SHOWING TO THE RIGHT POSITION
	manageNavigation : function(opt) {
		
		
		var	lof = _R.getHorizontalOffset(opt.c.parent(),"left"),
			rof = _R.getHorizontalOffset(opt.c.parent(),"right");

		if (ckNO(opt.navigation.bullets)) {
			if (opt.sliderLayout!="fullscreen" && opt.sliderLayout!="fullwidth") {
				// OFFSET ADJUSTEMENT FOR LEFT ARROWS BASED ON THUMBNAILS AND TABS OUTTER
				opt.navigation.bullets.h_offset_old = opt.navigation.bullets.h_offset_old === undefined ? opt.navigation.bullets.h_offset : opt.navigation.bullets.h_offset_old;
				opt.navigation.bullets.h_offset = opt.navigation.bullets.h_align==="center" ? opt.navigation.bullets.h_offset_old+lof/2 -rof/2: opt.navigation.bullets.h_offset_old+lof-rof;
			}
			setNavElPositions(opt.c.find('.tp-bullets'),opt.navigation.bullets);		
		}
		
		if (ckNO(opt.navigation.thumbnails)) 
			setNavElPositions(opt.c.parent().find('.tp-thumbs'),opt.navigation.thumbnails);		

		if (ckNO(opt.navigation.tabs))
			setNavElPositions(opt.c.parent().find('.tp-tabs'),opt.navigation.tabs);		
		
		if (ckNO(opt.navigation.arrows)) {
			
			if (opt.sliderLayout!="fullscreen" && opt.sliderLayout!="fullwidth") {
				// OFFSET ADJUSTEMENT FOR LEFT ARROWS BASED ON THUMBNAILS AND TABS OUTTER
				opt.navigation.arrows.left.h_offset_old = opt.navigation.arrows.left.h_offset_old === undefined ? opt.navigation.arrows.left.h_offset : opt.navigation.arrows.left.h_offset_old;
				opt.navigation.arrows.left.h_offset = opt.navigation.arrows.left.h_align==="right" ?  opt.navigation.arrows.left.h_offset_old+rof : opt.navigation.arrows.left.h_offset_old+lof;

				opt.navigation.arrows.right.h_offset_old = opt.navigation.arrows.right.h_offset_old === undefined ? opt.navigation.arrows.right.h_offset : opt.navigation.arrows.right.h_offset_old;
				opt.navigation.arrows.right.h_offset = opt.navigation.arrows.right.h_align==="right" ? opt.navigation.arrows.right.h_offset_old+rof : opt.navigation.arrows.right.h_offset_old+lof;
			}
			setNavElPositions(opt.c.find('.tp-leftarrow.tparrows'),opt.navigation.arrows.left);
			setNavElPositions(opt.c.find('.tp-rightarrow.tparrows'),opt.navigation.arrows.right);
		}


		if (ckNO(opt.navigation.thumbnails))
			moveThumbsInPosition(opt.c.parent().find('.tp-thumbs'),opt.navigation.thumbnails);
		
		if (ckNO(opt.navigation.tabs))
			moveThumbsInPosition(opt.c.parent().find('.tp-tabs'),opt.navigation.tabs);
	},


	// MANAGE THE NAVIGATION
	 createNavigation : function(container,opt) {

		var cp = container.parent(),		
			_a = opt.navigation.arrows, _b = opt.navigation.bullets, _c = opt.navigation.thumbnails, _d = opt.navigation.tabs,
			a = ckNO(_a), b = ckNO(_b), c = ckNO(_c), d = ckNO(_d);
			
		
		// Initialise Keyboard Navigation if Option set so
		initKeyboard(container,opt);

		// Initialise Mouse Scroll Navigation if Option set so
		initMouseScroll(container,opt);

		//Draw the Arrows
		if (a) initArrows(container,_a,opt);

		// BUILD BULLETS, THUMBS and TABS		
		opt.li.each(function(index) {
			var li = jQuery(this);				
			if (b) addBullet(container,_b,li,opt);		
			if (c) addThumb(container,_c,li,'tp-thumb',opt);		
			if (d) addThumb(container,_d,li,'tp-tab',opt);
		});
		
		// LISTEN TO SLIDE CHANGE - SET ACTIVE SLIDE BULLET				
		container.bind('revolution.slide.onafterswap revolution.nextslide.waiting',function() {		
			
			//cp.find('.tp-bullet, .tp-thumb, .tp-tab').removeClass("selected");			
			
			var si = container.find(".next-revslide").length==0 ? container.find(".active-revslide").data("index") : container.find(".next-revslide").data("index");			
			
			container.find('.tp-bullet').each(function() {
				var _t = jQuery(this);		
				if (_t.data('liref')===si) 
					_t.addClass("selected");
				else
					_t.removeClass("selected");
			});		

			cp.find('.tp-thumb, .tp-tab').each(function() {
				var _t = jQuery(this);				
				if (_t.data('liref')===si) {			
					_t.addClass("selected");	
					if (_t.hasClass("tp-tab"))			
						moveThumbsInPosition(cp.find('.tp-tabs'),_d);				
					else
						moveThumbsInPosition(cp.find('.tp-thumbs'),_c);				
				} else
					_t.removeClass("selected");		
				
			});		
			
			var ai = 0,			
				f = false;
			if (opt.thumbs)
				jQuery.each(opt.thumbs,function(i,obj) {			
					ai = f === false ? i : ai;
					f = obj.id === si || i === si ? true : f;
				});			
			
			
			var pi = ai>0 ? ai-1 : opt.slideamount-1,
				ni = (ai+1)==opt.slideamount ? 0 : ai+1;
				
		
			if (_a.enable === true) {
				var inst = _a.tmp;
				jQuery.each(opt.thumbs[pi].params,function(i,obj) {
					inst = inst.replace(obj.from,obj.to);
				});	
				_a.left.j.html(inst);
				inst = _a.tmp;
				jQuery.each(opt.thumbs[ni].params,function(i,obj) {
					inst = inst.replace(obj.from,obj.to);
				});	
				_a.right.j.html(inst);
				punchgs.TweenLite.set(_a.left.j.find('.tp-arr-imgholder'),{backgroundImage:"url("+opt.thumbs[pi].src+")"});
				punchgs.TweenLite.set(_a.right.j.find('.tp-arr-imgholder'),{backgroundImage:"url("+opt.thumbs[ni].src+")"});			
			}

			
		});
			
		hdResets(_a);
		hdResets(_b);
		hdResets(_c);
		hdResets(_d);
		
		
		// HOVER OVER ELEMENTS SHOULD SHOW/HIDE NAVIGATION ELEMENTS
		cp.on("mouseenter mousemove",function() {

			if (!cp.hasClass("tp-mouseover")) {
				cp.addClass("tp-mouseover");
				
				punchgs.TweenLite.killDelayedCallsTo(showHideNavElements);
				
				if (a && _a.hide_onleave) showHideNavElements(cp.find('.tparrows'),_a,"show");
				if (b && _b.hide_onleave) showHideNavElements(cp.find('.tp-bullets'),_b,"show");		
				if (c && _c.hide_onleave) showHideNavElements(cp.find('.tp-thumbs'),_c,"show");
				if (d && _d.hide_onleave) showHideNavElements(cp.find('.tp-tabs'),_d,"show");
				
				// ON MOBILE WE NEED TO HIDE ELEMENTS EVEN AFTER TOUCH
				if (_ISM) {
					cp.removeClass("tp-mouseover");		
					callAllDelayedCalls(container,opt);
				}
			}
		});
		
		cp.on("mouseleave",function() {
			cp.removeClass("tp-mouseover");		
			callAllDelayedCalls(container,opt);
		});

		// FIRST RUN HIDE ALL ELEMENTS 
		if (a && _a.hide_onleave) showHideNavElements(cp.find('.tparrows'),_a,"hide",0);
		if (b && _b.hide_onleave) showHideNavElements(cp.find('.tp-bullets'),_b,"hide",0);	
		if (c && _c.hide_onleave) showHideNavElements(cp.find('.tp-thumbs'),_c,"hide",0);
		if (d && _d.hide_onleave) showHideNavElements(cp.find('.tp-tabs'),_d,"hide",0);
		
		// Initialise Swipe Navigation
		if (c) swipeAction(cp.find('.tp-thumbs'),opt);
		if (d) swipeAction(cp.find('.tp-tabs'),opt);
		if (opt.sliderType==="carousel") swipeAction(container,opt,true);
		if (opt.navigation.touch.touchenabled=="on") swipeAction(container,opt,"swipebased");
	}

});




/////////////////////////////////
//	-	INTERNAL FUNCTIONS	- ///
/////////////////////////////////


var moveThumbsInPosition = function(container,opt) {

		var thumbs = container.hasClass("tp-thumbs") ? ".tp-thumbs" : ".tp-tabs",
			thumbmask = container.hasClass("tp-thumbs") ? ".tp-thumb-mask" : ".tp-tab-mask",
			thumbsiw = container.hasClass("tp-thumbs") ? ".tp-thumbs-inner-wrapper" : ".tp-tabs-inner-wrapper",
			thumb = container.hasClass("tp-thumbs") ? ".tp-thumb" : ".tp-tab",
			t=container.find(thumbmask),
			el = t.find(thumbsiw),
			thumbdir = opt.direction,							
			tw = thumbdir==="vertical" ? t.find(thumb).first().outerHeight(true)+opt.space : t.find(thumb).first().outerWidth(true)+opt.space,					
			tmw = thumbdir==="vertical" ? t.height() : t.width(),
			ti = parseInt(t.find(thumb+'.selected').data('liindex'),0),		
			me = tmw/tw,
			ts = thumbdir==="vertical" ? t.height() : t.width(),
			tp = 0-(ti * tw),
			els =  thumbdir==="vertical" ? el.height() : el.width(),
			curpos = tp < 0-(els-ts) ? 0-(els-ts) : curpos > 0 ? 0 : tp,
			elp = el.data('offset');


		if (me>2) {
			curpos = tp - (elp+tw) <= 0 ? tp - (elp+tw) < 0-tw ? elp : curpos + tw : curpos;		
			curpos = ( (tp-tw + elp + tmw)< tw && tp  + (Math.round(me)-2)*tw < elp) ? tp + (Math.round(me)-2)*tw : curpos;				
		}
		
		curpos = curpos < 0-(els-ts) ? 0-(els-ts) : curpos > 0 ? 0 : curpos;

		if (thumbdir!=="vertical" && t.width()>=el.width()) curpos = 0;
		if (thumbdir==="vertical" && t.height()>=el.height()) curpos = 0;


		if (!container.hasClass("dragged")) {
			if (thumbdir==="vertical")
				el.data('tmmove',punchgs.TweenLite.to(el,0.5,{top:curpos+"px",ease:punchgs.Power3.easeInOut}));
			else
				el.data('tmmove',punchgs.TweenLite.to(el,0.5,{left:curpos+"px",ease:punchgs.Power3.easeInOut}));
			el.data('offset',curpos);	
		}	
	};


// RESIZE THE THUMBS BASED ON ORIGINAL SIZE AND CURRENT SIZE OF WINDOW
var rtt = function(f,tws,c,o,lis,wh) {	
	var h = c.parent().find('.tp-'+wh+'s'),
		ins = h.find('.tp-'+wh+'s-inner-wrapper'),
		mask = h.find('.tp-'+wh+'-mask'),		
		cw = o.width*f < o.min_width ? o.min_width : Math.round(o.width*f),
		ch = Math.round((cw/o.width) * o.height),
		iw = o.direction === "vertical" ? cw : (cw*lis) + ((o.space)*(lis-1)),
		ih = o.direction === "vertical" ? (ch*lis) + ((o.space)*(lis-1)) : ch,
		anm = o.direction === "vertical" ? {width:cw+"px"} : {height:ch+"px"};
			

	tws.add(punchgs.TweenLite.set(h,anm));
	tws.add(punchgs.TweenLite.set(ins,{width:iw+"px",height:ih+"px"}));
	tws.add(punchgs.TweenLite.set(mask,{width:iw+"px",height:ih+"px"}));	
	var fin = ins.find('.tp-'+wh+'');
	if (fin)
		jQuery.each(fin,function(i,el) {
			if (o.direction === "vertical")
				tws.add(punchgs.TweenLite.set(el,{top:(i*(ch+parseInt((o.space===undefined? 0:o.space),0))),width:cw+"px",height:ch+"px"}));	
			else 
			if (o.direction === "horizontal")
				tws.add(punchgs.TweenLite.set(el,{left:(i*(cw+parseInt((o.space===undefined? 0:o.space),0))),width:cw+"px",height:ch+"px"}));	
		});	
	return tws;
};

// INTERNAL FUNCTIONS
var normalizeWheel = function( event) /*object*/ {
			
			  var sX = 0, sY = 0,       // spinX, spinY
			      pX = 0, pY = 0,       // pixelX, pixelY
			      PIXEL_STEP = 1,
			      LINE_HEIGHT = 1,
			      PAGE_HEIGHT = 1;

			  // Legacy
			  if ('detail'      in event) { sY = event.detail; }
			  if ('wheelDelta'  in event) { sY = -event.wheelDelta / 120; }
			  if ('wheelDeltaY' in event) { sY = -event.wheelDeltaY / 120; }
			  if ('wheelDeltaX' in event) { sX = -event.wheelDeltaX / 120; }

			  
			  //sY = navigator.userAgent.match(/mozilla/i) ? sY*10 : sY;
			  
			  
			  // side scrolling on FF with DOMMouseScroll
			  if ( 'axis' in event && event.axis === event.HORIZONTAL_AXIS ) {
			    sX = sY;
			    sY = 0;
			  }
			  
			  pX = sX * PIXEL_STEP;
			  pY = sY * PIXEL_STEP;

			  if ('deltaY' in event) { pY = event.deltaY; }
			  if ('deltaX' in event) { pX = event.deltaX; }



			  if ((pX || pY) && event.deltaMode) {
			    if (event.deltaMode == 1) {          // delta in LINE units
			      pX *= LINE_HEIGHT;
			      pY *= LINE_HEIGHT;
			    } else {                             // delta in PAGE units
			      pX *= PAGE_HEIGHT;
			      pY *= PAGE_HEIGHT;
			    }
			  }

			  // Fall-back if spin cannot be determined
			  if (pX && !sX) { sX = (pX < 1) ? -1 : 1; }
			  if (pY && !sY) { sY = (pY < 1) ? -1 : 1; }
			 
			  pY = navigator.userAgent.match(/mozilla/i) ? pY*10 : pY;			 			  

			  if (pY>300 || pY<-300) pY = pY/10;

			  return { spinX  : sX,
			           spinY  : sY,
			           pixelX : pX,
			           pixelY : pY };
		};

var initKeyboard = function(container,opt) {
	if (opt.navigation.keyboardNavigation!=="on")  return;		
	jQuery(document).keydown(function(e){
		if ((opt.navigation.keyboard_direction=="horizontal" && e.keyCode == 39) || (opt.navigation.keyboard_direction=="vertical" && e.keyCode==40)) {
			opt.sc_indicator="arrow";
			opt.sc_indicator_dir = 0;
			_R.callingNewSlide(opt,container,1);					
		}
		if ((opt.navigation.keyboard_direction=="horizontal" && e.keyCode == 37) || (opt.navigation.keyboard_direction=="vertical" && e.keyCode==38)) {
			opt.sc_indicator="arrow";
			opt.sc_indicator_dir = 1;
			_R.callingNewSlide(opt,container,-1);									
		}
	});		
};

var initMouseScroll = function(container,opt) {				
	if (opt.navigation.mouseScrollNavigation!=="on") return;
	var bl = navigator.userAgent.match(/mozilla/i) ?  -29 : -49,
		tl = navigator.userAgent.match(/mozilla/i) ? 29 : 49;

	container.on('mousewheel DOMMouseScroll', function(e) {							
			var res = normalizeWheel(e.originalEvent),		
				asi = container.find('.tp-revslider-slidesli.active-revslide').index(),
				psi = container.find('.tp-revslider-slidesli.processing-revslide').index(),
				fs = asi!=-1 && asi==0 || psi!=-1 && psi==0 ? true : false,
				ls = asi!=-1 && asi==opt.slideamount-1 || psi!=1 && psi==opt.slideamount-1 ? true:false;
					
		if (psi==-1) {			
			if(res.pixelY<bl) {			 
				if (!fs) {
					opt.sc_indicator="arrow";
					opt.sc_indicator_dir = 0;
					_R.callingNewSlide(opt,container,-1);																		
					return false;			 
				}
			 }
			 else 
			 if(res.pixelY>tl) {				 
			 	if (!ls) {
				 	opt.sc_indicator="arrow";
				 	opt.sc_indicator_dir = 1;
					_R.callingNewSlide(opt,container,1);								 
					return false;
				}
			 }
			 
			
		} else {
			if (!ls)
				return false;
		}	
		e.preventDefault();	
	});
};

var isme = function (a,c,e) {		
		a =  _ISM ? jQuery(e.target).closest('.'+a).length || jQuery(e.srcElement).closest('.'+a).length : jQuery(e.toElement).closest('.'+a).length || jQuery(e.originalTarget).closest('.'+a).length;
		return a === true || a=== 1 ? 1 : 0;
};

// 	-	SET THE SWIPE FUNCTION //	
var swipeAction = function(container,opt,vertical) {	
		
	container.data('opt',opt);

	// TOUCH ENABLED SCROLL
	var _ = opt.carousel;
	jQuery(".bullet, .bullets, .tp-bullets, .tparrows").addClass("noSwipe");
	
	_.Limit = "endless";			
	var notonbody =  _ISM || _R.get_browser()==="Firefox",
		SwipeOn =  container, //notonbody ? container : jQuery('body'),
		pagescroll = opt.navigation.thumbnails.direction==="vertical" || opt.navigation.tabs.direction==="vertical"? "none" : "vertical",
		swipe_wait_dir = opt.navigation.touch.swipe_direction || "horizontal";

	pagescroll = vertical == "swipebased" && swipe_wait_dir=="vertical" ? "none" : vertical ? "vertical" : pagescroll;
	
	if (!jQuery.fn.swipetp) jQuery.fn.swipetp = jQuery.fn.swipe;
	if (!jQuery.fn.swipetp.defaults || !jQuery.fn.swipetp.defaults.excludedElements) {
		if (!jQuery.fn.swipetp.defaults) 
			jQuery.fn.swipetp.defaults = new Object();
		jQuery.fn.swipetp.defaults.excludedElements = "label, button, input, select, textarea, a, .noSwipe"
	}

	SwipeOn.swipetp({			
		allowPageScroll:pagescroll,			
		triggerOnTouchLeave:true,					
		excludeElements:jQuery.fn.swipetp.defaults.excludedElements,	

		swipeStatus:function(event,phase,direction,distance,duration,fingerCount,fingerData) {			
					

		var withinslider = isme('rev_slider_wrapper',container,event),
			withinthumbs =  isme('tp-thumbs',container,event),
			withintabs =  isme('tp-tabs',container,event),
			starget = jQuery(this).attr('class'),
			istt = starget.match(/tp-tabs|tp-thumb/gi) ? true : false;
							

			
		// SWIPE OVER SLIDER, TO SWIPE SLIDES IN CAROUSEL MODE
		if (opt.sliderType==="carousel" && 
			(((phase==="move" || phase==="end" || phase=="cancel") &&  (opt.dragStartedOverSlider && !opt.dragStartedOverThumbs && !opt.dragStartedOverTabs))
			 || (phase==="start" && withinslider>0 && withinthumbs===0 && withintabs===0))) {				
								
			opt.dragStartedOverSlider = true;
			distance = (direction && direction.match(/left|up/g)) ?  Math.round(distance * -1) : distance = Math.round(distance * 1);
			
			switch (phase) {
				case "start":								
					if (_.positionanim!==undefined) {											
							_.positionanim.kill();																		
							_.slide_globaloffset = _.infinity==="off" ? _.slide_offset : _R.simp(_.slide_offset, _.maxwidth);																		
					}
					_.overpull = "none";																						
					_.wrap.addClass("dragged");		
				break;
				case "move":	
									

						_.slide_offset = _.infinity==="off" ? _.slide_globaloffset + distance : _R.simp(_.slide_globaloffset + distance, _.maxwidth);
						
						if (_.infinity==="off") {
							var bb = _.horizontal_align==="center" ? ((_.wrapwidth/2-_.slide_width/2) - _.slide_offset) / _.slide_width : (0 - _.slide_offset) / _.slide_width;
							
							if ((_.overpull ==="none" || _.overpull===0)  && (bb<0 || bb>opt.slideamount-1)) 
								_.overpull =  distance;
							else
							if (bb>=0 && bb<=opt.slideamount-1 && ((bb>=0 && distance>_.overpull) || (bb<=opt.slideamount-1 && distance<_.overpull)))
								_.overpull = 0;
																																		
							_.slide_offset = bb<0 ? _.slide_offset+ (_.overpull-distance)/1.1 + Math.sqrt(Math.abs((_.overpull-distance)/1.1)) : 
							 bb>opt.slideamount-1 ? _.slide_offset+ (_.overpull-distance)/1.1 - Math.sqrt(Math.abs((_.overpull-distance)/1.1)) : _.slide_offset ;
						 }
						_R.organiseCarousel(opt,direction,true,true);									
				break;

				case "end":
				case "cancel":		
						//duration !!
						_.slide_globaloffset = _.slide_offset;	
						_.wrap.removeClass("dragged");
						_R.carouselToEvalPosition(opt,direction);							
						opt.dragStartedOverSlider = false;
						opt.dragStartedOverThumbs = false;
						opt.dragStartedOverTabs = false;																									
				break;
			}
		}  else

		// SWIPE OVER THUMBS OR TABS
		if ((
			((phase==="move" || phase==="end" || phase=="cancel") &&  (!opt.dragStartedOverSlider && (opt.dragStartedOverThumbs || opt.dragStartedOverTabs)))
			 || 
			(phase==="start" && (withinslider>0 && (withinthumbs>0 || withintabs>0))))) {				
							
			
			if (withinthumbs>0) opt.dragStartedOverThumbs = true;
			if (withintabs>0) opt.dragStartedOverTabs = true;
			
			var thumbs = opt.dragStartedOverThumbs ? ".tp-thumbs" : ".tp-tabs",
				thumbmask = opt.dragStartedOverThumbs ? ".tp-thumb-mask" : ".tp-tab-mask",
				thumbsiw = opt.dragStartedOverThumbs ? ".tp-thumbs-inner-wrapper" : ".tp-tabs-inner-wrapper",
				thumb = opt.dragStartedOverThumbs ? ".tp-thumb" : ".tp-tab",
				_o = opt.dragStartedOverThumbs ? opt.navigation.thumbnails : opt.navigation.tabs;


			distance = (direction && direction.match(/left|up/g)) ?  Math.round(distance * -1) : distance = Math.round(distance * 1);						
			var t= container.parent().find(thumbmask),
				el = t.find(thumbsiw),
				tdir = _o.direction,
				els = tdir==="vertical" ? el.height() : el.width(),
				ts =  tdir==="vertical" ? t.height() : t.width(),
				tw = tdir==="vertical" ? t.find(thumb).first().outerHeight(true)+_o.space : t.find(thumb).first().outerWidth(true)+_o.space,	
				newpos =  (el.data('offset') === undefined ? 0 : parseInt(el.data('offset'),0)),
				curpos = 0;
			
			switch (phase) {
				case "start":							
					container.parent().find(thumbs).addClass("dragged");
					newpos = tdir === "vertical" ? el.position().top : el.position().left;
					el.data('offset',newpos);
					if (el.data('tmmove')) el.data('tmmove').pause();
					
				break;
				case "move":	
						if (els<=ts) return false;
														
						curpos = newpos + distance;																					
						curpos = curpos>0 ? tdir==="horizontal" ? curpos - (el.width() * (curpos/el.width() * curpos/el.width())) : curpos - (el.height() * (curpos/el.height() * curpos/el.height())) : curpos;
						var dif = tdir==="vertical" ? 0-(el.height()-t.height()) : 0-(el.width()-t.width());
						curpos = curpos < dif ? tdir==="horizontal" ? curpos + (el.width() * (curpos-dif)/el.width() * (curpos-dif)/el.width()) : curpos + (el.height() * (curpos-dif)/el.height() * (curpos-dif)/el.height()) : curpos;									
						if (tdir==="vertical") 									
							punchgs.TweenLite.set(el,{top:curpos+"px"});									
						else
							punchgs.TweenLite.set(el,{left:curpos+"px"});	
						

				break;

				case "end":
				case "cancel":		
					
					if (istt) {
						curpos = newpos + distance;								
														
						curpos = tdir==="vertical" ? curpos < 0-(el.height()-t.height()) ? 0-(el.height()-t.height()) : curpos : curpos < 0-(el.width()-t.width()) ? 0-(el.width()-t.width()) : curpos;
						curpos = curpos > 0 ? 0 : curpos;

						curpos = Math.abs(distance)>tw/10 ? distance<=0 ? Math.floor(curpos/tw)*tw : Math.ceil(curpos/tw)*tw : distance<0 ? Math.ceil(curpos/tw)*tw : Math.floor(curpos/tw)*tw;

						curpos = tdir==="vertical" ? curpos < 0-(el.height()-t.height()) ? 0-(el.height()-t.height()) : curpos : curpos < 0-(el.width()-t.width()) ? 0-(el.width()-t.width()) : curpos;
						curpos = curpos > 0 ? 0 : curpos;
						
						if (tdir==="vertical")
							punchgs.TweenLite.to(el,0.5,{top:curpos+"px",ease:punchgs.Power3.easeOut});
						else
							punchgs.TweenLite.to(el,0.5,{left:curpos+"px",ease:punchgs.Power3.easeOut});

						curpos = !curpos ?  tdir==="vertical" ? el.position().top : el.position().left : curpos;	
						
						el.data('offset',curpos);								
						el.data('distance',distance);

						setTimeout(function() {
							opt.dragStartedOverSlider = false;
							opt.dragStartedOverThumbs = false;
							opt.dragStartedOverTabs = false;
						},100);
						container.parent().find(thumbs).removeClass("dragged");
						
						return false;
					}
				break;							
			}
		}									
		else  {								
			if (phase=="end" && !istt) {		
				
				opt.sc_indicator="arrow";	
				
				if ((swipe_wait_dir=="horizontal" && direction == "left") || (swipe_wait_dir=="vertical" && direction == "up")) {
					opt.sc_indicator_dir = 0;
					_R.callingNewSlide(opt,opt.c,1);
					return false;
				}
				if ((swipe_wait_dir=="horizontal" && direction == "right") || (swipe_wait_dir=="vertical" && direction == "down")) {
					opt.sc_indicator_dir = 1;
					_R.callingNewSlide(opt,opt.c,-1);	
					return false;
				}

			}
			opt.dragStartedOverSlider = false;
			opt.dragStartedOverThumbs = false;
			opt.dragStartedOverTabs = false;
			return true;				
		}												
	}
	});	
};


// NAVIGATION HELPER FUNCTIONS
var hdResets = function(o) { 
	o.hide_delay = !jQuery.isNumeric(parseInt(o.hide_delay,0)) ? 0.2 : o.hide_delay/1000; 
	o.hide_delay_mobile = !jQuery.isNumeric(parseInt(o.hide_delay_mobile,0)) ? 0.2 : o.hide_delay_mobile/1000;
};

var ckNO = function(opt) { 
 	return opt && opt.enable; 
};

var ckNOLO = function(opt) { 
 	return opt && opt.enable && opt.hide_onleave===true && (opt.position===undefined ? true : !opt.position.match(/outer/g)); 
};

var callAllDelayedCalls = function(container,opt) {
	var cp = container.parent();

	if (ckNOLO(opt.navigation.arrows))
			punchgs.TweenLite.delayedCall(_ISM ? opt.navigation.arrows.hide_delay_mobile : opt.navigation.arrows.hide_delay,showHideNavElements,[cp.find('.tparrows'),opt.navigation.arrows,"hide"]);

	if (ckNOLO(opt.navigation.bullets))
		punchgs.TweenLite.delayedCall(_ISM ? opt.navigation.bullets.hide_delay_mobile : opt.navigation.bullets.hide_delay,showHideNavElements,[cp.find('.tp-bullets'),opt.navigation.bullets,"hide"]);
	
	if (ckNOLO(opt.navigation.thumbnails))
		punchgs.TweenLite.delayedCall(_ISM ? opt.navigation.thumbnails.hide_delay_mobile : opt.navigation.thumbnails.hide_delay,showHideNavElements,[cp.find('.tp-thumbs'),opt.navigation.thumbnails,"hide"]);
	
	if (ckNOLO(opt.navigation.tabs))
		punchgs.TweenLite.delayedCall(_ISM ? opt.navigation.tabs.hide_delay_mobile : opt.navigation.tabs.hide_delay,showHideNavElements,[cp.find('.tp-tabs'),opt.navigation.tabs,"hide"]);
};

var showHideNavElements = function(container,opt,dir,speed) {
	speed = speed===undefined ? 0.5 : speed;	
	switch (dir) {
		case "show":	
			punchgs.TweenLite.to(container,speed, {autoAlpha:1,ease:punchgs.Power3.easeInOut,overwrite:"auto"});
		break;
		case "hide":
			punchgs.TweenLite.to(container,speed, {autoAlpha:0,ease:punchgs.Power3.easeInOu,overwrite:"auto"});
		break;		
	}	

};


// ADD ARROWS
var initArrows = function(container,o,opt) {
	// SET oIONAL CLASSES
	o.style = o.style === undefined ? "" : o.style;
	o.left.style = o.left.style === undefined ? "" : o.left.style;
	o.right.style = o.right.style === undefined ? "" : o.right.style;	
		
	
	// ADD LEFT AND RIGHT ARROWS
	if (container.find('.tp-leftarrow.tparrows').length===0) 
		container.append('<div class="tp-leftarrow tparrows '+o.style+' '+o.left.style+'">'+o.tmp+'</div>');
	if (container.find('.tp-rightarrow.tparrows').length===0) 
		container.append('<div class="tp-rightarrow tparrows '+o.style+' '+o.right.style+'">'+o.tmp+'</div>');	
	var la = container.find('.tp-leftarrow.tparrows'),
		ra = container.find('.tp-rightarrow.tparrows');
	// CLICK HANDLINGS ON LEFT AND RIGHT ARROWS
	ra.click(function() { opt.sc_indicator="arrow"; opt.sc_indicator_dir = 0;container.revnext();});
	la.click(function() { opt.sc_indicator="arrow"; opt.sc_indicator_dir = 1;container.revprev();});
	
	// SHORTCUTS
	o.right.j = container.find('.tp-rightarrow.tparrows');
	o.left.j = container.find('.tp-leftarrow.tparrows')
	
	// OUTTUER PADDING DEFAULTS
	o.padding_top = parseInt((opt.carousel.padding_top||0),0),
	o.padding_bottom = parseInt((opt.carousel.padding_bottom||0),0);
	
	// POSITION OF ARROWS
	setNavElPositions(la,o.left);
	setNavElPositions(ra,o.right);

	if (o.position=="outer-left" || o.position=="outer-right") opt.outernav = true;
};


// PUT ELEMENTS VERTICAL / HORIZONTAL IN THE RIGHT POSITION
var putVinPosition = function(el,o) {
	var elh = el.outerHeight(true),
		elw = el.outerWidth(true),
		a = o.v_align === "top" ? {top:"0px",y:Math.round(o.v_offset)+"px"} : o.v_align === "center" ? {top:"50%",y:Math.round(((0-elh/2)+o.v_offset))+"px"} : {top:"100%",y:Math.round((0-(elh+o.v_offset)))+"px"};				
	if (!el.hasClass("outer-bottom")) punchgs.TweenLite.set(el,a);	
};

var putHinPosition = function(el,o) {

	var elh = el.outerHeight(true),
		elw = el.outerWidth(true),		
		a = o.h_align === "left" ? {left:"0px",x:Math.round(o.h_offset)+"px"} : o.h_align === "center" ? {left:"50%",x:Math.round(((0-elw/2)+o.h_offset))+"px"} : {left:"100%",x:Math.round((0-(elw+o.h_offset)))+"px"};	
	punchgs.TweenLite.set(el,a);
};

// SET POSITION OF ELEMENTS
var setNavElPositions = function(el,o) {

	var wrapper =  
		el.closest('.tp-simpleresponsive').length>0 ? 
			el.closest('.tp-simpleresponsive') : 
			el.closest('.tp-revslider-mainul').length>0 ? 
				el.closest('.tp-revslider-mainul')  : 
				el.closest('.rev_slider_wrapper').length>0  ? 
				el.closest('.rev_slider_wrapper'):
				el.parent().find('.tp-revslider-mainul'),
		ww = wrapper.width(),
		wh = wrapper.height();	

	putVinPosition(el,o);
	putHinPosition(el,o);

	if (o.position==="outer-left" && (o.sliderLayout=="fullwidth" || o.sliderLayout=="fullscreen")) 
		punchgs.TweenLite.set(el,{left:(0-el.outerWidth())+"px",x:o.h_offset+"px"});
	else 
	if (o.position==="outer-right" && (o.sliderLayout=="fullwidth" || o.sliderLayout=="fullscreen"))
		punchgs.TweenLite.set(el,{right:(0-el.outerWidth())+"px",x:o.h_offset+"px"});
	
		
	// MAX WIDTH AND HEIGHT BASED ON THE SOURROUNDING CONTAINER
	if (el.hasClass("tp-thumbs") || el.hasClass("tp-tabs")) {

		var wpad = el.data('wr_padding'),
			maxw = el.data('maxw'),
			maxh = el.data('maxh'),			
			mask = el.hasClass("tp-thumbs") ? el.find('.tp-thumb-mask') : el.find('.tp-tab-mask'),
			cpt = parseInt((o.padding_top||0),0),
			cpb = parseInt((o.padding_bottom||0),0);
					
		
		// ARE THE CONTAINERS BIGGER THAN THE SLIDER WIDTH OR HEIGHT ?
		if (maxw>ww && o.position!=="outer-left" && o.position!=="outer-right") {				
			punchgs.TweenLite.set(el,{left:"0px",x:0,maxWidth:(ww-2*wpad)+"px"});
			punchgs.TweenLite.set(mask,{maxWidth:(ww-2*wpad)+"px"});
		} else {			
			punchgs.TweenLite.set(el,{maxWidth:(maxw)+"px"});
			punchgs.TweenLite.set(mask,{maxWidth:(maxw)+"px"});			
		}
		
		if (maxh+2*wpad>wh && o.position!=="outer-bottom" && o.position!=="outer-top") {				
			punchgs.TweenLite.set(el,{top:"0px",y:0,maxHeight:(cpt+cpb+(wh-2*wpad))+"px"});
			punchgs.TweenLite.set(mask,{maxHeight:(cpt+cpb+(wh-2*wpad))+"px"});
		} else {						
			punchgs.TweenLite.set(el,{maxHeight:(maxh)+"px"});
			punchgs.TweenLite.set(mask,{maxHeight:maxh+"px"});
		}
		
		if (o.position!=="outer-left" && o.position!=="outer-right") {
			cpt = 0;
			cpb = 0;
		}

		// SPAN IS ENABLED
		if (o.span===true && o.direction==="vertical") {
			punchgs.TweenLite.set(el,{maxHeight:(cpt+cpb+(wh-2*wpad))+"px",height:(cpt+cpb+(wh-2*wpad))+"px",top:(0-cpt),y:0});					
			putVinPosition(mask,o);
		} else 

		if (o.span===true && o.direction==="horizontal") {
			punchgs.TweenLite.set(el,{maxWidth:"100%",width:(ww-2*wpad)+"px",left:0,x:0});					
			putHinPosition(mask,o);
		}
	}
};


// ADD A BULLET
var addBullet = function(container,o,li,opt) {
	
	// Check if Bullet exists already ?		
	if (container.find('.tp-bullets').length===0) {
		o.style = o.style === undefined ? "" : o.style;
		container.append('<div class="tp-bullets '+o.style+' '+o.direction+'"></div>');
	}
	
	// Add Bullet Structure to the Bullet Container
	var bw = container.find('.tp-bullets'),
		 linkto = li.data('index'),
		 inst = o.tmp;

	jQuery.each(opt.thumbs[li.index()].params,function(i,obj) { inst = inst.replace(obj.from,obj.to);})


	bw.append('<div class="justaddedbullet tp-bullet">'+inst+'</div>');

	// SET BULLET SPACES AND POSITION
	var b = container.find('.justaddedbullet'),
		am = container.find('.tp-bullet').length,
		w = b.outerWidth()+parseInt((o.space===undefined? 0:o.space),0),
		h = b.outerHeight()+parseInt((o.space===undefined? 0:o.space),0);
		
		//bgimage = li.data('thumb') !==undefined ? li.data('thumb') : li.find('.defaultimg').data('lazyload') !==undefined && li.find('.defaultimg').data('lazyload') !== 'undefined' ? li.find('.defaultimg').data('lazyload') : li.find('.defaultimg').data('src');

	if (o.direction==="vertical") {
		b.css({top:((am-1)*h)+"px", left:"0px"});
		bw.css({height:(((am-1)*h) + b.outerHeight()),width:b.outerWidth()});
	}
	else {
		b.css({left:((am-1)*w)+"px", top:"0px"});
		bw.css({width:(((am-1)*w) + b.outerWidth()),height:b.outerHeight()});			
	}
	
	b.find('.tp-bullet-image').css({backgroundImage:'url('+opt.thumbs[li.index()].src+')'});
	// SET LINK TO AND LISTEN TO CLICK
	b.data('liref',linkto);
	b.click(function() {
		opt.sc_indicator="bullet";				
		container.revcallslidewithid(linkto);
		container.find('.tp-bullet').removeClass("selected");
		jQuery(this).addClass("selected");

	});		
	// REMOVE HELP CLASS
	b.removeClass("justaddedbullet");

	// OUTTUER PADDING DEFAULTS
	o.padding_top = parseInt((opt.carousel.padding_top||0),0),
	o.padding_bottom = parseInt((opt.carousel.padding_bottom||0),0);

	if (o.position=="outer-left" || o.position=="outer-right") opt.outernav = true;

	// PUT ALL CONTAINER IN POSITION
	setNavElPositions(bw,o);		
};


var cHex = function(hex,o){	
		o = parseFloat(o);
	    hex = hex.replace('#','');	    
	    var r = parseInt(hex.substring(0,2), 16),
	    	g = parseInt(hex.substring(2,4), 16),
	    	b = parseInt(hex.substring(4,6), 16),
			result = 'rgba('+r+','+g+','+b+','+o+')';
	    return result;
};

// ADD THUMBNAILS
var addThumb = function(container,o,li,what,opt) {
	var thumbs = what==="tp-thumb" ? ".tp-thumbs" : ".tp-tabs",
		thumbmask = what==="tp-thumb" ? ".tp-thumb-mask" : ".tp-tab-mask",
		thumbsiw = what==="tp-thumb" ? ".tp-thumbs-inner-wrapper" : ".tp-tabs-inner-wrapper",
		thumb = what==="tp-thumb" ? ".tp-thumb" : ".tp-tab",
		timg = what ==="tp-thumb" ? ".tp-thumb-image" : ".tp-tab-image";

	o.visibleAmount = o.visibleAmount>opt.slideamount ? opt.slideamount : o.visibleAmount;	
	o.sliderLayout = opt.sliderLayout;

	// Check if THUNBS/TABS exists already ?		
	if (container.parent().find(thumbs).length===0) {
		o.style = o.style === undefined ? "" : o.style;		
		
		var spanw = o.span===true ? "tp-span-wrapper" : "",
			addcontent = '<div class="'+what+'s '+spanw+" "+o.position+" "+o.style+'"><div class="'+what+'-mask"><div class="'+what+'s-inner-wrapper" style="position:relative;"></div></div></div>';
	
		if (o.position==="outer-top")
			container.parent().prepend(addcontent)
		else
		if (o.position==="outer-bottom") 
			container.after(addcontent);
		else		
			container.append(addcontent);

		// OUTTUER PADDING DEFAULTS
		o.padding_top = parseInt((opt.carousel.padding_top||0),0),
		o.padding_bottom = parseInt((opt.carousel.padding_bottom||0),0);
		 
		if (o.position=="outer-left" || o.position=="outer-right") opt.outernav = true;
	}
	
	

	// Add Thumb/TAB Structure to the THUMB/TAB Container
	var linkto = li.data('index'),
		t = container.parent().find(thumbs),
		tm = t.find(thumbmask),
		tw = tm.find(thumbsiw),
		maxw = o.direction==="horizontal" ? (o.width * o.visibleAmount) + (o.space*(o.visibleAmount-1)) : o.width,		
		maxh = o.direction==="horizontal" ? o.height : (o.height * o.visibleAmount) + (o.space*(o.visibleAmount-1)),
		inst = o.tmp;
		jQuery.each(opt.thumbs[li.index()].params,function(i,obj) {
			inst = inst.replace(obj.from,obj.to);
		})	
	
	tw.append('<div data-liindex="'+li.index()+'" data-liref="'+linkto+'" class="justaddedthumb '+what+'" style="width:'+o.width+'px;height:'+o.height+'px;">'+inst+'</div>');


	// SET BULLET SPACES AND POSITION
	var b = t.find('.justaddedthumb'),
		am = t.find(thumb).length,
		w = b.outerWidth()+parseInt((o.space===undefined? 0:o.space),0),
		h = b.outerHeight()+parseInt((o.space===undefined? 0:o.space),0);		

	// FILL CONTENT INTO THE TAB / THUMBNAIL
	b.find(timg).css({backgroundImage:"url("+opt.thumbs[li.index()].src+")"});
	

	if (o.direction==="vertical") {
		b.css({top:((am-1)*h)+"px", left:"0px"});
		tw.css({height:(((am-1)*h) + b.outerHeight()),width:b.outerWidth()});
	}
	else {
		b.css({left:((am-1)*w)+"px", top:"0px"});
		tw.css({width:(((am-1)*w) + b.outerWidth()),height:b.outerHeight()});			
	}

	t.data('maxw',maxw);
	t.data('maxh',maxh);
	t.data('wr_padding',o.wrapper_padding);
	var position = o.position === "outer-top" || o.position==="outer-bottom" ? "relative" : "absolute",
		_margin = (o.position === "outer-top" || o.position==="outer-bottom") && (o.h_align==="center") ? "auto" : "0";
	

	tm.css({maxWidth:maxw+"px",maxHeight:maxh+"px",overflow:"hidden",position:"relative"});		
	t.css({maxWidth:(maxw)+"px",margin:_margin, maxHeight:maxh+"px",overflow:"visible",position:position,background:cHex(o.wrapper_color,o.wrapper_opacity),padding:o.wrapper_padding+"px",boxSizing:"contet-box"});

	
	
	// SET LINK TO AND LISTEN TO CLICK	
	b.click(function() {

		opt.sc_indicator="bullet";			
		var dis = container.parent().find(thumbsiw).data('distance');
		dis = dis === undefined ? 0 : dis;
		if (Math.abs(dis)<10) {					
			container.revcallslidewithid(linkto);			
			container.parent().find(thumbs).removeClass("selected");			
			jQuery(this).addClass("selected");
		} 
	});		
	// REMOVE HELP CLASS
	b.removeClass("justaddedthumb");

	// PUT ALL CONTAINER IN POSITION		
	setNavElPositions(t,o);	
};

var setONHeights = function(o) {
	var ot = o.c.parent().find('.outer-top'),
		ob = o.c.parent().find('.outer-bottom');
	o.top_outer = !ot.hasClass("tp-forcenotvisible") ? ot.outerHeight() || 0 : 0;
	o.bottom_outer = !ob.hasClass("tp-forcenotvisible") ? ob.outerHeight() || 0 : 0;
};


// HIDE NAVIGATION ON PURPOSE
var biggerNav = function(el,a,b,c) {				
	if (a>b || b>c) 
		el.addClass("tp-forcenotvisible")
	else
		el.removeClass("tp-forcenotvisible");
};

})(jQuery);