$(document).ready(function(){
// User status
$(".c-poster-avatar").hover(
function(e) { e.preventDefault(); $(this).next().fadeIn(); },
function(e) { e.preventDefault(); $(this).next().fadeOut(); }
);
// FAQ fade toggle
$(".faq dt a").click(function(e){
e.preventDefault();
$(this).parent().next().toggleFade("normal");
});
// Login form
$("a.log-in").click(function(){
$(".jq-login").toggleFade("normal");
});
// Back to top btn
$(function () {
$('#top-btn').hide();
$(window).scroll(function () {
if ($(this).scrollTop() >= 400) {
$('#top-btn').fadeIn();
} else {
$('#top-btn').fadeOut();
}
});
});
//Remove google Ads
$("[class*='add-google']").remove();
// PM Count
$.ajax({
url: '/privmsg?folder=inbox',
success: function(ajax) {
count = $('img[src="https://i.servimg.com/u/f22/15/42/72/40/newsub10.png"]', ajax).length;
if (count < 1) {
$('a.mailbox').html('Mailbox');
}
else {
$('a.mailbox').html('Mailbox '+count+'');
}}
});
$(function() {
$('').load('profile?mode=editprofile&page_profil=avatars .frm-set dl img', function() {
$(this).hide()
.appendTo('#user-j-avatar')
.fadeIn(1);
});
return false;
});
// Tipsy
$("#top-btn a, .blog_message a img, #pun-about ul li a, .post-options a img, .left-box img, .left-box button, #format-buttons button, .main-foot img, .status-icons a img, .vote-bar, .vote-button a img, #forums a, #colorbox a, #g-forums a, img.tip").tipsy({gravity: 's'});
// Remove linked images border
$("img").attr("border","0");
// scroll body to 0px on click
$('#top-btn a').click(function () {
$('body,html').animate({
scrollTop: 0
}, 800);
return false;
});
// Images fading
$(".connect a img").fadeTo("fast", 0.5);
$(".connect a img").hover(function(){
$(this).fadeTo("fast", 1.0); },function(){$(this).fadeTo("fast", 0.5);
});
// Text replacing
$(".main-head .h2").html($(".main-head .h2").html().replace("Quick reply", "Post a comment"));
//Images Replacing.
$('img[src="https://illiweb.com/fa/i/smiles/icon_smile.gif"]').replaceWith('');
$('img[src="https://illiweb.com/fa/wysiwyg/color_swatch.png"]').replaceWith('');
$('img[src="https://illiweb.com/fa/wysiwyg/link.png"]').replaceWith('');
$('img[src="https://illiweb.com/fa/wysiwyg/comments.png"]').replaceWith('');
$('img[src="https://illiweb.com/fa/wysiwyg/page_white_code.png"]').replaceWith('');
$('img[src="https://illiweb.com/fa/wysiwyg/picture_save.png"]').replaceWith('');
$('img[src="https://illiweb.com/fa/wysiwyg/picture.png"]').replaceWith('');
$('img[src="https://illiweb.com/fa/wysiwyg/page_white_flash.png"]').replaceWith('');
$('img[src="https://illiweb.com/fa/wysiwyg/film.png"]').replaceWith('');
$('.topic-paging img[alt="Next"]').replaceWith('Next »');
$('.topic-paging img[alt="Previous"]').replaceWith('« Previous');
$('img[src="https://illiweb.com/fa/wysiwyg/table.png"]').replaceWith('');
$('img[src="https://illiweb.com/fa/wysiwyg/help.png"]').replaceWith('');
$('img[src="https://illiweb.com/fa/wysiwyg/link_text.png"]').replaceWith('');
$('img[src="https://illiweb.com/fa/invision/pp-blank-thumb-38px.png"]').replaceWith('');
});