 
(function($){$.fn.yallaWhiteBox=function(opt){$.fn.yallaWhiteBox.defaults=jQuery.extend({page:'/openstore.ajax.php',params:'action=0',type:'html',callback:'',height:500},opt);if($('#yalla-white-box').length<1){var boxContainer=$(jQuery('<div style="position: absolute; top: 0; left: 0; width: 100%; text-align: center"></div>'));var boxInnerContainer=$(jQuery('<div id="yalla-white-box-container" style="position: relative"></div>'));var boxBG=$(jQuery('<div id="yalla-white-box-bg" class="yalla-white-box-bg"><div class="yalla-white-box-space">&nbsp;</div></div>').css({opacity:'0.7',height:($.fn.yallaWhiteBox.defaults.height+20),top:($(document).scrollTop()+100)+"px"}).hide());var box=$(jQuery('<div id="yalla-white-box" class="yalla-white-box">&nbsp;</div>').css({height:$.fn.yallaWhiteBox.defaults.height,top:($(document).scrollTop()+111)+"px"}).hide());var boxLoader=$(jQuery('<div id="yalla-white-box-loader" class="yalla-white-box yalla-white-box-loader">&nbsp;</div>').css({opacity:'0.7',height:$.fn.yallaWhiteBox.defaults.height,top:($(document).scrollTop()+111)+"px"}).hide());$(boxInnerContainer).append(boxBG);$(boxInnerContainer).append(box);$(boxInnerContainer).append(boxLoader);$(boxContainer).append(boxInnerContainer);$('body').append(boxContainer);$('#yalla-white-box-bg').fadeIn(400);$('#yalla-white-box').fadeIn(400,function(){$('#yalla-white-box-loader').show();$.post($.fn.yallaWhiteBox.defaults.page,$.fn.yallaWhiteBox.defaults.params,function(data){$('#yalla-white-box-loader').hide();if($.fn.yallaWhiteBox.defaults.type!='script'){$('#yalla-white-box').html(data);}
if($.fn.yallaWhiteBox.defaults.callback!=''){$.fn.yallaWhiteBox.defaults.callback();}},$.fn.yallaWhiteBox.defaults.type);});}else{$('#yalla-white-box-loader').show();if($.fn.yallaWhiteBox.defaults.type=='script'){$.post($.fn.yallaWhiteBox.defaults.page,$.fn.yallaWhiteBox.defaults.params,function(data){},'script');}else{$.post($.fn.yallaWhiteBox.defaults.page,$.fn.yallaWhiteBox.defaults.params,function(data){$('#yalla-white-box').html(data);if($.fn.yallaWhiteBox.defaults.callback!=''){$.fn.yallaWhiteBox.defaults.callback();}
$('#yalla-white-box-loader').hide();},'html');}}
$.fn.yallaWhiteBox.close=function(){$('#yalla-white-box').fadeOut(400);$('#yalla-white-box-loader').fadeOut(400);$('#yalla-white-box-bg').fadeOut(400,function(){$('#yalla-white-box').remove();$('#yalla-white-box-bg').remove();$('#yalla-white-box-loader').remove();});};};})(jQuery);
