//v0.4n

//$(document).ready(function() {
jQuery(function($) {

	setTimeout(function() {
		
    $("#imgur img.lazy").lazyload({
        effect : "fadeIn",
        skip_invisible : true
    });
    
    $("#hizliresim img.lazy").lazyload({
        effect : "fadeIn",
        skip_invisible : true
    });
     $("#lowres img.lazy").lazyload({
        effect : "fadeIn",
        skip_invisible : true
    });	
     $("#free img.lazy").lazyload({
        effect : "fadeIn",
        skip_invisible : true
    });		
     $("#vanillaskins img.lazy").lazyload({
        effect : "fadeIn",
        skip_invisible : true
    });
     $("#animatedLikeGif img.lazy").lazyload({
        effect : "fadeIn",
        skip_invisible : true
    });	

    $("img.lazy").on("click", function(e) {
        e.preventDefault();
		var url = $(this).attr("name");
        $("#skin-url").val(url).select();
        try {
        } catch (e) {}
    });
    
    $("#skin-url").on("click", function(e) {
        $(this).select();
        try {
        } catch (e) {}
    });

	$("#nav a").on("click", function() {
        var _this = $(this);
        if (_this.hasClass("link")) {
            return;
        }
        $("#nav a").removeClass("active");
        _this.addClass("active");
        var id = _this.attr("href");
        $(".skins-wrapper").hide();
        $(id).show();
        $(window).scrollTop(0).trigger("scroll");
        return false;
    });
    $("#UseEffect").on("click", function(e) {
		loadSpecialEffectSkin(e)
    });
    $("#UseEffect2").on("click", function(e) {
		toastr.info("<b>[SERVER]:</b> Special Effect erased");
		if (document.getElementsByClassName("skins-wrapper")[4].children[0]) document.getElementsByClassName("skins-wrapper")[4].children[0].remove()
			SpecialEffectPlayers[application.lastSentNick]=null
			//
			animatedskins[application.lastSentNick] = null
			//
			localStorage.setItem("isActualUsingSpecialEffectsSkin", null);
			window.application.sendSocket3Info("spfc", null)		
    });	
	setTimeout(function() {
		$("#nav a")[0].click();
		startSpecialEffectSkin();
	}, 950);
	}, 900);
});

function startSpecialEffectSkin(){
	if (localStorage.getItem("isActualUsingSpecialEffectsSkin")){
			try {	
			for (var i = 0; i < $(".skins-wrapper").length; i++){
				if ($(".skins-wrapper")[i].style.display != "none"){
					
					for (var j = 0; j < document.getElementsByClassName("skins-wrapper")[i].children.length; j++)
						if (document.getElementsByClassName("skins-wrapper")[i].children[j].children[0].name ==localStorage.getItem("isActualUsingSpecialEffectsSkin")){ 
							if (document.getElementsByClassName("skins-wrapper")[4].children[0]) document.getElementsByClassName("skins-wrapper")[4].children[0].remove()
							document.getElementsByClassName("skins-wrapper")[4].append(document.getElementsByClassName("skins-wrapper")[i].children[j])
						} 
				}			
			}			
		} catch (e) {}	
	}

function loadSpecialEffectSkin(e){
		if (($("#nick").val().includes('℄') && $("#clantag").val() == window.atob(window.clanTagLc)) || window.proLicenceUID || $("#skin-url").val() == "Byzantium" || window.tempAnimatedCoolArray.includes($("#skin-url").val())){
			try {	
			toastr.info("<b>[SERVER]:</b> Special Effect " + $("#skin-url").val() + " activated");
			for (var i = 0; i < $(".skins-wrapper").length; i++){
				if ($(".skins-wrapper")[i].style.display != "none"){
					
					for (var j = 0; j < document.getElementsByClassName("skins-wrapper")[i].children.length; j++)
						if (document.getElementsByClassName("skins-wrapper")[i].children[j].children[0].name ==$("#skin-url").val()){ 
							if (document.getElementsByClassName("skins-wrapper")[4].children[0]) document.getElementsByClassName("skins-wrapper")[4].children[0].remove()
							document.getElementsByClassName("skins-wrapper")[4].append(document.getElementsByClassName("skins-wrapper")[i].children[j])
						} 
				}			
			}	
				localStorage.setItem("isActualUsingSpecialEffectsSkin", $("#skin-url").val());
			} catch (e) {}
		}
		else{
			toastr.warning("<b>[SERVER]:</b> Not Premium account found. If you donated in the past, please refer it to Legend mod discord.<br>Thank you for using our scripts!").css("width", "350px");
		}	
}

@@ -1,15 +1,15 @@
 //v0.4
-n
+o
 %0A%0A//$(do
@@ -2426,32 +2426,33 @@
 ren.length; j++)
+%7B
 %0A%09%09%09%09%09%09if (docum
@@ -2912,17 +2912,16 @@
 (e) %7B%7D%09%0A
-%09
 %7D%0A%0Afunct
@@ -2924,20 +2924,21 @@
 unction 
-load
+start
 SpecialE
@@ -2951,334 +2951,83 @@
 kin(
-e
 )%7B%0A
-%09
 %09if (
-($(%22#nick%22).val().includes('%E2%84%84') && $(%22#clantag%22).val() == window.atob(window.clanTagLc)) %7C%7C window.proLicenceUID %7C%7C $(%22#skin-url%22).val() == %22Byzantium%22 %7C%7C window.tempAnimatedCoolArray.includes($(%22#skin-url%22).val()))%7B%0A%09%09%09try %7B%09%0A%09%09%09toastr.info(%22%3Cb%3E%5BSERVER%5D:%3C/b%3E 
+localStorage.getItem(%22isActualUsing
 Special
- 
 Effect
- %22 + $(%22#skin-url%22).val() + %22 activated%22);
+sSkin%22))%7B%0A%09%09%09try %7B%09
 %0A%09%09%09
@@ -3129,38 +3129,32 @@
 lay != %22none%22)%7B%0A
-%09%09%09%09%09%0A
 %09%09%09%09%09for (var j 
@@ -3329,35 +3329,70 @@
 .name ==
-$(%22#skin-url%22).val(
+localStorage.getItem(%22isActualUsingSpecialEffectsSkin%22
 ))%7B %0A%09%09%09
@@ -3698,313 +3698,25 @@
 %09%0A%09%09
-%09%09localStorage.setItem(%22isActualUsingSpecialEffectsSkin%22, $(%22#skin-url%22).val());%0A%09%09%09%7D catch (e) %7B%7D%0A%09%09%7D%0A%09%09else%7B%0A%09%09%09toastr.warning(%22%3Cb%3E%5BSERVER%5D:%3C/b%3E Not Premium account found. If you donated in the past, please refer it to Legend mod discord.%3Cbr%3EThank you for using our scripts!%22).css(%22width%22, %22350px%22);%0A%09%09%7D%09
+%7D catch (e) %7B%7D%09%0A%09%7D
 %0A%7D%0A

Update shopscript.js