").addClass(“ZebraDialog_ButtonsOuter”+(plugin.settings.center_buttons?" ZebraDialog_Buttons_Centered":"")))}plugin.dialog.appendTo(“body”);if(plugin.settings.show_close_button){var c=$(‘
×’).bind(“click”,function(e){e.preventDefault();plugin.close()}).appendTo(e?e:plugin.message);if(e)c.css({right:parseInt(e.css(“paddingRight”),10),top:(parseInt(e.css(“height”),10)+parseInt(e.css(“paddingTop”),10)+parseInt(e.css(“paddingBottom”),10)-c.height())/2})}$(window).bind(“resize.Zebra_Dialog”,function(){clearTimeout(timeout);timeout=setTimeout(function(){draw()},100)});if(plugin.settings.keyboard)$(document).bind(“keyup.Zebra_Dialog”,function(e){if(e.which==27)plugin.close();return true});if(plugin.isIE6)$(window).bind(“scroll.Zebra_Dialog”,function(){emulate_fixed_position()});if(plugin.settings.auto_close!==false){plugin.dialog.bind(“click”,function(){clearTimeout(plugin.timeout);plugin.close()});plugin.timeout=setTimeout(plugin.close,plugin.settings.auto_close)}draw(false);return plugin};plugin.close=function(e){$(document).unbind(".Zebra_Dialog");$(window).unbind(".Zebra_Dialog");if(plugin.overlay)plugin.overlay.animate({opacity:0},plugin.settings.animation_speed_hide,function(){plugin.overlay.remove()});plugin.dialog.animate({top:0,opacity:0},plugin.settings.animation_speed_hide,function(){plugin.dialog.remove();if(plugin.settings.onClose&&typeof plugin.settings.onClose==“function”)plugin.settings.onClose(undefined!==e?e:"")})};var draw=function(){var viewport_width=$(window).width(),viewport_height=$(window).height(),dialog_width=plugin.dialog.width(),dialog_height=plugin.dialog.height(),values={left:0,top:0,right:viewport_width-dialog_width,bottom:viewport_height-dialog_height,center:(viewport_width-dialog_width)/2,middle:(viewport_height-dialog_height)/2};plugin.dialog_left=undefined;plugin.dialog_top=undefined;if($.isArray(plugin.settings.position)&&plugin.settings.position.length==2&&typeof plugin.settings.position[0]==“string”&&plugin.settings.position[0].match(/^(left|right|center)[\s0-9\+\-]$/)&&typeof plugin.settings.position[1]==“string”&&plugin.settings.position[1].match(/^(top|bottom|middle)[\s0-9\+\-]*$/)){plugin.settings.position[0]=plugin.settings.position[0].toLowerCase();plugin.settings.position[1]=plugin.settings.position[1].toLowerCase();$.each(values,function(index,value){for(var i=0;i<2;i++){var tmp=plugin.settings.position[i].replace(index,value);if(tmp!=plugin.settings.position[i])if(i===0)plugin.dialog_left=eval(tmp);else plugin.dialog_top=eval(tmp)}})}if(undefined===plugin.dialog_left||undefined===plugin.dialog_top){plugin.dialog_left=values[“center”];plugin.dialog_top=values[“middle”]}if(plugin.settings.vcenter_short_message){var message=plugin.message.find(“div:first”),message_height=message.height(),container_height=plugin.message.height();if(message_height<container_height)message.css({“padding-top”:(container_height-message_height)/2})}if(typeof arguments[0]==“boolean”&&arguments[0]===false||plugin.settings.reposition_speed===0){plugin.dialog.css({left:plugin.dialog_left,top:plugin.dialog_top,visibility:“visible”,opacity:0}).animate({opacity:1},plugin.settings.animation_speed_show)}else{plugin.dialog.stop(true);plugin.dialog.css(“visibility”,“visible”).animate({left:plugin.dialog_left,top:plugin.dialog_top},plugin.settings.reposition_speed)}plugin.dialog.find(“a[class^=ZebraDialog_Button]:first”).focus();if(plugin.isIE6)setTimeout(emulate_fixed_position,500)};var emulate_fixed_position=function(){var e=$(window).scrollTop(),t=$(window).scrollLeft();if(plugin.settings.modal)plugin.overlay.css({top:e,left:t});plugin.dialog.css({left:plugin.dialog_left+t,top:plugin.dialog_top+e})};var get_buttons=function(){if(plugin.settings.buttons!==true&&!$.isArray(plugin.settings.buttons))return false;if(plugin.settings.buttons===true)switch(plugin.settings.type){case"question":plugin.settings.buttons=[“Yes”,“No”];break;default:plugin.settings.buttons=[“Ok”]}return plugin.settings.buttons};var get_type=function(){switch(plugin.settings.type){case"confirmation":case"error":case"information":case"question":case"warning":return plugin.settings.type.charAt(0).toUpperCase()+plugin.settings.type.slice(1).toLowerCase();default:return false}};var browser={init:function(){this.name=this.searchString(this.dataBrowser)||"";this.version=this.searchVersion(navigator.userAgent)||this.searchVersion(navigator.appVersion)||""},searchString:function(e){for(var t=0;t<e.length;t++){var n=e[t].string;var r=e[t].prop;this.versionSearchString=e[t].versionSearch||e[t].identity;if(n){if(n.indexOf(e[t].subString)!=-1)return e[t].identity}else if®return e[t].identity}},searchVersion:function(e){var t=e.indexOf(this.versionSearchString);if(t==-1)return;return parseFloat(e.substring(t+this.versionSearchString.length+1))},dataBrowser:[{string:navigator.userAgent,subString:“MSIE”,identity:“explorer”,versionSearch:“MSIE”}]};browser.init();return plugin.init()}})(jQuery)
User Details: