var J = jQuery.noConflict();
J.fn.wait = function(time, type) {
time = time || 1000;
type = type || "fx";
return this.queue(type, function() {
var self = this;
setTimeout(function() {
J(self).dequeue();
}, time);
});
};
/*#################################Text_Drop_Shadow#################################*/
(function(J){
J.fn.textdropshadow = function(settings){
/*Extend default settings*/
var opts = J.extend({}, J.fn.textdropshadow.defaults, settings);
return this.each(function(settings){
var options = J.extend({}, opts, J(this).data());
var sthis = J(this);
sthis.wrap('');
sthis.parent().css({
display: 'inline-block',
'position': 'relative',
width: sthis.width() + parseInt(6) + 'px',
height: sthis.height() + parseInt(6) + 'px',
'margin-right' : '5px',
'margin-top' : '5px'
});
J('').insertBefore(J(this)).css({
position: 'absolute',
width: sthis.width() + 'px',
height: sthis.height() + 'px',
/*backgroundColor: options.shadowColor,*/
color:J(this).attr('title'),
zIndex: 998,
top: parseInt(options.distance, 10) + 'px',
left: parseInt(options.distance, 10) + 'px'
});
sthis.parent().find('.drop_shadow_layer').html(J(this).html());
sthis.parent().find('.drop_shadow_layer').fadeTo(0, 0.33);
sthis.attr('title','');
sthis.css({
position: 'absolute',
display: 'block',
width: sthis.width() + 'px',
height: sthis.height() + 'px',
top: '0',
left: '0',
zIndex: 999
});
});
}
/* set default option values */
J.fn.textdropshadow.defaults = {
shadowColor: '#DFDFDF',
shadowLayer: -1,
distance:'5px'
}
})(J);
/*#################################/Text_Drop_Shadow#################################*/
var Inter_GDWL = new Array();
function run_GDWL(){
if(J('.myexample').length>0){
J(".myexample").each(function(index){
var myexample = J(this);
var count_myexample = 1;
if (Inter_GDWL[index]){
clearTimeout(Inter_GDWL[index]);
Inter_GDWL[index] = false;
}
Inter_GDWL[index] = setInterval(function(){
if(count_myexample%2==1){
myexample.css("border-color","red");
}else{
myexample.css("border-color","blue");
}
count_myexample++;
}, 200);
});
}
}
J(document).ready(function(J) {
run_GDWL();
/*[A7LA1]*/
J('.bdr_cmd_a7la1').textdropshadow({
shadowColor: '#cccccc',
shadowLayer: -100,
distance:'1px'
});
J('.bdr_cmd_aldl').css({
'box-shadow': '6px 6px 1px #666666',
'filter':"progid:DXImageTransform.Microsoft.DropShadow(color='#666666',offX='6',offY='6')"
});
/*[BLINK]*/
J(".myblinktext").each(function(){
/*J(this).css({'display':'block'});*/
var self = this;
function doBLINK() {
J(self)
.wait(500)
.fadeTo(0,0)
.wait(500)
.fadeTo(0,1,doBLINK);
}
doBLINK();
});
/*[GLINT]*/
J(".myglinttext").each(function(){
/*J(this).css({'display':'block'});*/
var self = this;
function doBLINK() {
J(self)
.wait(200)
.fadeTo(500,0)
.wait(200)
.fadeTo(500,1,doBLINK);
}
doBLINK();
});
/*[IMG2]*/
J('img.bdr_cmd_img2').fadeTo(1000,0.2);
J('img.bdr_cmd_img2').mouseover(function(){
J(this).fadeTo(1000,1);
});
J('img.bdr_cmd_img2').mouseout(function(){
J(this).fadeTo(1000,0.2);
});
/*[IMG3]*/
J("img.bdr_cmd_img3").hover(
function () {
J(this).css({'position':'relative','padding':'0 0 0 0','margin':'0 0 0 0'});
var self = this;
function doShaking() {
J(self)
.wait(25)
.animate({"left": "-=3px"}, 25)
.wait(25)
.animate({"top": "-=3px"}, 25)
.wait(25)
.animate({"left": "+=3px"}, 25)
.wait(25)
.animate({"top": "+=3px"}, 25, doShaking);
}
doShaking();
},
function () {
J(this).stop(true, true);
J(this).css({'position':'static','padding':'0 0 0 0','margin':'0 0 0 0'});
J(this).css({'left': '0px','top': '0px'});
}
);
/*[RMADE]*/
J('img.bdr_cmd_rmade').each(function(){
/*J(this).pixastic("desaturate");*/
J(this).attr('src','massy/includes/proxy.php?url='+J(this).attr('src')+'&time=' + new Date().getTime()).load(function(){
if(J.browser.msie){
J(this).css({'filter':'gray'});
}else{
if (this.complete || this.complete === undefined){
J(this).pixastic("desaturate");
}else{
J(this).pixastic("desaturate");
}
}
});
});
/*[M3KOS]*/
J('img.bdr_cmd_m3kos').each(function(){
J(this).attr('src','massy/includes/proxy.php?url='+J(this).attr('src')+'&time=' + new Date().getTime()).load(function(){
if(J.browser.msie){
J(this).css({'filter':'invert'});
}else{
if (this.complete || this.complete === undefined){
J(this).pixastic("invert");
}else{
J(this).pixastic("invert");
}
}
});
});
/*[ASH3H]*/
J('img.bdr_cmd_ash3h').each(function(){
J(this).attr('src','massy/includes/proxy.php?url='+J(this).attr('src')+'&time=' + new Date().getTime()).load(function(){
if(J.browser.msie){
J(this).css({'filter':'FILTER: progid:DXImageTransform.Microsoft.BasicImage(grayscale=0, xray=1, mirror=0, invert=0, opacity=1, rotation=0)'});
}else{
if (this.complete || this.complete === undefined){
J(this).pixastic("hsl", {hue:180,saturation:-44,lightness:-50});
}else{
J(this).pixastic("hsl", {hue:180,saturation:-44,lightness:-50});
}
}
});
});
/*[MSHOSH1]*/
J('img.bdr_cmd_mshosh1').each(function(){
J(this).attr('src','massy/includes/proxy.php?url='+J(this).attr('src')+'&time=' + new Date().getTime()).load(function(){
if(J.browser.msie){
J(this).css({'filter':"progid:DXImageTransform.Microsoft.Blur(PixelRadius='3', MakeShadow='false', ShadowOpacity='0.25')"});
}else{
if (this.complete || this.complete === undefined){
J(this).pixastic("blurfast", {amount:0.5});
}else{
J(this).pixastic("blurfast", {amount:0.5});
}
}
});
});
/*[MN7OT1]*/
J('img.bdr_cmd_mn7ot1').each(function(){
J(this).attr('src','massy/includes/proxy.php?url='+J(this).attr('src')+'&time=' + new Date().getTime()).load(function(){
if(J.browser.msie){
J(this).css({'filter':'progid:DXImageTransform.Microsoft.emboss()'});
}else{
if (this.complete || this.complete === undefined){
J(this).pixastic("emboss", {strength:1.5,greyLevel:160,direction:"topleft"});
J(this).wrap('');
J(this).parent().css({
'display': 'inline-block',
'border-top':'1px solid #000000',
'border-left':'1px solid #000000',
'border-bottom':'1px solid #FFFFFF',
'border-right':'1px solid #FFFFFF'});
}else{
J(this).pixastic("emboss", {strength:1.5,greyLevel:160,direction:"topleft"});
J(this).wrap('');
J(this).parent().css({
'display': 'inline-block',
'border-top':'1px solid #000000',
'border-left':'1px solid #000000',
'border-bottom':'1px solid #FFFFFF',
'border-right':'1px solid #FFFFFF'});
}
}
});
});
/*[MN7OT2]*/
J('img.bdr_cmd_mn7ot2').each(function(){
J(this).attr('src','massy/includes/proxy.php?url='+J(this).attr('src')+'&time=' + new Date().getTime()).load(function(){
if(J.browser.msie){
J(this).css({'filter':'progid:DXImageTransform.Microsoft.Engrave()'});
}else{
if (this.complete || this.complete === undefined){
J(this).pixastic("emboss", {strength:1.5,greyLevel:160,direction:"bottomright"});
J(this).wrap('');
J(this).parent().css({
'display': 'inline-block',
'border-top':'1px solid #FFFFFF',
'border-left':'1px solid #FFFFFF',
'border-bottom':'1px solid #000000',
'border-right':'1px solid #000000'});
}else{
J(this).pixastic("emboss", {strength:1.5,greyLevel:160,direction:"bottomright"});
J(this).wrap('');
J(this).parent().css({
'display': 'inline-block',
'border-top':'1px solid #FFFFFF',
'border-left':'1px solid #FFFFFF',
'border-bottom':'1px solid #000000',
'border-right':'1px solid #000000'});
}
}
});
});
/*[MTOHG]*/
J('img.bdr_cmd_mtohg').each(function(){
J(this).load(function(){
if(J.browser.msie){
J(this).css({'filter':"progid:DXImageTransform.Microsoft.Glow(color='"+ J(this).attr('title') + "', Strength='5')"});
J(this).attr('title','');
}else{
if (this.complete || this.complete === undefined){
J(this).wrap('');
/*J(this).parent().fadeTo(0,0.5);*/
J(this).parent().css({
'display': 'inline-block',
'-moz-border-radius-topleft': '3px',
'-moz-border-radius-topright': '3px',
'-moz-border-radius-bottomright': '3px',
'-moz-border-radius-bottomleft': '3px',
'-webkit-border-top-left-radius': '3px',
'-webkit-border-top-right-radius': '3px',
'-webkit-border-bottom-left-radius': '3px',
'-webkit-border-bottom-right-radius': '3px',
'background-color':J(this).attr('title'),
'background-image':'url(massy/js/images/glow_filter.png)',
'padding':'5px'});
J(this).attr('title','');
}else{
J(this).wrap('');
/*J(this).parent().fadeTo(0,0.5);*/
J(this).parent().css({
'display': 'inline-block',
'-moz-border-radius-topleft': '3px',
'-moz-border-radius-topright': '3px',
'-moz-border-radius-bottomright': '3px',
'-moz-border-radius-bottomleft': '3px',
'-webkit-border-top-left-radius': '3px',
'-webkit-border-top-right-radius': '3px',
'-webkit-border-bottom-left-radius': '3px',
'-webkit-border-bottom-right-radius': '3px',
'background-color':J(this).attr('title'),
'background-image':'url(massy/js/images/glow_filter.png)',
'padding':'5px'});
J(this).attr('title','');
}
}
});
});
J('.BDR130_googleit').attr({
'href' : ('http://ar.lmgtfy.com/?q='+encodeURIComponent( J('.BDR130_googleit').attr('href')))
});
J('.rainbow').each(function(){
J(this).rainbow({
animate:true,
animateInterval:100,
colors:['#FF0000','#f26522','#fff200','#00a651','#28abe2','#2e3192','#6868ff']
});
});
J('.bdr130_imager').each(function(){
J(this).find('img').rotate(parseInt(J(this).find('span').text()));
});
J('#vB_Editor_001_iframe,#vB_Editor_QR_iframe').contents().find("body").keyup(function(){
var counter = J(this).text().length;
J("span[id=copyrig]").html(" عدد الاحرف فى النص : "+counter);
});
J('.vBulletin_editor').keyup(function() {
var counter = J("textarea[name=message]").val().length;
J("span[id=copyrig]").html(" عدد الاحرف فى النص : "+counter);
});
/*#######################################################################################*/
var BDR_BGCOLOR = '';
if(J.cookie('BDR_BGCOLOR')){
BDR_BGCOLOR = '#'+J.cookie("BDR_BGCOLOR");
}
J('.BDR_BGCOLOR').live('change', function(){
J.cookie('BDR_BGCOLOR',J(this).val(), { expires: 60 });
run_BDR_BGCOLOR();
});
if(J.cookie('BDR_BGCOLOR')){
if(J('.vBulletin_editor').length > 0){
J('.vBulletin_editor').live('mouseenter mouseleave mousemove', function(){
var Gthis = this;
setTimeout(function(){
// J(Gthis).find('.imagebutton').css('background-color','#'+J.cookie("BDR_BGCOLOR"));
//J(Gthis).find('.bdr_button_content').css('background-color','#'+J.cookie("BDR_BGCOLOR"));
// J(Gthis).find('.imagebutton').find('img').css('background-color','#'+J.cookie("BDR_BGCOLOR"));
},20);
});
}
}
/*###c4w*/
function urlDecode(str){
str=str.replace(new RegExp('\\+','g'),' ');
return unescape(str);
}
var c4wF = 'الصندوق الماسي Massy Version 8';
var c4wFO = ' Massy Version 8';
var c4w = ' '+c4wF+'
';
/*v4*/
if(typeof bdr130_archive_file != "undefined"){
J('#copyright').append(c4wF);
}else{
if(bdr130_vbulletin_version >= 4){
if(J('.editor_textbox_container').length>0){
J('.editor_textbox_container').append(c4w);
}else if(J('#vB_Editor_QR').length>0){
J('#vB_Editor_QR').append(c4w);
}
if(J('#footer_copyright').length>0){
J('#footer_copyright').append(c4wFO);
}
/*\v4*/
}else{
/*v3*/
if(J('.controlbar:has(textarea)').length>0){
J('.controlbar:has(textarea)').append(c4w);
}
if(J("body:last").length>0){
//C????? EC?EI?
J("body:last").append('');
//C????? EC??UE
//J("div:contains('vBulletin Solutions'):last").append(c4wFO);
}
/*\v3*/
}
}
/*\###c4w*/
});
/***********************************************************************************/
/*IMAGE_EFFECTES*/
/*mask images referenced by number*/
J.getScript("massy/js/edge.js?" + new Date().getTime());
J.getScript("massy/js/pixastic.js?" + new Date().getTime());
/*\IMAGE_EFFECTES*/
/*[cc]*/
function showSpoiler(block) {
if(J(block).next('div.content').is(':visible')){
J(block).next('div.content').slideUp();
}else{
J(block).next('div.content').slideDown();
}
}
function run_BDR_BGCOLOR(){
var co = "#"+J.cookie("BDR_BGCOLOR");
if (navigator.userAgent.indexOf("Firefox")!=-1){
var grad = "-moz-linear-gradient(top, #EFEFEF, "+co+")";
var gradf = "-moz-linear-gradient(top, #EFEFEF, #E6E6E6)";
}else{
var grad = "-webkit-linear-gradient(top, #EFEFEF, "+co+")";
var gradf = "-webkit-linear-gradient(top, #EFEFEF, #E6E6E6)";
}
if(J.cookie('BDR_BGCOLOR')){
if(J('.cke_wrapper').length > 0){
//J('.cke_wrapper').css('background-color','#'+J.cookie("BDR_BGCOLOR"));
J('.cke_wrapper').css({
background: "-webkit-gradient(linear, left top, left bottom, from(#EFEFEF), to("+co+"))",
background: grad,
filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr='#EFEFEF', endColorstr='"+co+"')",
border: "1px solid white"
});
}else if(J('.vBulletin_editor').length > 0){
J('.vBulletin_editor,#cke_vB_Editor_001_editor').css({
background: "-webkit-gradient(linear, left top, left bottom, from(#EFEFEF), to("+co+"))",
background: grad,
filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr='#EFEFEF', endColorstr='"+co+"')",
border: "1px solid white"
});
//J('.vBulletin_editor').find('.imagebutton').css('background-color','#'+J.cookie("BDR_BGCOLOR"));
//J('.vBulletin_editor').find('.imagebutton').find('img').css('background-color','#'+J.cookie("BDR_BGCOLOR"));
//J('.vBulletin_editor').find('.bdr_button_content').css('background-color','#'+J.cookie("BDR_BGCOLOR"));
}else if(J('.texteditor').length > 0){
J('.vBulletin_editor,#cke_vB_Editor_001_editor').css({
background: "-webkit-gradient(linear, left top, left bottom, from(#EFEFEF), to("+co+"))",
background: grad,
filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr='#EFEFEF', endColorstr='"+co+"')",
border: "1px solid white"
});
}
}else{
J('.vBulletin_editor,#cke_vB_Editor_001_editor').css({
background: "-webkit-gradient(linear, left top, left bottom, from(#EFEFEF), to(#E6E6E6))",
background: gradf,
filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr='#EFEFEF', endColorstr='#E6E6E6')",
border: "1px solid white"
});
}
}