
var def_text={collab_item_description:$t('Enter a helpful folder description or instructions here','js_def_text_enter_a_helpful_folder_description'),collab_item_description_alert:$t('Are you sure you want to send this invitation without a description?','js_def_text_want_send_invitation_without_descr'),js_alert_share_with_yourself:$t('Sorry, but you cannot share a file with yourself.','js_def_text_you_cannot_share_file_with_yourself')};function user_can_write()
{return(user_access=='f'||user_access=='w'||user_access=='wo'||user_access=='rw');}
function user_can_read()
{return(user_access=='f'||user_access=='r'||user_access=='rw');}
function user_can_erase()
{return(user_access=='f');}
function user_can_share()
{return(user_access=='f');}
function user_can_tag()
{return(user_access=='f');}
function new_win(link,params)
{var params=params||{};var width=params['width']||400;var height=params['height']||400;var left=params['left']||200;var top=params['top']||200;window.open(link,'_blank',"height="+height+", width="+width+", left="+left+", top="+top+", status=no,toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=no");return false;}
function new_win_info(link,width,height)
{window.open(link,'_blank',"height="+(height)+", width="+(width)+", left=190, top=190, status=no,toolbar=no,menubar=no,location=no,scrollbars=no,resizable=no");return false;}
var suggestion_popup={open:function()
{simpleBodyBlocker.create();$('global_blocker').onclick=suggestion_popup.cancel;system.set_popup_position($('suggestion_popup'));$('suggestion_popup_textarea').value='';$('suggestion_popup').style.display='block';},submit:function()
{var message=$('suggestion_popup_textarea').value;if(!message)
{alert('Please enter suggestion message');return;}
var query={message:message,feedback_type:1};var url=site_root+'index.php?rm=box_v2_bug_report';var q=$j.box.formatQuery(query);$j.getJSON(url,q,function(json)
{suggestion_popup.cancel();alert('Suggestion message was sucessfully sent');});},cancel:function()
{$j('#suggestion_popup').fadeOut("fast",suggestion_popup.cancel_callback);},cancel_callback:function()
{simpleBodyBlocker.destroy();}}
var translation_popup={'open':function()
{$j.popup.form($t('Help us translate','translation_help_popup_title'),[['html',$t('Please let us know if you see something translated incorrectly.  If you would like to help translate Box.net in your language please let us know!','translation_help_popup_text')],['html','<div style="margin:10px 0">Please write your message in english.</div>'],['textarea/','','message',''],[['button',$t('Send','translation_help_popup_send'),translation_popup.submit,true],['button',$t('Cancel','translation_help_popup_cancel'),function(){$j.popup.close();}]]],{default_focus:'message'});},'submit':function(params)
{var message=$j.trim(params.message);if(!message)
{alert($t('Sorry, we cannot send empty message. Please write something to us.','translation_help_popup_empty_alert'));return;}
var url=site_root+'index.php?rm=box_translation_help';$j.post(url,{'message':message},function(json)
{$j.popup.close();alert($t('Message has been sent. Thanks for your support!.','translation_help_popup_confirm'));},'json');}}
$j(function()
{$j('#add_to_box_gallery_button span').hover
(function()
{$j(this).css('background','url('+images_url+'box_item_menu_parts.gif) -8px -136px no-repeat');},function()
{$j(this).css('background','url('+images_url+'box_item_menu_parts.gif) -8px -104px no-repeat');});$j('#gallery_file_menu span').hover
(function()
{$j(this).css('background','url('+images_url+'box_item_menu_parts.gif) -8px -72px no-repeat');},function()
{$j(this).css('background','url('+images_url+'box_item_menu_parts.gif) -8px -8px no-repeat');});})