
var animation={
easing:function(x, t, b, c, d){
return -c/2 *(Math.cos(Math.PI*t/d)- 1)+b;
},
scroll_to:function(element){
if($(element)){
var target_pos=$(element).offset().top;
var max_pos=$(document).height()- $(window).height();
var scroll_pos=(max_pos < target_pos)? max_pos:target_pos;
$('html,body').animate({scrollTop:scroll_pos}, 1000, this.easing);
}
},
scroll_to_top:function(){
$('html,body').animate({scrollTop:'0px'}, 1000, this.easing);
},
collapse_box:function(url, element_id){
if($('#'+element_id).is(':hidden')){
lightbox.show();
$('#'+element_id).load(url, '', function(){
styles.table_stripped('#'+element_id+' table.list');
lightbox.hide();
$('#'+element_id).slideDown(500, function(){
onchange_functions();
});
});
}else{
$('#'+element_id).slideUp(500);
}
},
image_toggle:function(element_id, src_first, src_second){
if($('#'+element_id).attr('src')==src_second){
$('#'+element_id).attr('src', src_first);
}else{
$('#'+element_id).attr('src', src_second);
}
},
text_toggle:function(element_id, text_first, text_second){
if($('#'+element_id).html()==text_second){
$('#'+element_id).html(text_first);
}else{
$('#'+element_id).html(text_second);
}
},
tooltip:function(){
$('.tooltip').each(function(){
var trigger=$('.trigger', this);
var tooltip=$('.tooltip_container', this).css('opacity', 0).css('-ms-filter', '"alpha(opacity=0)"');
var active=false;
var animated=false;
var distance=-10;
var time=250;
var hide_delay=100;
var hide_delay_intervall=null;
var width=$('.tooltip_container', this).width();
$([trigger.get(0), tooltip.get(0)]).mouseover(function(){
if(hide_delay_intervall){
clearTimeout(hide_delay_intervall);
}
if(animated || active){
return;
}else{
var position=$(trigger).position();
var left=position.left -(width-35);
tooltip.css({'left':left, 'top':position.top+25});
animated=true;
tooltip.css({position:'absolute', display:'block'});
tooltip.animate({top:'+='+distance+'px', opacity:1}, time, 'swing', function(){
animated=false;
active=true;
});
}
})
$([trigger.get(0), tooltip.get(0)]).mouseout(function(){
if(hide_delay_intervall){
clearTimeout(hide_delay_intervall);
}
hide_delay_intervall=setTimeout(function(){
hide_delay_intervall=null;
tooltip.animate({top:'-='+distance+'px',opacity:0}, time, 'swing', function(){
active=false;
tooltip.css({'display':'none'});
});
}, hide_delay);
});
});
},
image_preview:function(){
$('.image_preview').each(function(){
var trigger=$('.trigger', this);
var tooltip=$('.image_preview_container', this).css('opacity', 0).css('-ms-filter', '"alpha(opacity=0)"');
var active=false;
var animated=false;
var distance=10;
var time=250;
var hide_delay=100;
var hide_delay_intervall=null;
var width=$('.image_preview_container', this).width();
var height=$('.image_preview_container', this).height();
$([trigger.get(0), tooltip.get(0)]).mouseover(function(){
if(hide_delay_intervall){
clearTimeout(hide_delay_intervall);
}
if(animated || active){
return;
}else{
var position=$(trigger).position();
var top=position.top;
var left=position.left - width - 16;
tooltip.css({'left':left, 'top':position.top});
animated=true;
tooltip.css({position:'absolute', display:'block'});
tooltip.animate({left:'+='+distance+'px', opacity:1}, time, 'swing', function(){
animated=false;
active=true;
});
}
})
$([trigger.get(0), tooltip.get(0)]).mouseout(function(){
if(hide_delay_intervall){
clearTimeout(hide_delay_intervall);
}
hide_delay_intervall=setTimeout(function(){
hide_delay_intervall=null;
tooltip.animate({left:'-='+distance+'px',opacity:0}, time, 'swing', function(){
active=false;
tooltip.css({'display':'none'});
});
}, hide_delay);
});
});
}
}
var ajax_cache=new Object();
var ajax=new function(){
this.type=null;
this.form=null;
this.callback=null;
this.cache=false;
this.url=null;
this.ajax_object=null;
this.active_request=false;
this.request=function(url, cache, params){
try{
this.params={
callback:false,
element:'',
collapse:false,
json:false,
lightbox:true
};
if(params){
$.each(params, function(i, val){
ajax.params[i]=val;
});
}
if(cache){
if(ajax_cache[url]){
this.response(ajax_cache[url]);
return false;
}
}
this.cache=cache;
this.url=url;
if(this.params.lightbox){
lightbox.show();
}
if(this.params.json){
var dataType='json';
}else{
var dataType='html';
}
$.ajax({
url:url,
cache:true,
dataType:dataType,
success:function(response_data){
ajax.response(response_data);
}
});
return false;
}catch(ex){
script_error(ex);
}
};
this.response=function(response_data){
try{
if(this.cache){
ajax_cache[this.url]=response_data;
}
if(this.params.collapse && this.params.element !=''){
if(this.params.callback){
this.params.callback(response_data);
}
}else if(this.params.element !=''){
if(this.params.json){
response_data=response_data.data;
}
var scope=this;
$(this.params.element).animate({opacity:0}, 300, function(){
$(this).html(response_data);
$(this).animate({opacity:1}, 300, function(){
if(scope.params.callback){
scope.params.callback(response_data);
}
});
});
}else{
if(this.params.callback){
this.params.callback(response_data);
}
}
if(this.params.lightbox){
lightbox.hide();
}
return true;
}catch(ex){
script_error(ex);
}finally{
this.ajax_object=null;
this.cache=false;
}
};
this.post=function(url, data, params){
try{
this.type='post';
this.params={
callback:false,
callback_on_error:false,
close_dialog:false
};
if(params){
var scope=this;
$.each(params, function(i, val){
scope.params[i]=val;
});
}
lightbox.show();
$.post(
url,
data,
this.response_ajax_object_json,
'json'
);
}catch(ex){
script_error(ex);
}
};
this.get=function(url, params){
try{
this.type='get';
this.params={
callback:false,
callback_on_error:false,
close_dialog:false
};
if(params){
var scope=this;
$.each(params, function(i, val){
scope.params[i]=val;
});
}
lightbox.show();
$.getJSON(
url,
this.response_ajax_object_json
);
}catch(ex){
script_error(ex);
}
};
this.submit_form=function(form, params){
try{
this.active_request=true;
if(! form || ! form.action){
throw 'form.action not found:'+form;
}
this.params={
callback:false,
callback_on_error:false
};
if(params){
var scope=this;
$.each(params, function(i, val){
scope.params[i]=val;
});
}
this.type='form';
this.form=form;
var form_data=$(this.form).serialize();
form_disable(this.form);
lightbox.show();
$.post(
this.form.action,
form_data,
this.response_ajax_object_json,
'json'
);
return false;
}catch(ex){
script_error(ex);
}
};
this.response_ajax_object_json=function(response_data){
try{
ajax.response_json(response_data, this);
}catch(ex){
script_error(ex);
}
};
this.response_json=function(response_data, ajax_object){
try{
if(! response_data || ! response_data.return_code){
throw 'response_data.return_code not found:'+response_data;
}
if(! response_data.data && response_data.data !=''){
throw 'response_data.data not found:'+response_data;
}
switch(response_data.return_code){
case 'reload':
this.response_reload();
break;
case 'success':
switch(this.type){
case 'form':
this.response_form_success(response_data.data);
break;
default:
this.response_success(response_data.data);
break;
}
break;
case 'redirect':
this.response_redirect(response_data.data);
break;
case 'error':
switch(this.type){
case 'form':
this.response_form_error(response_data.data);
break;
case 'post':
case 'get':
this.response_error(response_data.data);
break;
default:
script_error(response_data.data);
break;
}
break;
case 'exception':
this.response_exception(response_data.data);
break;
default:
throw 'unknown return_code:'+response_data.return_code;
}
}catch(ex){
script_error(ex);
}finally{
this.ajax_object=null;
this.active_request=false;
this.cache=false;
}
};
this.response_reload=function(){
try{
document.location=document.location;
lightbox.hide();
}catch(ex){
script_error(ex);
}
};
this.response_redirect=function(data){
try{
if(! data || ! data.url){
throw 'data.url not defined: '+data;
}
document.location=data.url;
}catch(ex){
script_error(ex);
}
};
this.response_error=function(data){
try{
lightbox.hide();
if(this.params.callback_on_error){
this.params.callback_on_error(data);
}else{
var message_list='';
for(id_name in data.error_messages){
for(var i=0;i < data.error_messages[id_name].length;i++){
message_list+=data.error_messages[id_name][i]+'<br />';
}
}
dialog.show_alert('Error', message_list);
}
return true;
}catch(ex){
script_error(ex);
}
};
this.response_exception=function(data){
lightbox.hide();
script_error(data.message);
};
this.response_success=function(data){
try{
if(this.cache){
ajax_cache[this.url]=data;
}
var scope=this;
if(data && data.div_id){
var content_div=$('#'+data.div_id);
if(content_div.html()!=''){
$(content_div).animate({opacity:0}, 500, function(){
content_div.html(data.content);
$(this).animate({opacity:1}, 500, function(){
onchange_functions();
if(scope.params.callback){
scope.params.callback(data);
}
});
});
}else{
content_div.html(data.content);
onchange_functions();
if(this.params.callback){
this.params.callback(data);
}
}
}else{
if(this.params.callback){
this.params.callback(data);
}
}
if(this.params.close_dialog && dialog.active){
dialog.close_dialog(true);
}
lightbox.hide();
return true;
}catch(ex){
script_error(ex);
}
};
this.response_form_success=function(data){
try{
if(data && data.div_id){
var content_div=$('#'+data.div_id);
if(content_div.length !=1){
throw 'Div width id "'+data.div_id+'" not found';
}
var scope=this;
if(content_div.html()!=''){
$(content_div).animate({opacity:0}, 500, function(){
content_div.html(data.content);
$(this).animate({opacity:1}, 500, function(){
onchange_functions();
if(scope.params.callback){
scope.params.callback(data);
}
});
});
}else{
content_div.html(data.content);
onchange_functions();
if(this.params.callback){
this.params.callback(data);
}
}
}else{
if(this.params.callback){
this.params.callback(data);
}
}
if(dialog.active){
dialog.close_dialog(true);
}
var form=$(this.form);
if(form.length !=0){
form_enable(form[0]);
}
lightbox.hide();
return true;
}catch(ex){
script_error(ex);
}
};
this.response_form_error=function(data){
try{
if(! data || ! data.error_messages){
throw 'data.error_messages not defined: '+data;
}
if(this.params.callback_on_error){
this.params.callback_on_error(data);
}else{
if(dialog.active){
dialog.ajax_form_error(this.form.id, data.error_messages);
}else{
var message_list='';
$('label[for^='+this.form.id+'_]').removeClass('error');
for(id_name in data.error_messages){
for(var i=0;i < data.error_messages[id_name].length;i++){
message_list+='<li>'+data.error_messages[id_name][i]+'</li>';
}
$('label[for='+this.form.id+'_'+id_name+']').addClass('error');
}
var id=this.form.id+'-form_errors';
var div_content='<ul>'+message_list+'</ul>';
if($('#'+id).length==1){
$('#'+id).html(div_content);
$('#'+id).css('display', 'block');
}else{
$(this.form).before('<div id="'+id+'" class="error_block">Error'+div_content+'</div>');
}
}
}
lightbox.hide();
var form=$(this.form);
if(form.length !=0){
form_enable(form[0]);
}
}catch(ex){
script_error(ex);
}
};
this.expand_box=function(url, target){
if(String($(target).html()).match(/^\W*$/)){
lightbox.show();
$(target).load(
url,
function(){
lightbox.hide();
onchange_functions();
$(target).animate({opacity:'toggle', height:'toggle'}, 300, function(){
});
}
);
}else{
$(target).animate({opacity:'toggle', height:'toggle'}, 300);
}
return false;
};
}
var lightbox_count=0;
var lightbox={
active:false,
show:function(type, params){
if(lightbox_count==0){
this.set_params(params);
this.active=true;
this.create_box();
this.create_overlay();
this.create_loader(type);
}
lightbox_count++;
},
hide:function(status){
lightbox_count--;
if(lightbox_count==0){
$(this.loader).remove();
$(this.overlay).remove();
$(this.lightbox).remove();
this.active=false;
}
},
set_params:function(params){
this.params={
opacity_overlay:0.1,
color_overlay:'#000000'
}
if(params){
$.each(params, function(i, val){
dialog.params[i]=val;
});
}
},
create_box:function(){
this.lightbox=document.createElement("div");
$(this.lightbox).attr("id", "lightbox");
$(this.lightbox).height($(window).height());
$(this.lightbox).width('100%');
$("body").append(this.lightbox);
$('#lightbox').css('text-align', 'center');
$('#lightbox').css('position', 'absolute');
$('#lightbox').css('top', '0');
$('#lightbox').css('left', '0');
},
create_overlay:function(){
this.overlay=document.createElement("div");
$(this.overlay).attr("id", "lightbox_overlay");
$(this.overlay).height('100%');
$(this.overlay).width('100%');
$(this.lightbox).append(this.overlay);
$('#lightbox_overlay').css('position', 'fixed');
$('#lightbox_overlay').css('background-color', this.params.color_overlay);
$('#lightbox_overlay').css('-moz-opacity', this.params.opacity_overlay);
$('#lightbox_overlay').css('opacity', this.params.opacity_overlay);
$('#lightbox_overlay').css('filter', 'alpha(opacity='+(this.params.opacity_overlay * 100)+')');
if($.browser.version=='7.0' && $.browser.msie){
$('#dialog_overlay').css('margin-left', '-50%');
}
},
create_loader:function(type){
if(!type){
if(($.browser.mozilla && $.browser.version.substr(0,3)=="1.9")|| $.browser.opera){
type='png-blue.png';
}else{
type='standard.gif';
}
}else{
type+='.gif';
}
this.loader=document.createElement("div");
$(this.loader).attr("id", "lightbox_loader");
$(this.lightbox).append(this.loader);
$('#lightbox_loader').html('<img src="'+cdn_redacs_url+'img/com/elements/ajax-loader-'+type+'" />');
if($.browser.msie && $.browser.version=='6.0'){
$('#lightbox_loader').css('position', 'absolute');
}else{
$('#lightbox_loader').css('position', 'fixed');
}
$('#lightbox_loader').css('top', '50%');
$('#lightbox_loader').css('left', '50%');
$('#lightbox_loader').css('margin', '-'+($('lightbox_loader').height()/2)+'px 0 0 -'+($('lightbox_loader').width()/2)+'px');
}
}
var dialog={
active:false,
params:null,
show_alert:function(title, message, params){
try{
this.set_params(params);
this.active=true;
this.create_box();
this.create_overlay();
this.create_content_box();
this.create_header(title);
this.create_content();
$('#dialog_content').html(message);
if(this.params.height==0){
this.content_box_new_position();
}
$("#dialog_content_box").fadeIn().css('display', 'block');
}catch(ex){
script_error(ex);
}
},
show_url_alert:function(url, title, params){
try{
this.set_params(params);
this.active=true;
this.create_box();
this.create_overlay();
this.create_content_box();
this.create_header(title);
this.create_content();
this.create_bottom('', 'OK', 'dialog.close_dialog');
lightbox.show();
$('#dialog_content').load(url, function(){
if(dialog.params.height==0){
dialog.content_box_new_position();
}
$("#dialog_content_box").fadeIn().css('display', 'block');
lightbox.hide();
});
}catch(ex){
script_error(ex);
}
},
show_message:function(title, text_btn_cancel, text_btn_ok, message, action_ok, params){
try{
this.set_params(params);
this.active=true;
this.create_box();
this.create_overlay();
this.create_content_box();
this.create_header(title);
this.create_error_box();
this.create_content();
this.create_bottom(text_btn_cancel, text_btn_ok, action_ok);
$('#dialog_content').html(message);
if(this.params.height==0){
this.content_box_new_position();
}
if(onchange_functions){
onchange_functions(true);
}
$("#dialog_content_box").fadeIn().css('display', 'block');
$('#dialog_content_error_box').animate({opacity:'toggle', height:'toggle'}, 0, function(){});
}catch(ex){
script_error(ex);
}
},
ajax_form:function(url, title, text_btn_cancel, text_btn_ok, params){
try{
this.set_params(params);
this.active=true;
this.create_box();
this.create_overlay();
this.create_content_box();
this.create_header(title);
this.create_error_box();
this.create_content();
this.create_bottom(text_btn_cancel, text_btn_ok, 'dialog.ajax_form_request');
lightbox.show();
$('#dialog_content').load(url, function(response, status, xhr){
if(status=="error"){
$("#dialog_content").html(xhr.status+" "+xhr.statusText);
}
if(dialog.params.height==0){
dialog.content_box_new_position();
}
$("#dialog_content_box").fadeIn().css('display', 'block');
$('#dialog_content_error_box').animate({opacity:'toggle', height:'toggle'}, 0, function(){});
$('#dialog_content :input:visible:enabled:first:not(.datepicker)').focus();
var form=$('#dialog_content form')[0];
$(form).append('<input type="submit" value="submit" />');
if($(form).hasClass('ajaxupload_form')){
$(form).submit(function(){
ajaxupload.submit();
return false;
});
}else{
$(form).submit(function(){
dialog.ajax_form_request();
return false;
});
}
if(onchange_functions){
onchange_functions(true);
}
lightbox.hide();
});
}catch(ex){
script_error(ex);
}
},
ajax_form_request:function(form){
if(!form){
var form=$('#dialog_content form')[0];
}
var scope=this;
if($('#dialog_content_error').html()!=''){
$('#dialog_content_error_box').animate({opacity:'toggle', height:'toggle'}, 500, function(){
$('#dialog_content_error').html('');
scope.ajax_form_submit(form);
});
}else{
scope.ajax_form_submit(form);
}
},
ajax_form_submit:function(form){
if($(form).hasClass('ajaxupload_form')){
ajaxupload.submit();
}else{
ajax.submit_form(form,{callback:this.params.callback});
}
},
ajax_form_error:function(form_id, messages){
var message_list='';
for(id_name in messages){
for(var i=0;i < messages[id_name].length;i++){
message_list+='<li>'+messages[id_name][i]+'</li>';
}
}
$('#dialog_content_error').html(message_list);
$('#dialog_content_error li').css('list-style', 'none');
$('#dialog_content_error_box').animate({opacity:'toggle', height:'toggle'}, 500, function(){});
},
set_params:function(params){
this.params={
callback:false,
opacity_overlay:0.1,
color_overlay:'#000000',
opacity:0.9,
close_button:true,
btn_ok_url:'',
background_image:'url('+cdn_redacs_url+'img/adm/layout/dialog_bg.png)',
background_repeat:'repeat-x',
background_position:'left top',
color:'#83b5cf',
color_text:'#FFFFFF',
width:400,
height:0,
padding:'15px 10px 10px 10px',
padding_header:10,
padding_bottom:10,
align:'center',
corner_radius:4,
image_close_btn:cdn_redacs_url+'img/adm/elements/lightbox_btn_close.png',
header_height:22,
bottom_height:30
}
if(params){
$.each(params, function(i, val){
dialog.params[i]=val;
});
}
},
content_box_new_position:function(){
if($('#dialog_content_box').height()> $(window).height()){
$(this.content).height($(window).height()-300);
}
$('#dialog_content_box').css('margin', '-'+(($('#dialog_content_box').height()-40)/2)+'px 0 0 -'+($('#dialog_content_box').width()/2)+'px');
},
create_box:function(){
this.dialog=document.createElement("div");
$(this.dialog).attr("id", "dialog");
$(this.dialog).height($(window).height());
$(this.dialog).width('100%');
$("body").append(this.dialog);
$('#dialog').css('text-align', 'center');
$('#dialog').css('position', 'absolute');
$('#dialog').css('top', '0');
$('#dialog').css('left', '0');
},
create_overlay:function(){
this.overlay=document.createElement("div");
$(this.overlay).attr("id", "dialog_overlay");
$(this.overlay).height('100%');
$(this.overlay).width('100%');
$(this.dialog).append(this.overlay);
$('#dialog_overlay').css('position', 'fixed');
$('#dialog_overlay').css('background-color', this.params.color_overlay);
$('#dialog_overlay').css('-moz-opacity', this.params.opacity_overlay);
$('#dialog_overlay').css('opacity', this.params.opacity_overlay);
$('#dialog_overlay').css('filter', 'alpha(opacity='+(this.params.opacity_overlay * 100)+')');
if($.browser.version=='7.0' && $.browser.msie){
$('#dialog_overlay').css('margin-left', '-50%');
}
},
create_content_box:function(){
this.content_box=document.createElement("div");
$(this.content_box).attr("id", "dialog_content_box");
$(this.content_box).width(this.params.width);
$(this.dialog).append(this.content_box);
$('#dialog_content_box').css('display', 'none');
if(jQuery.browser.version=='6.0'){
$('#dialog_content_box').css('position', 'absolute');
}else{
$('#dialog_content_box').css('position', 'fixed');
}
$('#dialog_content_box').css('text-align', 'left');
$('#dialog_content_box').css('color', this.params.color_text);
$('#dialog_content_box').css('top', '50%');
$('#dialog_content_box').css('left', '50%');
$('#dialog_content_box').css('background-color', this.params.color);
$('#dialog_content_box').css('background-image', this.params.background_image);
$('#dialog_content_box').css('background-repeat', this.params.background_repeat);
$('#dialog_content_box').css('background-position', this.params.background_position);
$('#dialog_content_box').css('-moz-border-radius', this.params.corner_radius+'px');
$('#dialog_content_box').css('-webkit-border-radius', this.params.corner_radius+'px');
$('#dialog_content_box').css('border-radius', this.params.corner_radius+'px');
$('#dialog_content_box').css('-moz-box-shadow', '0px 0px 10px #000000');
$('#dialog_content_box').css('-webkit-box-shadow', '0px 0px 10px #000000');
$('#dialog_content_box').css('box-shadow', '0px 0px 10px #000000');
if(this.params.opacity < 1){
$('#dialog_content_box').css('-moz-opacity', this.params.opacity);
$('#dialog_content_box').css('opacity', this.params.opacity);
$('#dialog_content_box').css('filter', 'alpha(opacity='+(this.params.opacity * 100)+')');
}
},
create_content:function(){
this.content=document.createElement("div");
$(this.content).attr("id", "dialog_content");
if(this.params.height > 0){
$(this.content).height(this.params.height-this.params.header_height-this.params.bottom_height);
}
$(this.content_box).append(this.content);
$('#dialog_content').css('text-align', this.params.align);
$('#dialog_content').css('overflow', 'auto');
$('#dialog_content').css('padding', this.params.padding);
$('#dialog_content_box').css('margin', '-'+(($('#dialog_content_box').height())/2)+'px 0 0 -'+($('#dialog_content_box').width()/2)+'px');
},
create_header:function(title){
var close_button='';
if(this.params.close_button){
close_button='<a href="javascript:dialog.close_dialog(false);void(0);"><img id="dialog_content_close_btn" src="'+this.params.image_close_btn+'" style="float:left;" /></a>';
}
var header='<div id="dialog_content_header">\
'+close_button+'\
<span style="font-weight:bold;margin-left:10px;">'+title+'</span>\
</div>\
';
$(this.content_box).append(header);
$('#dialog_content_header').css('padding', this.params.padding_header+'px');
$('#dialog_content_header').css('font-size', '120%');
$('#dialog_content_header').css('height', this.params.header_height+'px');
$('#dialog_content_header').css('line-height', this.params.header_height+'px');
},
create_bottom:function(text_btn_cancel, text_btn_ok, action_submit){
var button='<div id="dialog_content_bottom">';
if(text_btn_cancel !=''){
button+='<button onclick="dialog.close_dialog(false);" id="dialog_content_cancel_btn" title="'+text_btn_cancel+'" />';
}
if(text_btn_ok !='' && action_submit !=''){
button+='<button onclick="'+action_submit+'();" id="dialog_content_submit_btn" title="'+text_btn_ok+'" />';
}else if(text_btn_ok !=''){
button+='<button onclick="dialog.close_dialog(false);" id="dialog_content_submit_btn">'+text_btn_ok+'</button>';
}
button+='</div>';
$(this.content_box).append(button);
$('#dialog_content_bottom').css('padding', this.params.padding_bottom+'px');
$('#dialog_content_bottom').css('text-align', 'right');
$('#dialog_content_bottom').css('height', this.params.bottom_height+'px');
},
create_error_box:function(){
var error='<div id="dialog_content_error_box"><ul id="dialog_content_error"></ul></div>';
$(this.content_box).append(error);
$('#dialog_content_error').css('background-color', '#e7d8d8');
$('#dialog_content_error').css('color', '#FF0000');
$('#dialog_content_error').css('margin', '10px');
$('#dialog_content_error').css('padding', '10px');
$('#dialog_content_error').css('border', '1px solid #FF0000');
$('#dialog_content_error li').css('list-style', 'none');
},
close_dialog:function(status){
if(dialog.params.callback && status){
dialog.params.callback();
}
$("#dialog_content_box").fadeOut(300, function(){
$(dialog.content_box).remove();
$(dialog.overlay).remove();
$(dialog.dialog).remove();
dialog.active=false;
dialog.params.callback='';
});
}
}
