video gallery

') if(page_vw=='vw-2'&& paginationItemsLenth>7)pagina_length=7; if(page_vw=='vw-3'&& paginationItemsLenth>4)pagina_length=4; if(page_vw=='vw-5')pagina_length=1; if(page_vw=='vw-4')pagina_length=1; for (var i = 0; i ' + itemNumber + '') } if(page_vw=='vw-4'){ jQuery('.ts_vgallery_section_850847 .page-number').addClass('disabled-item');} if(page_vw=='vw-2'&& paginationItemsLenth>7){ if((pagina_length+1) ...') jQuery('.ts_vgallery_section_850847 .pagination').append('

  • ' + paginationItemsLenth + '
  • ') } if(page_vw=='vw-3'&& paginationItemsLenth>4){ if((pagina_length+1) ...') jQuery('.ts_vgallery_section_850847 .pagination').append('
  • ' + paginationItemsLenth + '
  • ') } jQuery('.ts_vgallery_section_850847 .pagination').append('
  • '+next_text+'
  • ') jQuery('.ts_vgallery_section_850847 ul.pagination li').not('.page-null').click(function (e) { if( jQuery(this).hasClass('active')){ return false; } max_heigth =jQuery('.ts_vgallery_main_850847').height(); if(jQuery(this).parent().find('.active').length){ const tsvgMain = jQuery('.ts_vgallery_section_850847')[0] const tsvgHeaderOffset = 200; const tsvgMainPosition = tsvgMain.getBoundingClientRect().top; const tsvgOffsetPosition = tsvgMainPosition + window.pageYOffset - tsvgHeaderOffset; window.scrollTo({ top: tsvgOffsetPosition, behavior: "smooth", }); } let effect_open_type = jQuery('.ts_vgallery_main_850847').attr('data-item-open'); if(effect_open_type!='effect-1'){ jQuery('.ts_vgallery_main_850847').css({'min-height': max_heigth+'px','transition':'unset'}); } jQuery('.ts_vgallery_section_850847 .pagination li').removeClass('active') jQuery('.ts_vgallery_section_850847 .pagination-item[item-number="prev"]').removeClass('disabled-item') jQuery('.ts_vgallery_section_850847 .pagination-item[item-number="next"]').removeClass('disabled-item') jQuery(this).addClass('active'); pageNumber = jQuery(this).attr('data-item-number'); if (pageNumber == '1') { jQuery('.ts_vgallery_section_850847 .page-item[data-item-number="prev"]').addClass('disabled-item'); } else{ jQuery('.ts_vgallery_section_850847 .page-item[data-item-number="prev"]').removeClass('disabled-item'); } if (+pageNumber == paginationItemsLenth) { jQuery('.ts_vgallery_section_850847 .page-item[data-item-number="next"]').addClass('disabled-item'); }else{ jQuery('.ts_vgallery_section_850847 .page-item[data-item-number="next"]').removeClass('disabled-item'); } showFrom = numberItemsPerPage * (pageNumber - 1); showTo = showFrom + numberItemsPerPage; appendSelectedComments_850847(userdata,showFrom, showTo) jQuery('.ts_vgallery_section_850847 .page-item[data-item-number="prev"]').unbind('click') jQuery('.ts_vgallery_section_850847 .page-item[data-item-number="prev"]').click(function () { if(jQuery(this).parent().find('.active').length){ const tsvgMain = jQuery('.ts_vgallery_section_850847')[0] const tsvgHeaderOffset = 200; const tsvgMainPosition = tsvgMain.getBoundingClientRect().top; const tsvgOffsetPosition = tsvgMainPosition + window.pageYOffset - tsvgHeaderOffset; window.scrollTo({ top: tsvgOffsetPosition, behavior: "smooth", }); } currentPosition = parseInt(jQuery('.ts_vgallery_section_850847 li.page-item.active').attr('data-item-number')) var last_element = jQuery('.ts_vgallery_section_850847 li.page-item.active').hasClass( "page-number" ); var prevPosiotion = currentPosition - 1; jQuery('.ts_vgallery_section_850847 .page-item').removeClass('active') let first_item_position = parseInt(jQuery(".ts_vgallery_section_850847 .page-number").first().attr('data-item-number')); if(first_item_position>1&&last_element){ jQuery(".ts_vgallery_section_850847 .page-number").each(function(){ let item_position = parseInt(jQuery(this).attr('data-item-number'))-1; jQuery(this).attr('data-item-number',item_position).find('a').text(item_position) }); } if((parseInt(jQuery(".ts_vgallery_section_850847 .page-number").last().attr('data-item-number'))+1) ...') if((parseInt(jQuery(".ts_vgallery_section_850847 .page-number").last().attr('data-item-number'))+1) >= paginationItemsLenth && (page_vw=='vw-2' || page_vw=='vw-3'))jQuery(".ts_vgallery_section_850847 .pagination").find('.page-null').remove(); if(last_element){ } else { jQuery('.ts_vgallery_section_850847 .page-item[data-item-number="' + parseInt(jQuery(".ts_vgallery_section_850847 .page-number").last().attr('data-item-number')) + '"]').addClass('active') } if (-currentPosition == 1) { jQuery('.ts_vgallery_section_850847 .page-item[data-item-number="prev"]').addClass('disabled-item'); } else{ jQuery('.ts_vgallery_section_850847 .page-item[data-item-number="prev"]').removeClass('disabled-item'); } if (+currentPosition == paginationItemsLenth) { jQuery('.ts_vgallery_section_850847 .page-item[data-item-number="next"]').addClass('disabled-item'); }else{ jQuery('.ts_vgallery_section_850847 .page-item[data-item-number="next"]').removeClass('disabled-item'); } jQuery('.ts_vgallery_section_850847 .page-item[data-item-number="' + prevPosiotion + '"]').click() }) jQuery('.ts_vgallery_section_850847 .page-item[data-item-number="next"]').unbind('click') jQuery('.ts_vgallery_section_850847 .page-item[data-item-number="next"]').click(function () { if(jQuery(this).parent().find('.active').length){ const tsvgMain = jQuery('.ts_vgallery_section_850847')[0] const tsvgHeaderOffset = 200; const tsvgMainPosition = tsvgMain.getBoundingClientRect().top; const tsvgOffsetPosition = tsvgMainPosition + window.pageYOffset - tsvgHeaderOffset; window.scrollTo({ top: tsvgOffsetPosition, behavior: "smooth", }); } currentPosition = parseInt(jQuery('.ts_vgallery_section_850847 li.page-item.active').attr('data-item-number')) var nextPosition = currentPosition + 1; jQuery('.ts_vgallery_section_850847 .page-item').removeClass('active') let last_item_position = parseInt(jQuery(".ts_vgallery_section_850847 .page-number").last().attr('data-item-number')); if((last_item_position...') if((parseInt(jQuery(".ts_vgallery_section_850847 .page-number").last().attr('data-item-number'))+1) >= paginationItemsLenth && (page_vw=='vw-2' || page_vw=='vw-3'))jQuery(".ts_vgallery_section_850847 .pagination").find('.page-null').remove(); if (currentPosition == '1') { jQuery('.ts_vgallery_section_850847 .page-item[data-item-number="prev"]').addClass('disabled-item'); } else{ jQuery('.ts_vgallery_section_850847 .page-item[data-item-number="prev"]').removeClass('disabled-item'); } if (+currentPosition == paginationItemsLenth) { jQuery('.ts_vgallery_section_850847 .page-item[data-item-number="next"]').addClass('disabled-item'); }else{ jQuery('.ts_vgallery_section_850847 .page-item[data-item-number="next"]').removeClass('disabled-item'); } jQuery('.ts_vgallery_section_850847 .page-item[data-item-number="' + nextPosition + '"]').click(); }) if('Classic Gallery'=='Grid Video Gallery') { var interval_pg_cl_fn_850847= setInterval(upGrid_cl_850847, 100); function upGrid_cl_850847() { if (typeof(window.Modernizr) != "undefined" && window.Modernizr != null && typeof(window.imagesLoaded) != "undefined" && window.imagesLoaded != null && typeof(window.CBPGridGallery) != "undefined" && window.CBPGridGallery != null){ new CBPGridGallery(document.getElementById(`grid850847-gallery`)); clearInterval(interval_pg_cl_fn_850847); } } } if(effect_open_type=='effect-1' && jQuery('.ts_vgallery_main_850847 figure>ul>li').length>1){ jQuery('.ts_vgallery_section_850847 .pagination-outer').attr('style','transition:unset; transform: translateY(200%);'); jQuery('.ts_vgallery_section_850847').attr('style','transition:unset; margin-bottom:140px;'); setTimeout(() => { jQuery('.ts_vgallery_section_850847 .pagination-outer').attr('style','transition: transform 3s ease-out;transform: translateY(0%);'); jQuery('.ts_vgallery_section_850847').attr('style','transition: margin 3s ease-out;margin-bottom:0;'); }, 1000); }else{ setTimeout(() => { jQuery('.ts_vgallery_main_850847').css({'transition':'min-height 3s ease-in-out','min-height':'0px'}); }, 1000); } }) jQuery('.ts_vgallery_section_850847 .page-number:nth-child(2)').click(); } if( jQuery('.ts_vgallery_main_850847').attr("data-pagination")=='load-more'){ jQuery('.ts_vgallery_section_850847 .pagination-outer').append(''+load_text+''); if( jQuery('.ts_vgallery_section_850847 .pagination-outer').attr("data-load-vw")=='ef-4' || jQuery('.ts_vgallery_section_850847 .pagination-outer').attr("data-load-vw")=='ef-5' ){ if(!jQuery('.ts_vgallery_section_850847 .pagination-outer svg').length){ if(jQuery('.ts_vgallery_section_850847 .pagination-outer').attr("data-load-vw")=='ef-5'){ jQuery('.ts_vgallery_section_850847 .pagination-outer').find('.btn-lg').html('
    • '+load_text+'
    '); }else{ jQuery('.ts_vgallery_section_850847 .pagination-outer').find('.btn-lg').html('
    '); } var svg = document.querySelector('.btn-lg svg'), svgPath = new Proxy({ y: null, smoothing: null }, { set(target, key, value) { target[key] = value; if(target.y !== null && target.smoothing !== null) { svg.innerHTML = getPath(target.y, target.smoothing, null); } return true; }, get(target, key) { return target[key]; } }); svgPath.y = 20; svgPath.smoothing = 0; } } jQuery('.ts_vgallery_section_850847 .btn-lg').click(function (e) { let max_heigth =jQuery('.ts_vgallery_main_850847').height(); let main_length = jQuery('.ts_vgallery_main_850847 figure ul li').length; flag_load = 'false'; if(jQuery(this).closest('.pagination-outer').attr("data-load-vw")=='ef-3'||jQuery(this).closest('.pagination-outer').attr("data-load-vw")=='ef-4'||jQuery(this).closest('.pagination-outer').attr("data-load-vw")=='ef-5'){ flag_load = 'true'; } jQuery('.ts_vgallery_main_850847').css({'max-height': max_heigth+'px','transition':'unset'}); setTimeout(() => { jQuery('.ts_vgallery_main_850847').css({'transition':'max-height 3s ease-in-out','max-height':main_length+'000vh'}); }, 100); appendSelectedComments_850847(jQuery('.ts_vgallery_main_850847 figure ul li').not('.item-show'),0, numberItemsPerPage); if(jQuery('.ts_vgallery_section_850847 .pagination-outer').attr("data-load-vw")=='ef-3'){ jQuery('.ts_vgallery_section_850847 .btn-lg').addClass('animate'); setTimeout(function(){ jQuery('.ts_vgallery_section_850847 .btn-lg').removeClass('animate'); },700); } if(!jQuery('.ts_vgallery_section_850847 .btn-lg').hasClass('loading')&&(jQuery('.ts_vgallery_section_850847 .pagination-outer').attr("data-load-vw")=='ef-4'||jQuery('.ts_vgallery_section_850847 .pagination-outer').attr("data-load-vw")=='ef-5')&&jQuery('.ts_vgallery_section_850847 .pagination-outer svg').length) { jQuery('.ts_vgallery_section_850847 .btn-lg').addClass('loading'); setTimeout(() => { svg.innerHTML = getPath(0, 0, [ [3, 14], [8, 19], [21, 6] ]); }, 1000 / 2); setTimeout(() => { jQuery('.ts_vgallery_section_850847 .btn-lg').removeClass('loading'); if(jQuery('.ts_vgallery_section_850847 .pagination-outer').attr("data-load-vw")=='ef-5'){ jQuery('.ts_vgallery_section_850847 .pagination-outer').find('.btn-lg').html('
    • '+load_text+'
    '); }else{ jQuery('.ts_vgallery_section_850847 .pagination-outer').find('.btn-lg').html('
    '); } }, 2000 ); } }) appendSelectedComments_850847(jQuery('.ts_vgallery_section_850847 .ts_vgallery_main_850847 figure ul li').not('.item-show'),0, numberItemsPerPage) } } function newPaginate_850847(){ var interval_pag_fn_850847= setInterval(setPagina_850847, 100); function setPagina_850847() { if( typeof(jQuery) != "undefined" && jQuery != null){ if( jQuery('.ts_vgallery_main_850847').attr("data-pagination")=='pagination'){ paginationGenerate_850847(); } if( jQuery('.ts_vgallery_main_850847').attr("data-pagination")=='load-more'){ paginationGenerate_850847(); } clearInterval(interval_pag_fn_850847); } } } newPaginate_850847(); function paginationGenerate(){ paginationGenerate_850847(); } function getPoint(point, i, a, smoothing) { let cp = (current, previous, next, reverse) => { let p = previous || current, n = next || current, o = { length: Math.sqrt(Math.pow(n[0] - p[0], 2) + Math.pow(n[1] - p[1], 2)), angle: Math.atan2(n[1] - p[1], n[0] - p[0]) }, angle = o.angle + (reverse ? Math.PI : 0), length = o.length * smoothing; return [current[0] + Math.cos(angle) * length, current[1] + Math.sin(angle) * length]; }, cps = cp(a[i - 1], a[i - 2], point, false), cpe = cp(point, a[i - 1], a[i + 1], true); return `C ${cps[0]},${cps[1]} ${cpe[0]},${cpe[1]} ${point[0]},${point[1]}`; } function getPath(update, smoothing, pointsNew) { let points = pointsNew ? pointsNew : [ [4, 12], [12, update], [20, 12] ], d = points.reduce((acc, point, i, a) => i === 0 ? `M ${point[0]},${point[1]}` : `${acc} ${getPoint(point, i, a, smoothing)}`, ''); return ``; }
    Scroll Up