(function(a){a.fn.colorFade=function(){this.animate({backgroundColor:"#ff0000"},1).animate({backgroundColor:"#ffffff"},1000)}})(jQuery);(function(a){a.fn.jKwick=function(f){f=a.extend({min:0,max:0,mid:0,speed:150,easing:"linear"},f||{});var c=a("ul",this),e=a("li",c),d=e.length,g=null,j=null,b=true,h=false,i=function(){};e.hover(function(){if(!h){h=true;j=a(this);if(b){j.animate({width:f.max},f.speed);e.not(this).animate({width:f.min},f.speed,function(){g=j;b=h=false})}else{var l=j.width(),k=g.width();j.animate({width:f.max},{duration:f.speed,easing:f.easing,step:function(m){g.width(Math.ceil(k-(m-l)))},complete:function(){g=j;h=false}})}}},i);c.hover(i,function(){e.animate({width:f.mid},f.speed);b=true})}})(jQuery);(function(a){jQuery.fn.doxEditor=function(b){return this.each(function(){a(this).ckeditor(function(){},{customConfig:"",filebrowserBrowseUrl:"/api/gazeti/browseasset/none.html/"+Dox.Vars.SessionId,filebrowserImageBrowseUrl:"/api/doxfile/browseimage/none.html/"+Dox.Vars.SessionId,filebrowserFlashBrowseUrl:"/api/gazeti/browseflash/none.html/"+Dox.Vars.SessionId,filebrowserUploadUrl:a.cookie("UploadPath"),filebrowserImageUploadUrl:a.cookie("UploadPath"),filebrowserFlashUploadUrl:a.cookie("UploadPath"),filebrowserWindowWidth:"640",filebrowserWindowHeight:"480",filebrowserImageWindowWidth:"640",filebrowserImageWindowHeight:"480",filebrowserImageWindowWidth:"640",filebrowserImageWindowHeight:"480",htmlEncodeOutput:false,enterMode:"2",language:"sv",toolbarStartupExpanded:false,scayt_autoStartup:false,uiColor:"#ccc",toolbar:[["Bold","Italic","Underline","-","NumberedList","BulletedList"],["JustifyLeft","JustifyCenter","JustifyRight","JustifyBlock","-","Outdent","Indent","Blockquote","-","Link","Unlink"],["Undo","Redo","-","Find","Replace","-","SelectAll","RemoveFormat"],["Image","Flash","Table","HorizontalRule","Smiley","SpecialChar","PageBreak"],["Styles","Format","Font","FontSize"],"/",["Form","Checkbox","Radio","TextField","Textarea","Select","Button","ImageButton","HiddenField"],["TextColor","BGColor"],["Templates"],["Source","Maximize"]]})})}})(jQuery);(function(a){jQuery.fn.iphoneSwitch=function(f,e,b,c){var d=f=="on"?f:"off";var g={mouse_over:"pointer",mouse_out:"default",switch_on_container_path:"http://cdn.concode.se/doxcentral.com/img/iphone_switch_container_on.png",switch_off_container_path:"http://cdn.concode.se/doxcentral.com/img/iphone_switch_container_off.png",switch_path:"http://cdn.concode.se/doxcentral.com/img/iphone_switch.png",switch_height:27,switch_width:94};if(c){jQuery.extend(g,c)}return this.each(function(){var i;var h;i=jQuery('<div class="iphone_switch_container" style="height:'+g.switch_height+"px; width:"+g.switch_width+'px; position: relative; overflow: hidden"></div>');h=jQuery('<img class="iphone_switch" style="height:'+g.switch_height+"px; width:"+g.switch_width+"px; background-image:url("+g.switch_path+"); background-repeat:none; background-position:"+(d=="on"?0:-53)+'px" src="'+(d=="on"?g.switch_on_container_path:g.switch_off_container_path)+'" />');jQuery(this).html(jQuery(i).html(jQuery(h)));jQuery(this).mouseover(function(){jQuery(this).css("cursor",g.mouse_over)});jQuery(this).mouseout(function(){jQuery(this).css("background",g.mouse_out)});jQuery(this).click(function(){if(d=="on"){jQuery(this).find(".iphone_switch").animate({backgroundPosition:-53},"slow",function(){jQuery(this).attr("src",g.switch_off_container_path);b()});d="off"}else{jQuery(this).find(".iphone_switch").animate({backgroundPosition:0},"slow",function(){e()});jQuery(this).find(".iphone_switch").attr("src",g.switch_on_container_path);d="on"}})})}})(jQuery);(function(a){a.fn.Slidinglabels=function(e){var d={topPosition:"5px",leftPosition:"5px",axis:"x",speed:"fast"};var e=a.extend(d,e);var c=this.children(".formslider");var b=c.children("label");return b.each(function(){obj=a(this);var g=obj.parents(".formslider");g.css({position:"relative"});obj.css({position:"absolute",top:d.topPosition,left:d.leftPosition,display:"inline","z-index":99});var h=a(this).next().val();var j=a(this).width();var i=j+5+"px";var f=a(this).height();if(h!==""){if(d.axis=="x"){obj.stop().animate({left:"-"+i},1)}else{if(d.axis=="y"){obj.stop().animate({top:"-"+f},1)}}}a("input, textarea").focus(function(){var p=a(this).prev("label");var n=p.width();var l=p.height();var k=n+5+"px";var o=l+"px";var m=a(this).val();if(m==""){if(d.axis=="x"){p.stop().animate({left:"-"+k},d.speed)}else{if(d.axis=="y"){p.stop().animate({top:"-"+o},d.speed)}}}else{if(d.axis=="x"){p.css({left:"-"+k})}else{if(d.axis=="y"){p.css({top:"-"+o})}}}}).blur(function(){var l=a(this).prev("label");var k=a(this).val();if(k==""){if(d.axis=="x"){l.stop().animate({left:d.leftPosition},d.speed)}else{if(d.axis=="y"){l.stop().animate({top:d.leftPosition},d.speed)}}}})})}})(jQuery);jQuery.extend({doxGet:function(a,c,b){if(b===undefined){b="html"}return jQuery.ajax({type:"GET",url:a,cache:false,dataType:b,timeout:15000,success:function(d){if(jQuery.isFunction(c)){c(d)}},error:function(f,e,d){$.jGrowl(e+" "+a,{sticky:true,header:"Ajax Error"})},complete:function(){}})},doxPost:function(a,b,c){return jQuery.ajax({type:"POST",url:a,cache:false,data:b,dataType:"html",timeout:15000,success:function(d){if(jQuery.isFunction(c)){c(d)}},error:function(f,e,d){$.jGrowl(e+" "+a,{sticky:true,header:"Ajax Error"})},complete:function(){}})},doxScript:function(a,b,c){return jQuery.ajax({type:"GET",url:a,cache:true,data:b,dataType:"script",timeout:15000,success:function(d){if(jQuery.isFunction(c)){c(d)}},error:function(f,e,d){$.jGrowl(e+" "+a,{sticky:true,header:"script load error"})},complete:function(){}})}});var Dox={};Dox._construct=function(){function c(){}function h(){}function a(){}function f(){}function g(){}function e(){}function d(){}function b(){}this.Vars=c;this.Resource=h;this.Dialog=a;this.Session=f;this.UserParameter=g;this.Model=e;this.ViewModel=d;this.View=b;Dox.Vars.SessionId=$.cookie("DOXSESSIONID51X");Dox.Vars.UserId=$.cookie("DOXUSERID51X");Dox.Vars.Language=$.cookie("LANGUAGE51X");Dox.Vars.null_guid="{00000000-0000-0000-0000-000000000000}";Dox.Vars.Skin=$.cookie("SKIN");Dox.Vars.PlValue=$.cookie("PLVALUE51X");Dox.Vars.IsGuest=$.cookie("ISGUEST51X");Dox.Vars.IsDragging=false;Dox.Vars.IsCtrl=false;Dox.Vars.IsShift=false;Dox.Vars.FileIndex=-1;Dox.Vars.FileCount=0;Dox.Vars.SelectedFilesCount=0};Dox._construct();Dox.Model.SelectFile=function(b,a){$.doxGet("/api/doxfile/select/"+b+".html/"+Dox.Vars.SessionId,a)};Dox.Model.SelectFiles=function(b,a){$.doxPost("/api/doxfile/selectfiles/none.html/"+Dox.Vars.SessionId,b,a)};Dox.Model.ToggleSelectFile=function(b,a){$.doxGet("/api/doxfile/toggleselectfile/"+b+".html/"+Dox.Vars.SessionId,a)};Dox.Model.DeselectFile=function(b,a){$.doxGet("/api/doxfile/deselect/"+b+".html/"+Dox.Vars.SessionId,a)};Dox.Model.SelectFilesRecursive=function(b,a){$.doxPost("/api/doxfile/selectfilesrecursive/none.html/"+Dox.Vars.SessionId,b,a)};Dox.Model.DeselectFilesRecursive=function(b,a){$.doxPost("/api/doxfile/deselectfilesrecursive/none.html/"+Dox.Vars.SessionId,b,a)};Dox.Model.DeselectAllFiles=function(a){$.doxGet("/api/doxfile/deselectallfiles/none.html/"+Dox.Vars.SessionId,a)};Dox.Model.SelectedFilesCount=function(a){if(Dox.Vars.SessionId!==null){$.doxGet("/api/doxfile/selectedfilescount/none.html/"+Dox.Vars.SessionId,a)}};Dox.Model.DeleteFile=function(b,a){$.doxGet("/api/doxfile/delete/"+b+".html/"+Dox.Vars.SessionId,a)};Dox.Model.SelectedFilesMove=function(b,a){$.doxPost("/api/doxfile/selectedfilesmove/none.html",b,a)};Dox.Model.SelectedFilesCopy=function(b,a){$.doxPost("/api/doxfile/selectedfilescopy/none.html",b,a)};Dox.Model.SelectedFilesShortcut=function(b,a){$.doxPost("/api/doxfile/selectedfilesshortcut/none.html",b,a)};Dox.Model.Shortcut=function(a,b,c){$.doxPost("/api/doxfile/shortcut/"+a+".html/"+Dox.Vars.SessionId,b,c)};Dox.Model.SelectedFilesDelete=function(b,a){$.doxPost("/api/doxfile/selectedfilesdelete/none.html",b,a)};Dox.Model.SelectedFilesUndelete=function(b,a){$.doxPost("/api/doxfile/selectedfilesundelete/none.html",b,a)};Dox.Model.GetFileDetails=function(b,a){$.doxGet("/api/doxfile/filedetails/"+b+".html/"+Dox.Vars.SessionId,a)};Dox.Model.GetFileRow=function(b,a){$.doxGet("/api/doxfile/filerow/"+b+".html/"+Dox.Vars.SessionId,a)};Dox.Model.GetFileRows=function(b,a){$.doxGet("/api/doxfile/filerows/"+b+".html/"+Dox.Vars.SessionId,a)};Dox.Model.GetFiles=function(b,a){if(b==undefined||b==null||b==""){b="none"}$.doxGet("/api/doxfile/filelist/"+b+".html/"+Dox.Vars.SessionId,a)};Dox.Model.FileListSort=function(b,a){$.doxPost("/api/doxfile/filelistsort/none.html/"+Dox.Vars.SessionId,b,a)};Dox.Model.FilePage=function(a){$.doxGet("/api/doxfile/filepage/none.html/"+Dox.Vars.SessionId,a)};Dox.Model.GetErasedFiles=function(a){$.doxGet("/api/doxfile/erasedfilelist/none.html/"+Dox.Vars.SessionId,a)};Dox.Model.GetSelectedFiles=function(a){$.doxGet("/api/doxfile/selectedfilelist/none.html/"+Dox.Vars.SessionId,a)};Dox.Model.GetFoundFiles=function(a){$.doxGet("/api/doxfile/foundfilelist/none.html/"+Dox.Vars.SessionId,a)};Dox.Model.GetLastClickedButton=function(a){$.doxGet("/api/doxuser/getlastclickedbutton/"+Dox.Vars.UserId+".html/"+Dox.Vars.SessionId,a)};Dox.Model.SelectInNewSession=function(b,a){$.doxPost("/api/doxfile/selectinnewsession/none.html/"+Dox.Vars.SessionId,b,a)};Dox.Model.GetFolderInfo=function(a,b){$.doxGet("/api/doxfolder/folderinfo/"+a+".html/"+Dox.Vars.SessionId,b)};Dox.Model.GetSubfolders=function(b,a){$.doxGet("/api/doxfolder/getsubfolders/"+b+".html/"+Dox.Vars.SessionId,a)};Dox.Model.GetBreadcrumb=function(b,a){$.doxGet("/api/doxfolder/breadcrumb/"+b+".html/"+Dox.Vars.SessionId,a)};Dox.Model.GetBidBreadcrumb=function(b,a){$.doxGet("/api/doxfolder/breadcrumbbid/"+b+".html/"+Dox.Vars.SessionId,a)};Dox.Model.FolderSet=function(d,c,a,b){$.doxPost("/api/doxfolder/current/"+d+".html/"+c,a,b)};Dox.Model.FolderExpand=function(d,c,a,b){$.doxPost("/api/doxfolder/expand/"+d+".html/"+c,a,b)};Dox.Model.FolderCollapse=function(d,c,a,b){$.doxPost("/api/doxfolder/collapse/"+d+".html/"+c,a,b)};Dox.Model.GetFolderCreate=function(b,a){$.doxGet("/api/doxfolder/foldercreate/"+b+".html/"+Dox.Vars.SessionId,a)};Dox.Model.GetFolderUpdate=function(b,a){$.doxGet("/api/doxfolder/folderupdate/"+b+".html/"+Dox.Vars.SessionId,a)};Dox.Model.GetFolderDelete=function(b,a){$.doxGet("/api/doxfolder/folderdelete/"+b+".html/"+Dox.Vars.SessionId,a)};Dox.Model.FolderMove=function(d,a,b){var c={sourceFolderId:d,newSessionId:a};$.doxPost("/api/doxfolder/foldermove/"+d+".html/"+Dox.Vars.SessionId,c,b)};Dox.Model.FolderCopyStructure=function(b,a){$.doxPost("/api/doxfolder/foldercopystructure/none.html/"+Dox.Vars.SessionId,b,a)};Dox.Model.GroupRights=function(a,b){$.doxGet("/api/doxfolder/grouprights/"+a+".html/"+Dox.Vars.SessionId,b)};Dox.Model.GroupNonRights=function(a,b){$.doxGet("/api/doxfolder/groupnonrights/"+a+".html/"+Dox.Vars.SessionId,b)};Dox.Model.GroupNotify=function(a,b){$.doxGet("/api/doxfolder/groupnotify/"+a+".html/"+Dox.Vars.SessionId,b)};Dox.Model.GroupNonNotify=function(a,b){$.doxGet("/api/doxfolder/groupnonnotify/"+a+".html/"+Dox.Vars.SessionId,b)};Dox.Model.GetSelectOptions=function(a,b){$.doxGet("/api/doxfolder/selectoptions/"+a+".html/"+Dox.Vars.SessionId,b)};Dox.Model.GetObjectsWithFolderRights=function(b,a){$.doxGet("/api/doxuser/objectswithfolderrights/"+b+".html",a)};Dox.Resource.Get=function(a,b){var c="";return jQuery.ajax({type:"GET",url:"/api/resource/get/"+a+"/"+Dox.Vars.Language,cache:false,async:false,dataType:"html",timeout:7500,global:false,success:function(d){c=d},error:function(e,f,d){c=f},complete:function(){if(c!=""){c=b}}}).responseText};Dox.Session.Close=function(a){$.get("/api/doxsession/close/none.html/"+a)};Dox.Session.Set=function(d,b,c,e){var a={sessionId:c,value:b};$.doxPost("/api/doxsession/value/"+d+".html",a,e)};Dox.Session.Get=function(a,b,c){$.doxGet("/api/doxsession/value/"+a+".html/"+b,c)};Dox.UserParameter.Set=function(d,a,b){var c={sessionId:Dox.Vars.SessionId,value:a};$.doxPost("/api/doxuser/parameter/"+d+".html",c,b)};Dox.UserParameter.Get=function(b,a){$.doxGet("/api/doxuser/parameter/"+b+".html/"+Dox.Vars.SessionId,a)};Dox.Session.SaveTemp=function(d,a,b){var c={sessionId:Dox.Vars.SessionId,value:a};$.doxPost("/api/doxuser/mailsavetemp/"+d+".html",c,b)};Dox.Session.GetMailTemp=function(b,a){$.doxGet("/api/doxuser/mailgettemp/"+b+".html/"+Dox.Vars.SessionId,a)};Dox.Dialog.FileDrop=function(b,a){$.doxPost("/html/askfiledrop/"+Dox.Vars.SessionId,b,a)};Dox.Dialog.FileDelete=function(b,a){$.doxPost("/html/askfiledelete/"+Dox.Vars.SessionId,b,a)};Dox.Dialog.SelectFolderMove=function(a){$.doxGet("/html/selectfoldermove/"+Dox.Vars.SessionId,a)};Dox.Dialog.FolderMove=function(a){$.doxGet("/html/foldermove/"+Dox.Vars.SessionId,a)};Dox.Dialog.FolderCopy=function(a){$.doxGet("/html/foldercopy/"+Dox.Vars.SessionId,a)};Dox.Dialog.FolderDrop=function(b,a){$.doxPost("/html/askfolderdrop/"+Dox.Vars.SessionId,b,a)};Dox.Dialog.InviteUserByEmail=function(a){$.doxGet("/html/inviteuserbyemail/"+Dox.Vars.SessionId,a)};Dox.Model.FolderMultiButton=function(a){$.doxGet("/html/foldermultibutton/"+Dox.Vars.SessionId,a)};Dox.Dialog.SelectFolderCopy=function(a){$.doxGet("/html/selectfoldercopy/"+Dox.Vars.SessionId,a)};Dox.Dialog.SelectFolderShortcut=function(a){$.doxGet("/html/selectfoldershortcut/"+Dox.Vars.SessionId,a)};Dox.Dialog.LinkFiles=function(b,a){$.doxPost("/html/linkfiles/"+Dox.Vars.SessionId,b,a)};Dox.Model.GetMyProjects=function(a,b){$.doxGet("/html/myprojects/"+Dox.Vars.SessionId,b)};Dox.Model.GetUserBreadcrumb=function(a,b){$.doxGet("/api/doxuser/breadcrumb/"+a+".html/"+Dox.Vars.SessionId,b)};Dox.Model.AddPersonToGroup=function(b,a){$.doxPost("/api/doxuser/addpersontogroup/none.html",b,a)};Dox.Model.AddPersonToGroupUserDetails=function(b,a){$.doxPost("/api/doxuser/addtogroupuserdetails/none.html",b,a)};Dox.Model.GroupAddMembership=function(b,a){$.doxPost("/api/doxuser/groupaddmembership/none.html",b,a)};Dox.Model.GroupRemoveMembership=function(b,a){$.doxPost("/api/doxuser/groupremovemembership/none.html",b,a)};Dox.Model.GroupRemoveMembershipUserDetails=function(b,a){$.doxPost("/api/doxuser/removefromgroupuserdetails/none.html",b,a)};Dox.Model.GetUserRows=function(a,b){$.doxGet("/api/doxuser/userlist/"+a+".html/"+Dox.Vars.SessionId,b)};Dox.Model.GetUserNotMemberRows=function(a,b){$.doxGet("/api/doxuser/userlistnotincontainer/"+a+".html/"+Dox.Vars.SessionId,b)};Dox.Model.GetUserRow=function(b,a){$.doxGet("/api/doxuser/userrow/"+b+".html/"+Dox.Vars.SessionId,a)};Dox.Model.GetContainerId=function(){$.doxGet("/api/doxuser/currentcontainer/none.html/"+Dox.Vars.SessionId,null)};Dox.Model.GetContainertype=function(a){$.doxGet("/api/doxuser/currentcontainertype/none.html/"+Dox.Vars.SessionId,a)};Dox.Model.SetContainerId=function(c,a,b,d){$.doxPost("/api/doxuser/currentcontainer/"+c+"."+a+"/"+Dox.Vars.SessionId,b,d)};Dox.Model.GetUserDetails=function(a,b){$.doxGet("/api/doxuser/userdetails/"+a+".html/"+Dox.Vars.SessionId,b)};Dox.Model.ToggleSelectUser=function(a,b){$.doxGet("/api/doxuser/SelectUserToggle/"+a+".html/"+Dox.Vars.SessionId,b)};Dox.Model.GetUserInfo=function(a,b){$.doxGet("/api/doxuser/userinfo/"+a+".html/"+Dox.Vars.SessionId,b)};Dox.Model.FolderStyle=function(a,b){$.doxGet("/api/gazeti/folderstyle/"+a+".html/"+Dox.Vars.SessionId,b)};Dox.Model.SendUserPassword=function(b,a){$.doxGet("/api/doxuser/senduserpassword/"+b+".html/"+Dox.Vars.SessionId,a)};Dox.Model.SendPortalUserPassword=function(b,a){$.doxGet("/api/doxuser/sendportaluserpassword/"+b+".html/"+Dox.Vars.SessionId,a)};Dox.Model.UserPage=function(a){$.doxGet("/api/doxuser/userpage/none.html/"+Dox.Vars.SessionId,a)};Dox.Model.GetLinkedFiles=function(b,a){$.doxGet("/api/doxfile/linkedfiles/"+b+".html/"+Dox.Vars.SessionId,a)};Dox.Model.LinkFile=function(a,b,c){$.doxPost("/api/doxfile/link/"+a+".html/"+Dox.Vars.SessionId,b,c)};Dox.Model.UnlinkFile=function(a,b,c){$.doxPost("/api/doxfile/unlink/"+a+".html/"+Dox.Vars.SessionId,b,c)};Dox.Model.TagList=function(b,a){$.doxPost("/api/doxusertag/taglist/none.html/"+Dox.Vars.SessionId,b,a)};Dox.Model.DeleteTag=function(b,a){$.doxPost("/api/doxusertag/delete/none.html/"+Dox.Vars.SessionId,b,a)};Dox.Model.AttachTag=function(b,a){$.doxPost("/api/doxusertag/attach/none.html/"+Dox.Vars.SessionId,b,a)};Dox.Model.DetachTag=function(b,a){$.doxPost("/api/doxusertag/detach/none.html/"+Dox.Vars.SessionId,b,a)};Dox.Model.AttachGroup=function(b,a){$.doxPost("/api/doxusertag/attachgroup/none.html/"+Dox.Vars.SessionId,b,a)};Dox.Model.DetachGroup=function(b,a){$.doxPost("/api/doxusertag/detachgroup/none.html/"+Dox.Vars.SessionId,b,a)};Dox.Model.ApplyTags=function(b,a){$.doxPost("/api/doxusertag/applytags/none.html/"+Dox.Vars.SessionId,b,a)};Dox.Model.AddToCart=function(b,a){$.doxPost("/api/negozio/addtocart/none.html/"+Dox.Vars.SessionId,b,a)};Dox.Model.RemoveFromCart=function(b,a){$.doxPost("/api/negozio/removefromcart/none.html/"+Dox.Vars.SessionId,b,a)};Dox.Model.GetCategory=function(b,a){$.doxGet("/api/negozio/category/"+b+".html/"+Dox.Vars.SessionId,a)};Dox.ViewModel.HideWorker=function(){$("#workingOuter").remove();$(".sortmenu").hide().removeClass("menu-open");$("span.fdt").hide()};Dox.ViewModel.GetGrowlMessage=function(d){d=d.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var c="[\\?&]"+d+"=([^&#]*)";var a=new RegExp(c);var e=a.exec(window.location.href);if(e==null){return""}else{switch(e[1]){case"ORDERSENT":var b=Dox.Resource.Get("ORDERSENT","Order is sent");$.jGrowl(b,{life:15000,header:Dox.Resource.Get("CONFIRMATION","Dox information")});break;case"ORDERSENDERROR":var b=Dox.Resource.Get("ORDERSENDERROR","Error sending order");$.jGrowl(b,{life:15000,header:Dox.Resource.Get("CONFIRMATION","Dox information")});break;case"NOFILESINLIST":var b=Dox.Resource.Get("NOFILESINLIST","No files selected");$.jGrowl(b,{life:15000,header:Dox.Resource.Get("CONFIRMATION","Dox information")});break;case"PROJECTORDERSENT":var b=Dox.Resource.Get("PROJECTORDERSENT","Email is sent");$.jGrowl(b,{life:20000,header:Dox.Resource.Get("CONFIRMATION","Dox information")});break;case"PROJECTORDERERROR":var b=Dox.Resource.Get("PROJECTORDERERROR","Error sending email");$.jGrowl(b,{life:20000,header:Dox.Resource.Get("CONFIRMATION","Dox information")});break;case"ORDERRECIPIENTMISSING":var b=Dox.Resource.Get("ORDERRECIPIENTMISSING1","Orderrecipient not set")+"<br />";b+=Dox.Resource.Get("ORDERRECIPIENTMISSING","")+"<br />";b+=Dox.Resource.Get("ORDERRECIPIENTMISSING2","");$.jGrowl(b,{life:15000,header:Dox.Resource.Get("CONFIRMATION","Dox information")});break;default:$.jGrowl(Dox.Resource.Get(e[1],"Not set"),{life:15000,header:Dox.Resource.Get("INFORMATION","Dox information")})}}};Dox.ViewModel.SelectFileInDom=function(a){var b=$("table.fileList tr[data-fileid="+a+"] a.ico-check-False");if(b.length){b.removeClass("ico-check-False").addClass("ico-check-True");b.parents("tr").addClass("selected")}};Dox.ViewModel.DeselectFileInDom=function(a){sf=$("table.fileList tr[data-fileid="+a+"] a.ico-check-True");if(sf.length){sf.removeClass("ico-check-True").addClass("ico-check-False");sf.parents("tr").removeClass("selected")}};Dox.ViewModel.FileSelectChanged=function(){var a=function(b){Dox.Vars.SelectedFilesCount=b;if(Dox.Vars.SelectedFilesCount>0){Dox.ViewModel.ShowFileDownloadButton()}else{Dox.ViewModel.HideFileDownloadButton()}Dox.ViewModel.HideWorker()};Dox.Model.SelectedFilesCount(a)};Dox.ViewModel.ShowFileDownloadButton=function(){$("#btnDownload").css("display","inline-block")};Dox.ViewModel.HideFileDownloadButton=function(){$("#btnDownload").css("display","none")};Dox.ViewModel.RefreshFileRows=function(b){var a=function(c){if(null!=c){$("#Files tr.file[folderid="+b+"]").remove();$("#Files tr.bc[folderid="+b+"]").after(c);if($("#Files tr.bc[folderid="+b+"] th").hasClass("tableHeaderEmpty")){$("#Files tr.bc[folderid="+b+"] th").removeClass("tableHeaderEmpty").addClass("tableHeader")}Dox.Vars.FileCount=$("#Files tr.file").length;Dox.Vars.FileIndex=-1}};Dox.Model.GetFileRows(b,a);Dox.ViewModel.HideWorker()};Dox.ViewModel.RenderFiles=function(a){if(a===undefined){a="none"}if(a===null){a="none"}if(a===""){a="none"}$("#itemDetailTabs").tabs("destroy");$("#itemsContent").tabs("url",0,"/api/doxfile/filelist/"+a+".html/"+Dox.Vars.SessionId).tabs("load",0)};Dox.ViewModel.RenderErasedFiles=function(){var a=function(b){if(null!=b){$("#ErasedFiles").replaceWith(b)}};Dox.Model.GetErasedFiles(a);Dox.ViewModel.HideWorker()};Dox.ViewModel.RenderSelectedFiles=function(){var a=function(b){$("#SelectedItems").html(b);Dox.ViewModel.SyncDom()};Dox.Model.GetSelectedFiles(a);Dox.ViewModel.HideWorker()};Dox.ViewModel.SyncDom=function(){$(".selectedList tr").each(function(){Dox.ViewModel.SelectFileInDom($(this).data("fileid"))})};Dox.ViewModel.RenderFoundFiles=function(){var a=function(b){$("#Files").replaceWith(b);Dox.View.FilesSelectable();Dox.View.InitSort();Dox.ViewModel.FileSelectChanged();$("button").button();$("#itemDetailTabs").tabs()};Dox.Model.GetFoundFiles(a);Dox.ViewModel.HideWorker()};Dox.ViewModel.SelectFile=function(b){var a=function(c){if(c.indexOf(b)>0){$("#SelectedItems tbody tr[data-fileid="+b+"]").remove();$("#SelectedItems tbody").append(c);Dox.ViewModel.SelectFileInDom(b);Dox.ViewModel.FileSelectChanged()}};Dox.Model.SelectFile(b,a);Dox.ViewModel.HideWorker()};Dox.ViewModel.SelectFiles=function(b){var c=function(d){Dox.ViewModel.FileSelectChanged();Dox.ViewModel.RenderSelectedFiles();Dox.ViewModel.HideWorker()};var a={files:b};Dox.Model.SelectFiles(a,c)};Dox.ViewModel.SelectFilesRecursive=function(d,e,b){var c={recursive:b,folderid:e,sessionId:Dox.Vars.SessionId};var a=function(f){e=$(d).data("folderid");Dox.ViewModel.RenderSelectedFiles();Dox.ViewModel.RenderFiles(e)};Dox.Model.SelectFilesRecursive(c,a)};Dox.ViewModel.DeselectFilesRecursive=function(d,e,b){var c={recursive:b,folderid:e,sessionId:Dox.Vars.SessionId};var a=function(f){e=$(d).data("folderid");Dox.ViewModel.RenderSelectedFiles();Dox.ViewModel.RenderFiles(e)};Dox.Model.DeselectFilesRecursive(c,a)};Dox.ViewModel.DeselectAllFiles=function(){var a=function(b){$("#SelectedItems.selectedfileList tbody tr").each(function(){var c=$(this).data("fileid");var d=$("table.fileList tr[data-fileid="+c+"] a.ico-check-True");if(d.length){d.removeClass("ico-check-True").addClass("ico-check-False");d.parents("tr").removeClass("selected")}$(this).remove()})};Dox.Model.DeselectAllFiles(a);Dox.ViewModel.HideWorker()};Dox.ViewModel.ToggleSelectFile=function(b){var a=function(c){if(c.indexOf(b)>0){$("#SelectedItems tbody tr[data-fileid="+b+"]").remove();$("#SelectedItems tbody").append(c);Dox.ViewModel.SelectFileInDom(b);Dox.ViewModel.FileSelectChanged()}else{$("#SelectedItems tbody tr[data-fileid="+b+"]").remove();Dox.ViewModel.DeselectFileInDom(b);Dox.ViewModel.FileSelectChanged()}};Dox.Model.ToggleSelectFile(b,a);Dox.ViewModel.HideWorker()};Dox.ViewModel.DeselectFile=function(b){var a=function(c){$("table.selectedfileList tr[data-fileid="+b+"]").remove();Dox.ViewModel.DeselectFileInDom(b);Dox.ViewModel.FileSelectChanged()};Dox.Model.DeselectFile(b,a);Dox.ViewModel.HideWorker()};Dox.ViewModel.DeselectUser=function(b){var a=function(c){$("table.selectedpersonList tr[data-userid="+b+"]").remove()};Dox.Model.ToggleSelectUser(b,a);Dox.ViewModel.HideWorker()};Dox.ViewModel.DeleteFile=function(b){var a=function(c){Dox.ViewModel.RenderFiles()};Dox.Model.DeleteFile(b,a);Dox.ViewModel.HideWorker()};Dox.ViewModel.SelectedFilesCopy=function(b,c){var d=function(){Dox.ViewModel.RefreshFileRows(b);$.jGrowl(Dox.Resource.Get("FILEISCOPIED","File(s) copied"),{life:10000,header:Dox.Resource.Get("CONFIRMATION","Dox information")});$("#dialog").dialog("close")};var a={folderId:b,sessionId:c};Dox.Model.SelectedFilesCopy(a,d);Dox.ViewModel.HideWorker()};Dox.ViewModel.DroppedFilesCopy=function(d,a){var b=function(){Dox.ViewModel.RefreshFileRows(d);Dox.Session.Close(a);$("#askDialog").dialog("close")};var c={folderId:d,sessionId:a};Dox.Model.SelectedFilesCopy(c,b);Dox.ViewModel.HideWorker()};Dox.ViewModel.SelectedFilesMove=function(d,a){var b=function(){Dox.ViewModel.FolderSet("#treeContainer",d,Dox.Vars.SessionId);$.jGrowl(Dox.Resource.Get("FILEISMOVED","File moved"),{life:10000,header:Dox.Resource.Get("CONFIRMATION","Dox information")});$("#dialog").dialog("close")};var c={folderId:d,sessionId:a};Dox.Model.SelectedFilesMove(c,b);Dox.ViewModel.HideWorker()};Dox.ViewModel.DroppedFilesMove=function(d,a){var b=function(){Dox.ViewModel.FolderSet("#treeContainer",d,Dox.Vars.SessionId);Dox.Session.Close(a);$("#askDialog").dialog("close");$("#askDialog").remove()};var c={folderId:d,sessionId:a};Dox.Model.SelectedFilesMove(c,b);Dox.ViewModel.HideWorker()};Dox.ViewModel.SelectedFilesShortcut=function(d,b){var a=function(){Dox.ViewModel.RefreshFileRows(d);$.jGrowl(Dox.Resource.Get("SHORTCUTCREATED","File moved"),{life:10000,header:Dox.Resource.Get("CONFIRMATION","Dox information")});$("#dialog").dialog("close")};var c={folderId:d,sessionId:b};Dox.Model.SelectedFilesShortcut(c,a);Dox.ViewModel.HideWorker()};Dox.ViewModel.DroppedFilesShortcut=function(d,a){var b=function(){Dox.ViewModel.RefreshFileRows(d);Dox.Session.Close(a);$("#askDialog").dialog("close")};var c={folderId:d,sessionId:a};Dox.Model.SelectedFilesShortcut(c,b);Dox.ViewModel.HideWorker()};Dox.ViewModel.SelectedFilesDelete=function(b){var c=function(){Dox.ViewModel.RenderFiles()};var a={sessionId:b};Dox.Model.SelectedFilesDelete(a,c);$.jGrowl(Dox.Resource.Get("MOVEDTOBIN","Deleted"),{sticky:true,header:Dox.Resource.Get("CONFIRMATION","Dox information")});Dox.ViewModel.HideWorker()};Dox.ViewModel.DroppedFilesDelete=function(a){var c=function(){$("table.fileList tbody tr.ui-selected").each(function(){$(this).remove()});Dox.Session.Close(a);var d=Dox.Session.Get("folderId",Dox.Vars.SessionId);Dox.ViewModel.RenderFiles(d);$("#askDialog").dialog("close")};var b={sessionId:a};Dox.Model.SelectedFilesDelete(b,c);$.jGrowl(Dox.Resource.Get("MOVEDTOBIN","Deleted"),{sticky:true,header:Dox.Resource.Get("CONFIRMATION","Dox information")});Dox.ViewModel.HideWorker()};Dox.ViewModel.SelectedFilesUndelete=function(){var a=function(){Dox.ViewModel.RenderErasedFiles();var c=Dox.Session.Get("folderId",Dox.Vars.SessionId);Dox.ViewModel.RenderFiles(c)};var b={sessionId:Dox.Vars.SessionId};Dox.Model.SelectedFilesUndelete(b,a);$.jGrowl(Dox.Resource.Get("MOVEDFROMBIN","Restored"),{life:10000,header:Dox.Resource.Get("CONFIRMATION","Dox information")});Dox.ViewModel.HideWorker()};Dox.ViewModel.GetFileDetails=function(b,a){var c=function(d){b.replaceWith(d);$("#itemDetailTabs").tabs()};Dox.Model.GetFileDetails(a,c);Dox.ViewModel.HideWorker()};Dox.ViewModel.RefreshFileRow=function(b){var a=function(c){$("tr.file[data-fileid="+b+"]").replaceWith(c);Dox.ViewModel.FormatTags("#Files")};Dox.Model.GetFileRow(b,a);Dox.ViewModel.HideWorker()};Dox.ViewModel.DownloadFiles=function(b){var a={files:b};var c=function(d){window.location="/"+Dox.Vars.Language+"/dox/download/"+d};Dox.Model.SelectInNewSession(a,c);Dox.ViewModel.HideWorker()};Dox.ViewModel.PageIndexChange=function(c,b){var a=function(d){var e=function(f){Dox.ViewModel.RenderFiles(c)};Dox.Session.Set("pageIndexFile",b,Dox.Vars.SessionId,e)};Dox.Session.Set("nextpageFile",b,Dox.Vars.SessionId,a)};Dox.ViewModel.RenderSubfolders=function(b){if(b!=Dox.Vars.null_guid){$("#Folders").remove()}else{var a=function(c){$("#FolderContent").html(c);Dox.View.TreeviewDroppable()};Dox.Model.GetSubfolders(b,a)}Dox.ViewModel.HideWorker()};Dox.ViewModel.RenderBreadcrumb=function(b){if(b===undefined){b="none"}if(b===null){b="none"}if(b===""){b="none"}var a=function(c){$("#breadCrumb").html(c)};Dox.Model.GetBreadcrumb(b,a);Dox.ViewModel.HideWorker()};Dox.ViewModel.RenderBidBreadcrumb=function(b){var a=function(c){$("#breadCrumb").html(c)};Dox.Model.GetBidBreadcrumb(b,a);Dox.ViewModel.HideWorker()};Dox.ViewModel.FolderSet=function(d,e,c){var a={sessionId:c,folderId:e};var b=function(f){$(d).data("folderid",e);$(d).html(f);$.publish("folderchanged",[e,c])};Dox.Model.FolderSet(e,c,a,b)};Dox.ViewModel.FolderExpand=function(d,e,c){var a={sessionId:c,folderId:e};var b=function(f){$(d).html(f);$.publish("folderexpanded",[e,c])};Dox.Model.FolderExpand(e,c,a,b)};Dox.ViewModel.FolderCollapse=function(d,e,c){var a={sessionId:c,folderId:e};var b=function(f){$(d).html(f);$.publish("foldercollapsed",[e,c])};Dox.Model.FolderCollapse(e,c,a,b)};Dox.ViewModel.FolderCreate=function(b){var a=function(c){$("#itemPopupContent").html(c);$("#FormFolderCreate").Slidinglabels();$("button").button();$("#FormFolderCreate").ajaxForm(function(d){$("#treeContainer").html(d).data("folderid",b);$.jGrowl(Dox.Resource.Get("FRMFOLDERCREATED","Folder created"),{life:10000,header:Dox.Resource.Get("CONFIRMATION","Dox information")});Dox.ViewModel.HideWorker()})};Dox.Model.GetFolderCreate(b,a);Dox.ViewModel.HideWorker()};Dox.ViewModel.FolderUpdate=function(b){var a=function(c){$("#itemPopupContent").html(c);$("#FormFolderUpdate").Slidinglabels();$("button").button();$("#FormFolderUpdate").ajaxForm(function(d){$("#treeContainer").html(d);$("#itemPopup").dialog("close");$.jGrowl(Dox.Resource.Get("FRMFOLDERUPDATED","Folder updated"),{life:10000,header:Dox.Resource.Get("CONFIRMATION","Dox information")});Dox.ViewModel.HideWorker()})};Dox.Model.GetFolderUpdate(b,a);Dox.ViewModel.HideWorker()};Dox.ViewModel.FolderDelete=function(b){var a=function(c){$("#itemPopupContent").html(c);$("#FormFolderDelete").Slidinglabels();$("button").button();$("#FormFolderDelete").ajaxForm(function(d){$("#treeContainer").html(d);$("#itemPopup").dialog("close");$.jGrowl(Dox.Resource.Get("FRMFOLDERDELETED","Folder deleted"),{life:10000,header:Dox.Resource.Get("CONFIRMATION","Dox information")});Dox.ViewModel.HideWorker()})};Dox.Model.GetFolderDelete(b,a);Dox.ViewModel.HideWorker()};Dox.ViewModel.FolderCopyDialog=function(b){var a=function(c){$("body").append(c);var d=$("#askDialog").data("sessionid");$("#buttonCopy").click(function(){Dox.ViewModel.FolderCopy(b,d)});$("#buttonCancel").click(function(){$("#askDialog").dialog("close")});$("#askDialog").dialog({close:function(f,e){Dox.Session.Close(d);$("#askDialog").remove();Dox.ViewModel.HideWorker()},autoOpen:true,width:340,height:500})};Dox.Dialog.FolderCopy(a)};Dox.ViewModel.FolderCopy=function(d,a){var b=function(e){$("#treeContainer").html(e);$("#askDialog").dialog("close");$.jGrowl(Dox.Resource.Get("FILEISCOPIED","Copying is completed"),{life:10000,header:Dox.Resource.Get("CONFIRMATION","Dox information")});Dox.ViewModel.HideWorker()};var c={folderToId:"",folderFromId:d,sessionId:Dox.Vars.SessionId,newSessionId:a};Dox.Model.FolderCopyStructure(c,b);Dox.ViewModel.HideWorker()};Dox.ViewModel.InviteUsersByEmail=function(b,c){var a=function(d){$("#askDialog").dialog("close");$.jGrowl(Dox.Resource.Get("Email sent to "+d,"Folder(s) moved"),{life:10000,header:Dox.Resource.Get("CONFIRMATION","Dox information")});Dox.ViewModel.HideWorker()};Dox.Model.InviteUserByEmail(b,c,a)};Dox.ViewModel.FolderMoveDialog=function(b){var a=function(c){$("body").append(c);var d=$("#askDialog").data("sessionid");$("#buttonMove").click(function(){Dox.ViewModel.FolderMove(b,d)});$("#buttonCancel").click(function(){$("#askDialog").dialog("close")});$("#askDialog").dialog({close:function(f,e){Dox.Session.Close(d);$("#askDialog").remove();Dox.ViewModel.HideWorker()},autoOpen:true,width:340,height:500})};Dox.Dialog.FolderMove(a)};Dox.ViewModel.FolderMove=function(c,a){var b=function(d){$("#treeContainer").html(d);$("#askDialog").dialog("close");Dox.ViewModel.RenderFiles(c);$.jGrowl(Dox.Resource.Get("FRMFOLDERMOVED","Folder(s) moved"),{life:10000,header:Dox.Resource.Get("CONFIRMATION","Dox information")});Dox.ViewModel.HideWorker()};Dox.Model.FolderMove(c,a,b)};Dox.ViewModel.FileDeleteDialog=function(b){var a={files:b};var c=function(d){$("body").append(d);var e=$("#askDialog").data("sessionid");$("#buttonDelete").click(function(){Dox.ViewModel.DroppedFilesDelete(e)});$("#buttonCancel").click(function(){$("#askDialog").dialog("close")});$("#askDialog").dialog({close:function(g,f){Dox.Session.Close(e);Dox.ViewModel.RenderSelectedFiles();$("#askDialog").remove();Dox.ViewModel.HideWorker()},autoOpen:true,width:550,height:340})};Dox.Dialog.FileDelete(a,c)};Dox.ViewModel.FileDropDialog=function(d,c){var a={files:c,folderId:d};var b=function(e){$("body").append(e);var f=$("#askDialog").data("sessionid");$("#buttonCopy").click(function(){Dox.ViewModel.DroppedFilesCopy(d,f)});$("#buttonMove").click(function(){Dox.ViewModel.DroppedFilesMove(d,f);for(var g=0;g<c.length;g++){$("table.fileList tr.file[fileid="+c[g]+"]").remove()}});$("#buttonShortcut").click(function(){Dox.ViewModel.DroppedFilesShortcut(d,f)});$("#buttonCancel").click(function(){$("#askDialog").dialog("close")});$("#askDialog").dialog({close:function(h,g){Dox.Session.Close(f);$("#askDialog").remove();Dox.ViewModel.HideWorker()},autoOpen:true,width:550,height:340})};Dox.Dialog.FileDrop(a,b)};Dox.ViewModel.FolderDropDialog=function(b,d){var a={folderFromId:d,folderToId:b};var c=function(e){$("body").append(e);$("#buttonCopy").click(function(){Dox.ViewModel.DroppedFolderStructureCopy(b,d)});$("#buttonCancel").click(function(){$("#askDialog").dialog("close")});$("#askDialog").dialog({close:function(g,f){$("#askDialog").remove();Dox.ViewModel.HideWorker()},autoOpen:true,width:550,height:340})};Dox.Dialog.FolderDrop(a,c)};Dox.ViewModel.DroppedFolderStructureCopy=function(b,d){var c=function(e){$("#treeContainer").html(e);$("#askDialog").dialog("close");Dox.ViewModel.RenderFiles(b);$.jGrowl(Dox.Resource.Get("FRMFOLDERUPDATED","Folderstructure is copied"),{life:10000,header:Dox.Resource.Get("CONFIRMATION","Dox information")});Dox.ViewModel.HideWorker()};var a={folderToId:b,folderFromId:d,sessionId:Dox.Vars.SessionId};Dox.Model.FolderCopyStructure(a,c);Dox.ViewModel.HideWorker()};Dox.ViewModel.SelectFolderMoveDialog=function(){var a=function(b){$("body").append(b);var c=$("#askDialog").data("sessionid");$("#buttonMove").click(function(){var d=$("#dlgTreeContainer").data("folderid");if(d!==""&&d!==Dox.Vars.null_guid){Dox.ViewModel.SelectedFilesMove(d,Dox.Vars.SessionId);Dox.Session.Close(c);$("#askDialog").remove();Dox.ViewModel.HideWorker()}});$("#buttonCancel").click(function(){$("#askDialog").dialog("close")});$("#askDialog").dialog({close:function(e,d){Dox.Session.Close(c);$("#askDialog").remove();Dox.ViewModel.HideWorker()},autoOpen:true,width:400,height:417})};Dox.Dialog.SelectFolderMove(a)};Dox.ViewModel.SelectFolderCopyDialog=function(){var a=function(b){$("body").append(b);var c=$("#askDialog").data("sessionid");$("#buttonCopy").click(function(){var d=$("#dlgTreeContainer").data("folderid");if(d!==""&&d!==Dox.Vars.null_guid){Dox.ViewModel.SelectedFilesCopy(d,Dox.Vars.SessionId);Dox.Session.Close(c);$("#askDialog").remove();Dox.ViewModel.HideWorker()}});$("#buttonCancel").click(function(){$("#askDialog").dialog("close")});$("#askDialog").dialog({close:function(e,d){Dox.Session.Close(c);$("#askDialog").remove();Dox.ViewModel.HideWorker()},autoOpen:true,width:400,height:417})};Dox.Dialog.SelectFolderCopy(a)};Dox.ViewModel.SelectFolderShortcutDialog=function(){var a=function(b){$("body").append(b);var c=$("#askDialog").data("sessionid");$("#buttonShortcut").click(function(){var d=$("#dlgTreeContainer").data("folderid");if(d!==""&&d!==Dox.Vars.null_guid){Dox.ViewModel.SelectedFilesShortcut(d,Dox.Vars.SessionId);Dox.Session.Close(c);$("#askDialog").remove();Dox.ViewModel.HideWorker()}});$("#buttonCancel").click(function(){$("#askDialog").dialog("close")});$("#askDialog").dialog({close:function(e,d){Dox.Session.Close(c);$("#askDialog").remove();Dox.ViewModel.HideWorker()},autoOpen:true,width:400,height:417})};Dox.Dialog.SelectFolderShortcut(a)};Dox.ViewModel.FolderInfo=function(b){var a=function(c){if(c.indexOf("folderid")<0){$("#itemPopupContent").html("<span>Page "+b+" did not return a valid result </span>")}if(c.indexOf(b)>0){$("#itemPopupContent").html(c)}};Dox.Model.GetFolderInfo(b,a);Dox.ViewModel.HideWorker()};Dox.ViewModel.MyProjects=function(){var a=function(b){if(null!=b&&""!=b){$("div.uiprojecttext").html(b)}else{$.jGrowl("Project not in portal",{life:4000,header:Dox.Resource.Get("INFORMATION","Dox Information")});var c=$("#projectdetails").offset();$("div.projectpanel").css({position:"absolute",left:c.left-34+"px",top:c.top+20+"px"}).toggle()}};Dox.Model.GetMyProjects(Dox.Vars.UserId,a);Dox.ViewModel.HideWorker()};Dox.ViewModel.SetLastClickedButton=function(a){$.cookie("LASTCLICKEDBUTTON",a);$("#multiButton").click();Dox.ViewModel.HideWorker()};Dox.ViewModel.LastClickedButton=function(){var a=$.cookie("LASTCLICKEDBUTTON");if(a!=null){var b=$("#"+$.cookie("LASTCLICKEDBUTTON")).button("option","label");$("#multiButton").button("option","label",b);$("#multiButton").addClass(a)}else{$("#multiButton").addClass("download")}Dox.ViewModel.HideWorker()};Dox.ViewModel.FolderMultiButton=function(b){var a=function(c){$("#ui-dialog-title-itemPopup").html(c);$("button").button();$("#folderMultiButton").button().click(function(){var d=$(this).data("command");switch(d){case"CREATE":Dox.ViewModel.FolderCreate(b);break;case"UPDATE":Dox.ViewModel.FolderUpdate(b);break;case"DELETE":Dox.ViewModel.FolderDelete(b);break;case"MOVE":$("#itemPopup").dialog("close");Dox.ViewModel.FolderMoveDialog(b);break;case"COPYFOLDER":$("#itemPopup").dialog("close");Dox.ViewModel.FolderCopyDialog(b);break}}).next().button({text:false,icons:{primary:"ui-icon-triangle-1-s"}}).click(function(){if($("div.foldersubbuttons").is(":visible")){$("div.foldersubbuttons").hide()}else{$("div.foldersubbuttons").show()}}).parent().buttonset();$("div.foldersubbuttons > button[data-command]").button().click(function(){var d=$(this).button("option","label");$("#folderMultiButton").button("option","label",d);$("#folderMultiButton").data("command",$(this).data("command"));$("div.foldersubbuttons").hide();$("#folderMultiButton").click()})};Dox.Model.FolderMultiButton(a)};Dox.ViewModel.SelectFolder=function(c){var b=$("table tbody tr[data-folderid="+c+"]");if(b.length>0){b.colorFade()}else{var a=function(d){$("table.shortcuts tbody").append(d);Dox.ViewModel.HideWorker()};Dox.Model.FolderStyle(c,a)}};Dox.ViewModel.GetLinkedFiles=function(b){var a=function(c){$("#LinkedFiles ul").html(c);Dox.ViewModel.HideWorker()};Dox.Model.GetLinkedFiles(b,a);Dox.ViewModel.HideWorker()};Dox.ViewModel.LinkFile=function(b,c,d){var a={fileId:b,fileToLink:c,linkType:d};var e=function(f){Dox.ViewModel.GetLinkedFiles(b)};Dox.Model.LinkFile(b,a,e);Dox.ViewModel.HideWorker()};Dox.ViewModel.UnlinkFile=function(b,c){var a={fileId:b,fileToUnLink:c};var d=function(e){$("#RevisedFiles tbody tr[data-fileid="+c+"]").remove();Dox.ViewModel.GetLinkedFiles(b)};Dox.Model.UnlinkFile(b,a,d);Dox.ViewModel.HideWorker()};Dox.ViewModel.RenderTags=function(a){var b={filelist:a,sessionId:Dox.Vars.SessionId};var c=function(d){if(null!=d){$("ul.taglist").html(d)}$("#workingOuter").remove()};Dox.Model.TagList(b,c)};Dox.ViewModel.DeleteTag=function(d){var a=$("#filelist").val();var c={tagname:d,filelist:a,sessionId:Dox.Vars.SessionId};var b=function(e){if(null!=e){$("ul.taglist").html(e)}$("#workingOuter").remove()};Dox.Model.DeleteTag(c,b)};Dox.ViewModel.AttachTag=function(b,a){var c={files:b,TagName:a,sessionId:Dox.Vars.SessionId};var d=function(e){if(null!=e){for(var f=0;f<b.length;f++){if($("ul[data-fileid="+b[f]+"] a.detachtag:contains("+a+")").length<1){$("ul[data-fileid="+b[f]+"]").append('<li><a href="#" class="detachtag">'+a+"</a></li>")}}$("#workingOuter").remove()}};Dox.Model.AttachTag(c,d)};Dox.ViewModel.DetachTag=function(d,a){var c={fileid:d,tagname:a,sessionId:Dox.Vars.SessionId};var b=function(e){if(null!=e){$("ul[data-fileid="+d+"] li a.detachtag:contains("+a+")").parents("li").remove()}$("#workingOuter").remove()};Dox.Model.DetachTag(c,b)};Dox.ViewModel.AttachGroup=function(c,b,a){var d={files:c,groupid:b,groupname:a,sessionId:Dox.Vars.SessionId};var e=function(f){if(null!=f){for(var g=0;g<c.length;g++){if($("ul[data-fileid="+c[g]+"] a[id="+b+"]").length<1){$("ul[data-fileid="+c[g]+"]").append('<li><a id="'+b+'" href="#" class="detachgroup">'+a+"</a></li>")}}}$("#workingOuter").remove()};Dox.Model.AttachGroup(d,e)};Dox.ViewModel.FilterTag=function(a){var b=function(d){Dox.ViewModel.RenderFiles("none")};var c=function(d){var e=$(d).text();if(e==""){e=a}else{if(e.indexOf(",")<0){e=[e,a];e=e.join(",")}else{e=e.split(",");e.push(a);e=e.join(",")}}Dox.Session.Set("tags",e,Dox.Vars.SessionId,b)};Dox.Session.Get("tags",Dox.Vars.SessionId,c)};Dox.ViewModel.RemoveFilterTag=function(a){var b=function(d){Dox.ViewModel.RenderFiles("none")};var c=function(d){var e=$(d).text();if(e==""){e=""}else{if(e.indexOf(",")<0){e=""}else{e=removeItem(e.split(","),a);e=e.join(",")}}Dox.Session.Set("tags",e,Dox.Vars.SessionId,b)};Dox.Session.Get("tags",Dox.Vars.SessionId,c)};function removeItem(a,c){var b=0;while(b<a.length){if(a[b]==c){a.splice(b,1)}else{b++}}return a}Dox.ViewModel.FilterGroup=function(a){var b=function(d){Dox.ViewModel.RenderFiles("none")};var c=function(d){var e=$(d).text();if(e==""){e=a}else{if(e.indexOf(",")<0){e=[e,a];e=e.join(",")}else{e=e.split(",");e.push(a);e=e.join(",")}}Dox.Session.Set("filegroups",e,Dox.Vars.SessionId,b)};Dox.Session.Get("filegroups",Dox.Vars.SessionId,c)};Dox.ViewModel.RemoveFilterGroup=function(a){var b=function(d){Dox.ViewModel.RenderFiles("none")};var c=function(d){var e=$(d).text();if(e==""){e=""}else{if(e.indexOf(",")<0){e=""}else{e=removeItem(e.split(","),a);e=e.join(",")}}Dox.Session.Set("filegroups",e,Dox.Vars.SessionId,b)};Dox.Session.Get("filegroups",Dox.Vars.SessionId,c)};Dox.ViewModel.FormatTags=function(a){$(a+" [data-groupnames]").each(function(h){var d=$(this).data("fileid");var f=$(this).data("groupnames").split(",");var c=$(this).data("groupids").split(",");var b=$(this).data("tags").split(",");var e='<ul data-fileid="'+d+'">';for(var i=0;i<f.length;i++){if(""!=f[i]){e+='<li><a id="'+c[i]+'" href="#" class="detachgroup">'+f[i]+"</a></li>"}}for(var j=0;j<b.length;j++){if(""!=b[j]){e+='<li><a href="#" class="detachtag">'+b[j]+"</a></li>"}}e+="</ul>";e+=$(".description",$(this)).text();if($(".description ul[data-fileid]",$(this)).length==0){$(".description",$(this)).html(e)}})};Dox.ViewModel.DetachGroup=function(e,c,a){var d={fileid:e,groupid:c,groupname:a,sessionId:Dox.Vars.SessionId};var b=function(f){if(null!=f){$("ul[data-fileid="+e+"] li a.detachgroup:contains("+a+")").parents("li").remove()}$("#workingOuter").remove()};Dox.Model.DetachGroup(d,b)};Dox.ViewModel.RenderTooltips=function(){$("#Files th.itemDetails-ico a").colorTip({color:Dox.Vars.Skin,content:Dox.Resource.Get("FILEPROP","Properties")});$("#Files th.iteminfo a").colorTip({color:Dox.Vars.Skin,content:Dox.Resource.Get("SHOWFILEINFO","Show fileinfo")});$("#Files td.revised a").colorTip({color:Dox.Vars.Skin,content:Dox.Resource.Get("TABFILEHISTORY","History")});$("#Files td.shortcut a").colorTip({color:Dox.Vars.Skin,content:Dox.Resource.Get("SHORTCUT","Shortcut")});$("#Files th.tableHeader a.folder-checkTrue").colorTip({color:Dox.Vars.Skin,content:Dox.Resource.Get("SELECTFILES","Select all files")})};Dox.ViewModel.RenderBidTooltips=function(){$("#Files th.iteminfo a").colorTip({color:Dox.Vars.Skin,content:Dox.Resource.Get("SHOWFILEINFO","Show fileinfo")});$("#Files th.download a").colorTip({color:Dox.Vars.Skin,content:Dox.Resource.Get("SINGLEDOWNLOAD","Download")});$("#Files td.revised a").colorTip({color:Dox.Vars.Skin,content:Dox.Resource.Get("TABFILEHISTORY","History")});$("#Files th.tableHeader a.folder-checkTrue").colorTip({color:Dox.Vars.Skin,content:Dox.Resource.Get("SELECTFILES","Select all files")})};Dox.ViewModel.MailSave=function(b,c){var a=function(){Dox.ViewModel.HideWorker()};if(c==null){c=""}Dox.Session.SaveTemp(b,c,a)};Dox.ViewModel.MailGet=function(a){var b=function(c){c=c.replace("br","");c=c.replace("&lt;","");c=c.replace("/&gt;","");$("#"+a).val(c);Dox.ViewModel.HideWorker()};Dox.Session.GetMailTemp(a,b)};Dox.ViewModel.FilePage=function(){var a=function(b){$("tbody.page:last").hide("slow",function(){$(this).replaceWith(b)}).fadeIn("slow");Dox.ViewModel.HideWorker()};Dox.Model.FilePage(a)};Dox.ViewModel.FileListSort=function(d,e,b){var c={sortname:e,sortdirection:b,sessionId:Dox.Vars.SessionId};var a=function(f){Dox.ViewModel.RenderFiles("none")};Dox.Model.FileListSort(c,a)};Dox.ViewModel.GetSelectOptions=function(b,c){var a=function(d){$("#fileselectpanel").html(d);Dox.ViewModel.HideWorker()};Dox.Model.GetSelectOptions(b,a)};Dox.ViewModel.GetTags=function(a){var b={filelist:a,sessionId:Dox.Vars.SessionId};var c=function(d){$("#tagpanel ul.taglist").html(d);$("#tagpanel form #filelist").val(a);$("#workingOuter").remove()};Dox.Model.TagList(b,c)};Dox.ViewModel.ApplyTags=function(d,c,f,g,e){var a={filelist:d,attachgroups:c,attachtags:f,detachgroups:g,detachtags:e,sessionId:Dox.Vars.SessionId};var b=function(h){Dox.ViewModel.RenderFiles()};Dox.Model.ApplyTags(a,b)};Dox.ViewModel.LinkFiles=function(b,a){$("table.selectedfileList tr[data-fileid]").each(function(){var c=$(this).data("fileid");$.each(b,function(d,e){Dox.ViewModel.LinkFile(c,e,a)})});$("#LinkDialog").dialog("close")};Dox.ViewModel.LinkFilesDialog=function(b){var a={files:b};var c=function(d){$("body").append(d);var e=$("#LinkDialog").data("sessionid");$("#buttonLink").click(function(){Dox.ViewModel.LinkFiles(b,$("#LinkType").val())});$("#buttonCancel").click(function(){$("#LinkDialog").dialog("close")});$("#LinkDialog").dialog({close:function(g,f){Dox.Session.Close(e);$("#LinkDialog").remove();Dox.ViewModel.HideWorker()},autoOpen:true,width:340,height:500})};Dox.Dialog.LinkFiles(a,c)};Dox.ViewModel.AddToCart=function(e,a,c,b){var f={articleid:e,description:a,price:c,quantity:b};var d=function(g){$("div.cart").html(g);$(".cartlist button").button()};Dox.Model.AddToCart(f,d)};Dox.ViewModel.RemoveFromCart=function(c){var a={articleid:c};var b=function(d){$("div.cart").html(d);$(".cartlist button").button()};Dox.Model.RemoveFromCart(a,b)};Dox.ViewModel.SendPortalUserPassword=function(b){var a=function(c){$.jGrowl(c,{life:10000,header:Dox.Resource.Get("INFORMATION","Dox information")});Dox.ViewModel.HideWorker()};Dox.Model.SendPortalUserPassword(b,a);Dox.ViewModel.HideWorker()};Dox.ViewModel.RenderCategory=function(b){var a=function(c){if(null!=c){$("div.itemscontent").html(c)}};Dox.Model.GetCategory(b,a);Dox.ViewModel.HideWorker()};jQuery(document).ready(function(){Dox.ViewModel.GetGrowlMessage("msg");$("#open").click(function(){$("div#panel").slideDown("slow")});$("#close").click(function(){$("div#panel").slideUp("slow")});$("#toggle a").click(function(){$("#toggle a").toggle()});$("#treeContent").tabs();$("#selectedItemsContent").tabs();$("#itemsContent").tabs({cache:false,spinner:""});$("#itemDetails").tabs({cache:false,spinner:""});$(".editor").doxEditor();$("body").subscribe("folderchanged",function(e,d){Dox.View.FolderChanged(e,d)});$("body").subscribe("folderexpanded",function(e,d){Dox.View.FolderExpanded(e,d)});$("body").subscribe("foldercollapsed",function(e,d){Dox.View.FolderCollapsed(e,d)});$("div.treeview a.title").live("click",function(d){d.preventDefault();var f=$(this).parent().data("folderid");Dox.ViewModel.SelectFolder(f)});$("div.treeview a.tree-expand").live("click",function(i){i.preventDefault();var h=$(this).parent().data("folderid");var g=$(this).parents("div");var d="#"+g.attr("id");var f=g.data("sessionid");Dox.ViewModel.FolderExpand(d,h,f)});$("div.treeview a.tree-collapse").live("click",function(i){i.preventDefault();var h=$(this).parent().data("folderid");var g=$(this).parents("div");var d="#"+g.attr("id");var f=g.data("sessionid");Dox.ViewModel.FolderCollapse(d,h,f)});Dox.View.FolderChanged=function(e,d){Dox.ViewModel.HideWorker()};Dox.View.FolderExpanded=function(e,d){Dox.ViewModel.HideWorker()};Dox.View.FolderCollapsed=function(e,d){Dox.ViewModel.HideWorker()};$("div.treeview a.folderinfo").live("click",function(){var e=$(this).parents("li").data("folderid");var d=$(this).parents("div").attr("id");b(d,e,$(this))});function b(d,g,f){if(g==""){return}var h=Dox.ViewModel.FolderMultiButton(g);var e=f.offset();e.left=e.left+60;$("#itemPopup").dialog("option","title",h);$("#itemPopup").dialog("option","position",e);$("#itemPopupContent").html('<img src="/content/img/loading.gif" />');$("#itemPopup").dialog("open");Dox.ViewModel.FolderInfo(g)}$(".signin").live("click",function(f){f.preventDefault();var d=$(this).offset();if($(this).hasClass("menu-open")){$(this).removeClass("menu-open");$("div.offscreen").css({display:"none"})}else{$(this).addClass("menu-open");$("div.offscreen").css({display:"block"})}});$("#screen-name").live("click",function(f){f.preventDefault();var d=$(this).offset();if($(this).hasClass("menu-open")){$(this).removeClass("menu-open");$("ul.profile-dropdown").css({display:"none"})}else{$(this).addClass("menu-open");$("ul.profile-dropdown").css({display:"block"})}});$("button").button();$("#selectedFolders a.remove").live("click",function(){$(this).remove()});$("table.shortcuts a.remove").live("click",function(){$(this).parents("tr").remove()});$("table.selectedFiles a").live("click",function(){clip.setText("test")});$("#LinkedFiles li a.linked").live("click",function(){var e=$("#LinkedFiles").data("fileid");var d=$(this).parent().attr("id");Dox.ViewModel.UnlinkFile(e,d)});$("ul.asset li a.preview").live("click",function(){var e=$("#LinkedFiles").data("fileid");var d=$(this).parents("li").attr("id");Dox.ViewModel.LinkFile(e,d,"preview")});$("ul.asset li a.asset").live("click",function(){var e=$("#LinkedFiles").data("fileid");var d=$(this).parents("li").attr("id");Dox.ViewModel.LinkFile(e,d,"asset")});$("ul.asset li a.content").live("click",function(){var e=$("#LinkedFiles").data("fileid");var d=$(this).parents("li").attr("id");Dox.ViewModel.LinkFile(e,d,"content")});var a=$("#myprojects").data("portaluserid");if(!a){$("#myprojects a.myprojects").live("click",function(d){d.preventDefault();$.jGrowl(Dox.Resource.Get("LOGINREQUIRED","Login required"),{life:5000,header:Dox.Resource.Get("INFORMATION","Dox information")})})}$("#myprojectForm a.myprojects").live("click",function(g){g.preventDefault();var f=$(this).parents("li").attr("action");var d=$(this).parents("form:first");d.attr("action",f);$(d).submit();$("#itemPopup").dialog("close");Dox.ViewModel.HideWorker()});$("#mylogoutForm a.logout").live("click",function(d){d.preventDefault();var f=$(this).parents("form:first");$(f).submit()});var c=function(d){$("ul.fancybox a").fancybox({titlePosition:"over",transitionIn:"elastic",transitionOut:"elastic",easingIn:"easeOutBack",easingOut:"easeInBack"})};if($(".itemFancyBox").length>0){if(!$.fancybox){$("head").append('<link rel="stylesheet" type="text/css" href="http://cdn.concode.se/scripts/fancybox/jquery.fancybox-1.3.1.css" />');$.doxScript("http://cdn.concode.se/scripts/fancybox/jquery.fancybox-1.3.1.pack.js","",c);$.doxScript("http://cdn.concode.se/scripts/fancybox/jquery.easing-1.3.pack.js");$.doxScript("http://cdn.concode.se/scripts/fancybox/jquery.mousewheel-3.0.2.pack.js")}else{c()}}if(typeof(SyntaxHighlighter)!="undefined"){SyntaxHighlighter.all()}$("#signin_menu a.password").live("click",function(d){d.preventDefault();var f=$("#Loginname").val();if(f.length>4){Dox.ViewModel.SendPortalUserPassword(f)}else{$.jGrowl(Dox.Resource.Get("EMAILMISSING","Email is empty"),{life:10000,header:Dox.Resource.Get("INFORMATION","Dox information")})}});$("#UserCreateForm a.submitUser").live("click",function(h){h.preventDefault();var g=$(this).parents("form").attr("action");var f=$(this).parents("form:first");var d=$("#DatabaseUrl").val();f.attr("action",d+g);$(f).submit();Dox.ViewModel.HideWorker()})});
