"),jQuery(document).on("dragover",(function(e){e.preventDefault(),e.target!=this&&(jQuery("#rtm-media-gallery-uploader").show(),"undefined"!=typeof rtmedia_bp_enable_activity&&"1"==rtmedia_bp_enable_activity&&r.addClass("rtm-drag-drop-active"),a.addClass("rtm-drag-drop-active"),jQuery("#rtm-drop-files-title").show())})).on("dragleave",(function(e){if(e.preventDefault(),0!=e.originalEvent.pageX&&0!=e.originalEvent.pageY)return!1;"undefined"!=typeof rtmedia_bp_enable_activity&&"1"==rtmedia_bp_enable_activity&&(r.removeClass("rtm-drag-drop-active"),r.removeAttr("style")),a.removeClass("rtm-drag-drop-active"),jQuery("#rtm-drop-files-title").hide()})).on("drop",(function(e){e.preventDefault(),jQuery(".bp-suggestions").focus(),"undefined"!=typeof rtmedia_bp_enable_activity&&"1"==rtmedia_bp_enable_activity&&(r.removeClass("rtm-drag-drop-active"),r.removeAttr("style")),a.removeClass("rtm-drag-drop-active"),jQuery("#rtm-drop-files-title").hide()})),jQuery(".rtmedia-container").on("click",".rtmedia-delete-album",(function(e){e.preventDefault(),confirm(rtmedia_album_delete_confirmation)&&jQuery(this).closest("form").submit()})),jQuery(".rtmedia-container").on("click",".rtmedia-delete-media",(function(e){e.preventDefault(),confirm(rtmedia_media_delete_confirmation)&&jQuery(this).closest("form").submit()})),rtmedia_init_action_dropdown(""),e(document).click((function(){e(".click-nav ul").is(":visible")&&e(".click-nav ul",this).hide()})),jQuery(".rtmedia-comment-link").on("click",(function(e){e.preventDefault(),jQuery("#comment_content").focus()})),jQuery(".rtm-more").length>0&&e(".rtm-more").shorten({showChars:200}),"undefined"!=typeof rtmedia_masonry_layout&&rtm_is_true(rtmedia_masonry_layout)&&"undefined"!=typeof rtmedia_masonry_layout_activity&&rtm_is_true(rtmedia_masonry_layout_activity)&&rtmedia_activity_masonry(),jQuery(document).ajaxComplete((function(e,t,i){var a=get_parameter("action",i.data);("post_update"===a||"get_single_activity_content"===a||"activity_get_older_updates"===a)&&"undefined"!=typeof rtmedia_masonry_layout&&rtm_is_true(rtmedia_masonry_layout)&&"undefined"!=typeof rtmedia_masonry_layout_activity&&rtm_is_true(rtmedia_masonry_layout_activity)&&rtmedia_activity_masonry()})),"undefined"!=typeof rtmedia_masonry_layout&&rtm_is_true(rtmedia_masonry_layout)&&0==jQuery(".rtmedia-container .rtmedia-list.rtm-no-masonry").length&&((rtm_masonry_container=jQuery(".rtmedia-container .rtmedia-list")).masonry({itemSelector:".rtmedia-list-item"}),setInterval((function(){jQuery.each(jQuery(".rtmedia-list.masonry .rtmedia-item-title"),(function(e,t){jQuery(t).width(jQuery(t).siblings(".rtmedia-item-thumbnail").children("img").width())})),rtm_masonry_reload(rtm_masonry_container)}),1e3),jQuery.each(jQuery(".rtmedia-list.masonry .rtmedia-item-title"),(function(e,t){jQuery(t).width(jQuery(t).siblings(".rtmedia-item-thumbnail").children("img").width())}))),jQuery(".rtm-uploader-tabs").length>0&&jQuery(".rtm-uploader-tabs li").click((function(e){jQuery(this).hasClass("active")||(jQuery(this).siblings().removeClass("active"),jQuery(this).parents(".rtm-uploader-tabs").siblings().hide(),class_name=jQuery(this).attr("class"),jQuery(this).parents(".rtm-uploader-tabs").siblings('[data-id="'+class_name+'"]').show(),jQuery(this).addClass("active"),"rtm-upload-tab"!=class_name?jQuery("div.moxie-shim").hide():jQuery("div.moxie-shim").show())})),jQuery(".rtmedia-container").on("click",".rtm-delete-media",(function(e){e.preventDefault();var t=RTMedia_Main_JS.media_delete_confirmation;if(confirm(t)){var i=jQuery(this).closest("li"),a=jQuery("#rtmedia_media_delete_nonce").val(),r=jQuery(this).parents(".rtmedia-list-item").data("media_type"),n={action:"delete_uploaded_media",nonce:a,media_id:i.attr("id"),media_type:r};jQuery.ajax({url:RTMedia_Main_JS.rtmedia_ajaxurl,type:"POST",data:n,dataType:"JSON",success:function(e){window.location.reload(),"rtmedia-media-deleted"===e.data.code?(rtmedia_gallery_action_alert_message(RTMedia_Main_JS.media_delete_success,"success"),i.remove(),"undefined"!=typeof rtmedia_masonry_layout&&rtm_is_true(rtmedia_masonry_layout)&&rtm_masonry_reload(rtm_masonry_container),jQuery("#user-media span, #media-groups-li #media span, #rtmedia-nav-item-all span").text(e.data.all_media_count),jQuery("#rtmedia-nav-item-photo span").text(e.data.photos_count),jQuery("#rtmedia-nav-item-music span").text(e.data.music_count),jQuery("#rtmedia-nav-item-video span").text(e.data.videos_count)):rtmedia_gallery_action_alert_message(e.data.message,"warning")}})}}))})),function(e){e.fn.shorten=function(t){"use strict";var i={showChars:100,minHideChars:10,ellipsesText:"...",moreText:rtmedia_read_more,lessText:rtmedia__show_less,onLess:function(){},onMore:function(){},errMsg:null,force:!1};return t&&e.extend(i,t),!(e(this).data("jquery.shorten")&&!i.force)&&(e(this).data("jquery.shorten",!0),e(document).off("click",".morelink"),e(document).on({click:function(){var t=e(this);return t.hasClass("less")?(t.removeClass("less"),t.html(i.moreText),t.parent().prev().hide(0,(function(){t.parent().prev().prev().show()})).hide(0,(function(){i.onLess()}))):(t.addClass("less"),t.html(i.lessText),t.parent().prev().show(0,(function(){t.parent().prev().prev().hide()})).show(0,(function(){i.onMore()}))),!1}},".morelink"),this.each((function(){var t=e(this),a=t.html();if(t.text().length>i.showChars+i.minHideChars){var r=a.substr(0,i.showChars);if(r.indexOf("<")>=0){for(var n=!1,o="",m=0,d=[],l=null,s=0,c=0;c<=i.showChars;s++)if("<"!=a[s]||n||(n=!0,"/"==(l=a.substring(s+1,a.indexOf(">",s)))[0]?l!="/"+d[0]?i.errMsg="ERROR en HTML: the top of the stack should be the tag that closes":d.shift():"br"!=l.toLowerCase()&&d.unshift(l)),n&&">"==a[s]&&(n=!1),n)o+=a.charAt(s);else if(c++,m<=i.showChars)o+=a.charAt(s),m++;else if(d.length>0){for(j=0;j";break}r=e("").html(o+''+i.ellipsesText+"").html()}else r+=i.ellipsesText;var u='
'+r+'
'+a+'
'+i.moreText+"";t.html(u),t.find(".allcontent").hide(),e(".shortcontent p:last",t).css("margin-bottom",0)}})))}}(jQuery),window.onload=function(){"undefined"!=typeof rtmedia_masonry_layout&&"true"==rtmedia_masonry_layout&&0==jQuery(".rtmedia-container .rtmedia-list.rtm-no-masonry").length&&rtm_masonry_reload(rtm_masonry_container),rtm_search_media_text_validation(),check_condition("search")&&jQuery("#media_search_remove").show()},jQuery(document).ready((function(){rtm_upload_terms_activity(),jQuery("body").hasClass("has-sidebar")&&0===jQuery("#secondary").length&&(jQuery(".rtmedia-single-container").length||jQuery(".rtmedia-container").length)&&jQuery("body").removeClass("has-sidebar"),rtmedia_main&&("undefined"!==rtmedia_main.rtmedia_direct_download_link&&parseInt(rtmedia_main.rtmedia_direct_download_link)||jQuery(document).on("bp_ajax_request",(function(e){setTimeout((function(){jQuery("video").each((function(){jQuery(this).attr("controlsList","nodownload"),jQuery(this).attr("playsinline","playsinline"),jQuery(this).load()}))}),200)})))}));
\ No newline at end of file