[ Avaa Bypassed ]




Upload:

Command:

hmhc3928@18.117.7.254: ~ $
(function ($) {
	$.fn.extend({

		thim_simple_slider: function (options) {

			// Default options for slider
			var defaults = {
				item        : 3,
				itemActive  : 1,
				itemSelector: '.item-event',
				align       : 'left',
				navigation  : true,
				pagination  : true,
				height      : 400,
				activeWidth : 1170,
				itemWidth   : 800,
				prev_text   : 'Prev',
				next_text   : 'Next'
			};

			var options = $.extend(defaults, options);

			return this.each(function () {
				var opts = options;

				// get thim_simple_slider
				var obj = $(this);

				// Get item selector
				var items = $(opts.itemSelector, obj),
					count_item = items.length,
					current_item = opts.itemActive - 1,
					loaded = false;


				obj.wrapInner('<div class="thim-simple-wrapper ' + opts.align + '"><div class="wrapper"></div></div>');

				var simple_wrapper = $(".thim-simple-wrapper", obj),
					wrapper = simple_wrapper.find(".wrapper"),
					activeWidth = opts.activeWidth,
					itemWidth = opts.itemWidth;

				_parseItems(items);

				var item_slider = simple_wrapper.find(".simple-item");


				simple_wrapper.css('height', opts.height);
				$('.simple-item', obj).css('height', opts.height);
				//wrapper.css({'height': dimension.height});

				_updatePosition();
				_navEvent();
				_pagiEvent();

				//Event for navigation
				function _navEvent() {
					loaded = true;
					if (opts.navigation) {
						simple_wrapper.append('<div class="navigation"><div data-nav="prev" class="control-nav prev">'+opts.prev_text+'</div><div data-nav="next" class="control-nav next">'+opts.next_text+'</div></div>');
					}else{
						return;
					}
					$('.control-nav', obj).on('click', function () {
						var data_nav = $(this).data('nav');
						if (data_nav == 'prev') {
							_prevItem();
						} else {
							_nextItem();
						}
					});
				}


				//Event for pagination
				function _pagiEvent() {
					if (opts.pagination) {
						var pagi_html = '<div class="pagination">';
						for ( var i = 0; i < count_item ; i++) {
							if( i === current_item ) {
								pagi_html += '<div class="item active"></div>';
							}else{
								pagi_html += '<div class="item"></div>';
							}

						}
						pagi_html += '</div>';

						simple_wrapper.append(pagi_html);
					}else{
						return;
					}

					$('.pagination .item', obj).on('click', function ( e ) {
						if( $(this).hasClass('active')) {
							e.preventDefault();
						}
						var index = $( ".pagination .item" ).index( this );
						$('.pagination .item', obj).removeClass('active');
						$(this).addClass('active');
						current_item = index;
						_updatePosition();
					});
				}


				function _updatePosition() {
					if( loaded ) {
						item_slider.removeClass('active-item').css({'width': '', 'opacity': ''});
						item_slider.eq(current_item).addClass('active-item').css({'width': activeWidth}).animate({
							'opacity': 0.2
						}, 300, function(){
							item_slider.eq(current_item).animate({
								'opacity': 1
							}, 500);
						})
					}
					var list_item = $('.simple-item:not(.active-item)', obj);
					//Set width for items
					if( opts.align == 'left' ) {
						item_slider.eq(current_item).css({'width':activeWidth, 'left': ''});
					}else{
						item_slider.eq(current_item).css({'width':activeWidth, 'right': ''});
					}

					list_item.css('width', itemWidth);

					var right_pos = activeWidth;
					for ( var i = current_item; i < list_item.length; i++) {
						var elem = list_item.eq(i);
						if( opts.align == 'left' ) {
							elem.css('left', right_pos);
						}else{
							elem.css('right', right_pos);
						}
						right_pos = right_pos + itemWidth;
					}
					if( current_item > 0 ) {
						for ( var i = 0 ; i < current_item ; i++) {
							var elem = list_item.eq(i);
							if( opts.align == 'left' ) {
								elem.css('left', right_pos);
							}else{
								elem.css('right', right_pos);
							}
							right_pos = right_pos + itemWidth;
						}
					}

					if( opts.pagination ) {
						$('.pagination .item', obj).removeClass('active').eq(current_item).addClass('active');
					}
				}


				function _nextItem() {
					if (current_item < count_item - 1) {
						current_item = current_item + 1;
					} else {
						current_item = 0;
					}
					_updatePosition();
				};

				function _prevItem() {
					if (current_item > 0) {
						current_item = current_item - 1;
					} else {
						current_item = count_item - 1;
					}
					_updatePosition();
				}

				function _parseItems($items) {
					$items.each(function (key, val) {
						if (key == current_item) {
							$(val).wrap('<div class="simple-item active-item"></div>');
						} else {
							$(val).wrap('<div class="simple-item"></div>');
						}
					});
				}
			});
		}
	});
})(jQuery);

Filemanager

Name Type Size Permission Actions
admin-custom-script.js File 6.23 KB 0644
custom-script-v2.js File 61.41 KB 0644
custom-script-v2.min.js File 36.23 KB 0644
isotope.pkgd.min.js File 34.61 KB 0644
jquery.appear.js File 2.36 KB 0644
jquery.appear.min.js File 858 B 0644
jquery.countTo.min.js File 943 B 0644
jquery.flexslider-min.js File 22.48 KB 0644
jquery.magnific-popup.min.js File 19.74 KB 0644
jquery.waypoints.min.js File 7.83 KB 0644
main.min.js File 79.85 KB 0644
mb-commingsoon.min.js File 5.37 KB 0644
portfolio.js File 11.36 KB 0644
portfolio.min.js File 5.08 KB 0644
smooth_scroll.min.js File 7.25 KB 0644
thim-content-slider.js File 6.62 KB 0644
thim-course-filter-v2.js File 3.48 KB 0644
thim-course-filter-v2.min.js File 2.06 KB 0644
thim-course-filter.js File 8.04 KB 0644
thim-course-filter.min.js File 4.21 KB 0644
thim-scripts.js File 29.93 KB 0644
thim-scripts.min.js File 18.1 KB 0644
thim_simple_slider.js File 4.68 KB 0644
thim_simple_slider.min.js File 2.2 KB 0644