function update_counter(a,b){b||(b=0);var c=parseInt(joms.jQuery(a).html(),10);b=parseInt(b,10),1>=c?joms.jQuery(a).css("display","none"):joms.jQuery(a).html(c+b)}function get_cookies_array(){var a={};if(document.cookie&&""!=document.cookie)for(var b=document.cookie.split(";"),c=0;cc;c+=1)g[c]=str(c,i)||"null";return e=0===g.length?"[]":gap?"[\n"+gap+g.join(",\n"+gap)+"\n"+h+"]":"["+g.join(",")+"]",gap=h,e}if(rep&&"object"==typeof rep)for(f=rep.length,c=0;f>c;c+=1)"string"==typeof rep[c]&&(d=rep[c],e=str(d,i),e&&g.push(quote(d)+(gap?": ":":")+e));else for(d in i)Object.prototype.hasOwnProperty.call(i,d)&&(e=str(d,i),e&&g.push(quote(d)+(gap?": ":":")+e));return e=0===g.length?"{}":gap?"{\n"+gap+g.join(",\n"+gap)+"\n"+h+"}":"{"+g.join(",")+"}",gap=h,e}}function quote(a){return escapable.lastIndex=0,escapable.test(a)?'"'+a.replace(escapable,function(a){var b=meta[a];return"string"==typeof b?b:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+a+'"'}function f(a){return 10>a?"0"+a:a}"function"!=typeof Date.prototype.toJSON&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){return this.valueOf()});var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;"function"!=typeof JSON.stringify&&(JSON.stringify=function(a,b,c){var d;if(gap="",indent="","number"==typeof c)for(d=0;c>d;d+=1)indent+=" ";else"string"==typeof c&&(indent=c);if(rep=b,b&&"function"!=typeof b&&("object"!=typeof b||"number"!=typeof b.length))throw new Error("JSON.stringify");return str("",{"":a})}),"function"!=typeof JSON.parse&&(JSON.parse=function(text,reviver){function walk(a,b){var c,d,e=a[b];if(e&&"object"==typeof e)for(c in e)Object.prototype.hasOwnProperty.call(e,c)&&(d=walk(e,c),void 0!==d?e[c]=d:delete e[c]);return reviver.call(a,b,e)}var j;if(text=String(text),cx.lastIndex=0,cx.test(text)&&(text=text.replace(cx,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})),/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return j=eval("("+text+")"),"function"==typeof reviver?walk({"":j},""):j;throw new SyntaxError("JSON.parse")})}(),"undefined"==typeof joms&&(joms={jQuery:window.jQuery,extend:function(a){this.jQuery.extend(this,a)}});var joms_message_sending=!1;joms.extend({plugins:{extend:function(a){joms.jQuery.extend(joms.plugins,a)},initialize:function(){joms.jQuery.each(joms.plugins,function(a,b){try{b.initialize()}catch(c){}})}},sharebox:{showFileUpload:function(a,b){var c='jax.call("community", "files,ajaxFileUploadForm","'+a+'",'+b+")";cWindowShow(c,"",600,400)},uploadVideo:function(a,b){var c="jax.call('community', 'videos,ajaxUploadVideo', '"+a+"', '"+b+"');";cWindowShow(c,"",450,500)}},activities:{infiniteScrollLoaded:0,infinitesScrollenable:1,init:function(){joms.jQuery("#activity-stream-container").on("click",".dropdown-menu [data-action=delete]",function(a){a.preventDefault();var b=joms.jQuery(a.target).closest("[data-streamid]");joms.activities.remove("",b.data("streamid"))}),joms.activities.initMap(),joms.activities.loadNewStream(),joms.activities.infinitesScrollenable&&!joms.activities.infiniteScrollLoaded&&joms.activities.infiniteScroll()},showMap:function(a,b){if(0==joms.jQuery("li[data-streamid="+a+"]").find(".cMapHeatzone").length){var c=joms.jQuery("li[data-streamid="+a+"]").find(".cStream-Actions").width(),d='
';d+='
',d+='
',d+='',d+='',d+='',d+="
",joms.jQuery("#newsfeed-map-"+a+" .newsfeed-mapFade").append(d),joms.jQuery("li[data-streamid="+a+"]").find(".cStream-Actions").prepend(d);var e=c/2-15;joms.jQuery("li[data-streamid="+a+"]").find(".cMapHeatzone").css({top:"40px",left:e+"px"}),joms.maps.init()}if(joms.jQuery("#video-"+a).length){var c=joms.jQuery("#video-"+a).find(".video-map-location").width(),d='';0==joms.jQuery(".video-map").height()?(joms.jQuery("#video-"+a).find(".video-map-location").html(d),joms.jQuery("#video-"+a).find(".video-map").css({height:"auto"})):(joms.jQuery("#video-"+a).find(".video-map-location").html(""),joms.jQuery("#video-"+a).find(".video-map").css({height:"auto"}))}},getContent:function(a){jax.call("community","activities,ajaxGetContent",a)},setContent:function(a,b){joms.jQuery("#profile-newsfeed-item-content-"+a).html(b).removeClass("small profile-newsfeed-item-action").addClass("newsfeed-content-hidden").slideDown()},showVideo:function(a){joms.jQuery("#profile-newsfeed-item-content-"+a+" .video-object").slideDown(),joms.jQuery("#profile-newsfeed-item-content-"+a+" .video-object embed").css("width",joms.jQuery("#profile-newsfeed-item-content-"+a).width())},selectCustom:function(a){"predefined"==a?(joms.jQuery("#custom-text").css("display","none"),joms.jQuery("#custom-predefined").css("display","block")):(joms.jQuery("#custom-text").css("display","block"),joms.jQuery("#custom-predefined").css("display","none"))},addCustom:function(){if("predefined"==joms.jQuery("input[name=custom-message]:checked").val()){var a=joms.jQuery("#custom-predefined").val(),b=joms.jQuery("#custom-predefined :selected").html();"default"!=a&&jax.call("community","activities,ajaxAddPredefined",a,b)}else customText=joms.jQuery.trim(joms.jQuery("#custom-text").val()),0!=customText.length&&jax.call("community","activities,ajaxAddPredefined","system.message",customText)},append:function(a){joms.jQuery(a).find("ul.cStreamList li");joms.jQuery("#activity-more,#activity-exclusions").remove(),joms.jQuery("#activity-stream-container ul.cStreamList").append(a),joms.jQuery("body").focus()},initMap:function(){(null!=joms.jQuery(".newsfeed-mapFade")||null!=joms.jQuery(".newsfeed-map-heatzone"))&&joms.jQuery(".newsfeed-mapFade").length&&(joms.jQuery(".newsfeed-mapFade").live("mouseover",function(){joms.jQuery(this).find("img:eq(2)").fadeOut(0)}),joms.jQuery(".newsfeed-mapFade").live("mouseout",function(){joms.jQuery(this).find("img:eq(2)").fadeIn(0)}),joms.jQuery(".newsfeed-map-heatzone").live("mouseover",function(){joms.jQuery(this).parent().find("img:eq(1)").fadeOut()}),joms.jQuery(".newsfeed-map-heatzone").live("mouseout",function(){joms.jQuery(this).parent().find("img:eq(1)").fadeIn(0)}))},more:function(){var a=joms.jQuery(".cMain > #activity-stream-container ul.list-unstyled");a.length<=0&&(a=joms.jQuery("#activity-stream-container ul.list-unstyled"));var b="";a.find("li[data-streamid]").length>0&&(b=a.find("li[data-streamid]").last().data("streamid"));var c="",d="";joms.jQuery("#apptype").length>0&&(c=joms.jQuery("#apptype").val()),joms.jQuery("#appid").length>0&&(d=joms.jQuery("#appid").val());var e=a.data("filter"),f=a.data("filterid");joms.jQuery("#activity-more .btn").hide(),joms.jQuery("#activity-more .loading").show(),jax.call("community","activities,ajaxGetOlderActivities",b,e,f,a.data("filter-value"))},prependOldStream:function(a){container=joms.jQuery(".cMain > #activity-stream-container"),container.length<=0&&(container=joms.jQuery("#activity-stream-container")),joms.jQuery(a).children("li").appendTo(".cMain #activity-stream-container > ul.list-unstyled"),container.find("#activity-more .loading").hide(),joms.activities.infiniteScrollLoaded?setTimeout(function(){joms.activities.infiniteScrollDelay=0},1e3):joms.jQuery("#activity-more .btn").show()},loadNewStream:function(){if(joms.jQuery(".joms-latest-activities-container").data("actid")>-1)return void joms.jQuery(".joms-latest-activities-container").css("display","none");var a=joms.jQuery("#activity-stream-container ul");jax.loadingFunction=function(){};var b=new Array,c=0;joms.jQuery("#activity-stream-container > ul li").each(function(){joms.jQuery(this).data("streamid")&&(b[c]=joms.jQuery(this).data("streamid"),c++)}),b.sort(function(a,b){return b-a}),jax.call("community","activities,ajaxGetRecentActivitiesCount",b[0],a.data("filter"),a.data("filterid"),a.data("filter-value"))},announceNewStream:function(a,b,c){return joms.jQuery(".joms-latest-activities-container").data("actid")>-1?void joms.jQuery(".joms-latest-activities-container").css("display","none"):(a>0?joms.jQuery(".joms-latest-activities-container").html('
'+c+"
").show():joms.jQuery(".joms-latest-activities-container").hide(),void(0!=b&&setTimeout("joms.activities.loadNewStream()",b)))},appendNewStream:function(a){joms.jQuery(".joms-latest-activities-container").hide().empty(),joms.jQuery(a).children("li").prependTo(".cMain #activity-stream-container > ul.list-unstyled")},showNewStream:function(){var a=joms.jQuery("#activity-stream-container ul.list-unstyled");return jax.call("community","activities,ajaxGetRecentActivities",a.find("li[data-streamid]").first().data("streamid"),a.data("filter"),a.data("filterid"),a.data("filter-value")),!1},remove:function(a,b){var c="jax.call('community', 'activities,ajaxConfirmDeleteActivity', '"+a+"', '"+b+"');";cWindowShow(c,"",450,100)},editLocation:function(a){var b="jax.call('community', 'activities,ajaxeditLocation', '"+a+"');";cWindowShow(b,"",450,100)},saveLocation:function(a){var b=joms.jQuery("#cWindow").find("#editlocation"),c=b.find("#editlocation-selector input"),d=b.find("#editlocation-map"),e=c.val(),f=d.data("lat"),g=d.data("lng");e&&f&&g&&jax.call("community","activities,ajaxSaveLocation",a,e,f,g)},removeLocation:function(a){var b="jax.call('community', 'activities,ajaxRemoveLocation', '"+a+"');";cWindowShow(b,"",450,100)},infiniteScroll:function(){if(!joms.activities.infiniteScrollLoaded){var a=navigator.userAgent.toLowerCase(),b=!!a.match(/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i);if(!b){var c=joms.jQuery(window),d=joms.jQuery(document);joms.jQuery("#activity-more .btn").show(),c.on("scroll",function(){if(c.scrollTop()==d.height()-c.height()){if(joms.activities.infiniteScrollDelay)return;joms.activities.infiniteScrollDelay=1,joms.activities.more(),setTimeout(function(){joms.activities.infiniteScrollDelay=0},1e4)}}),joms.activities.infiniteScrollLoaded=1}}}},apps:{windowTitle:"",toggle:function(a){joms.jQuery(a).children(".app-box-actions").slideToggle("fast"),joms.jQuery(a).children(".app-box-footer").slideToggle("fast"),joms.jQuery(a).children(".app-box-content").slideToggle("fast",function(){joms.jQuery.cookie(a,joms.jQuery(this).css("display"))})},showAboutWindow:function(a){var b="jax.call('community', 'apps,ajaxShowAbout', '"+a+"');";cWindowShow(b,"",450,100)},showPrivacyWindow:function(a){var b="jax.call('community', 'apps,ajaxShowPrivacy', '"+a+"');";cWindowShow(b,"",450,100)},showSettingsWindow:function(a,b){var c="jax.call('community', 'apps,ajaxShowSettings', '"+a+"', '"+b+"');";cWindowShow(c,"",450,100)},savePrivacy:function(){var a=joms.jQuery("input[name=privacy]:checked").val(),b=joms.jQuery("input[name=appname]").val();jax.call("community","apps,ajaxSavePrivacy",b,a)},saveSettings:function(){jax.call("community","apps,ajaxSaveSettings",jax.getFormValues("appSetting"))},remove:function(a){var b="jax.call('community', 'apps,ajaxRemove', '"+a+"');";cWindowShow(b,this.windowTitle,450,100)},add:function(a){jax.call("community","apps,ajaxAdd",a)},initToggle:function(){joms.jQuery(".app-box").each(function(){var a="#"+joms.jQuery(this).attr("id");"none"==joms.jQuery.cookie(a)&&(joms.jQuery(a).addClass("collapse"),joms.jQuery(a).children(".app-box-actions").css("display","none"),joms.jQuery(a).children(".app-box-footer").css("display","none"),joms.jQuery(a).children(".app-box-content").css("display","none"))})}},bookmarks:{show:function(a){var b="jax.call('community', 'bookmarks,ajaxShowBookmarks','"+a+"');";cWindowShow(b,"",450,100)},email:function(a){var b=jax.getFormValues("bookmarks-email"),c=b[1][1],d=b[0][1],e="jax.call('community', 'bookmarks,ajaxEmailPage','"+a+"','"+d+"',\""+c+'");';cWindowShow(e,"",450,100)}},report:{emptyMessage:"",checkReport:function(){return""==joms.jQuery("#report-message").val()?(joms.jQuery("#report-message-error").html(this.emptyMessage).css("color","red"),!1):!0},showWindow:function(a,b){var c='jax.call("community" , "system,ajaxReport" , "'+a+'","'+location.href+'" ,'+b+");";cWindowShow(c,"",450,100)},submit:function(a,b,c){if(joms.report.checkReport()){var d=jax.getFormValues("report-form"),e='jax.call("community", "system,ajaxSendReport","'+a+'","'+location.href+'","'+d[1][1]+'" , '+c+")";cWindowShow(e,"",450,100)}}},featured:{add:function(a,b){var c="jax.call('community', '"+b+",ajaxAddFeatured', '"+a+"');";cWindowShow(c,"",450,100)},remove:function(a,b){var c="jax.call('community','"+b+",ajaxRemoveFeatured','"+a+"');";cWindowShow(c,"",450,100)}},flash:{enabled:function(){try{try{var a=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");try{a.AllowScriptAccess="always"}catch(b){return"6,0,0"}}catch(b){}return new ActiveXObject("ShockwaveFlash.ShockwaveFlash").GetVariable("$version").replace(/\D+/g,",").match(/^,?(.+),?$/)[1]}catch(b){try{if(navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin)return(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]).description.replace(/\D+/g,",").match(/^,?(.+),?$/)[1]}catch(b){}}return!1}},invitation:{showForm:function(a,b,c,d,e){var f='jax.call("community", "system,ajaxShowInvitationForm","'+a+'","'+b+'","'+c+'","'+d+'","'+e+'")',g=520;g="0"!=d?g:g-108,g="0"!=e?g:g-108,cWindowShow(f,"",550,g)},send:function(a,b){var c=joms.jQuery("#community-invitation-form"),d=c.serializeArray(),e=[],f=[];if(d&&d.length)for(var g,h=0;h0&&joms.jQuery("#inbox-selected-to #"+element).is("li")&&joms.jQuery(this).remove()})},showResult:function(){joms.jQuery("#cInvitationTabContainer div").removeClass("active"),joms.jQuery("#cInvitationTabContainer #community-invitation").addClass("active")},showSelected:function(){joms.jQuery("#cInvitationTabContainer div").removeClass("active"),joms.jQuery("#cInvitationTabContainer #community-invited").addClass("active")},selectNone:function(a){joms.jQuery(a).find("li").each(function(){joms.jQuery(this).remove()})},selectAll:function(a){joms.jQuery(a).find("li").each(function(){joms.jQuery(this).find("input").attr("checked","checked"),joms.jQuery(this).find("input").attr("checked")&&joms.invitation.selectMember("#"+joms.jQuery(this).attr("id"))})}},memberlist:{submit:function(){return""==joms.jQuery("input#title").val()?(joms.jQuery("#filter-title-error").show(),!1):""==joms.jQuery("textarea#description").val()?(joms.jQuery("#filter-description-error").show(),!1):void joms.jQuery("#jsform-memberlist-addlist").submit()},showSaveForm:function(a,b){for(var a=a.split(","),c=Array(),d=1!=joms.jQuery("#avatar:checked").val()?0:1,e=0;e0&&(a-=1,joms.jQuery("#toolbar-item-notify-count").html(a),0==a&&(joms.jQuery("#toolbar-item-notify").hide(),setTimeout("cWindowHide()",1e3)))},showRequest:function(){var a='jax.call("community", "notification,ajaxGetRequest", "")';cMiniWindowShow(a,"",450,100)},showInbox:function(){var a='jax.call("community", "notification,ajaxGetInbox", "")';cMiniWindowShow(a,"",450,100)},showUploadPhoto:function(a,b){var c='jax.call("community", "photos,ajaxUploadPhoto","'+a+'","'+b+'")';cWindowShow(c,"",600,400)}},filters:{bind:function(){var a=this.loading;joms.jQuery(document).ready(function(){joms.jQuery(".newest-member").bind("click",function(){joms.jQuery(this).hasClass("active-state")||(a(joms.jQuery(this).attr("class")),jax.call("community","frontpage,ajaxGetNewestMember",frontpageUsers))}),joms.jQuery(".active-member").bind("click",function(){joms.jQuery(this).hasClass("active-state")||(a(joms.jQuery(this).attr("class")),jax.call("community","frontpage,ajaxGetActiveMember",frontpageUsers))}),joms.jQuery(".popular-member").bind("click",function(){joms.jQuery(this).hasClass("active-state")||(a(joms.jQuery(this).attr("class")),jax.call("community","frontpage,ajaxGetPopularMember",frontpageUsers))}),joms.jQuery(".featured-member").bind("click",function(){joms.jQuery(this).hasClass("active-state")||(a(joms.jQuery(this).attr("class")),jax.call("community","frontpage,ajaxGetFeaturedMember",frontpageUsers))}),joms.jQuery(".all-activity").bind("click",function(){a(joms.jQuery(this).attr("class")),joms.ajax.call("frontpage,ajaxGetActivities",["all"],{success:function(){}}),joms.jQuery(".all-activity").parents("li.filter").addClass("active").siblings().removeClass("active")}),joms.jQuery(".me-and-friends-activity").bind("click",function(){a(joms.jQuery(this).attr("class")),joms.ajax.call("frontpage,ajaxGetActivities",["me-and-friends"],{success:function(){}}),joms.jQuery(".me-and-friends-activity").parents("li.filter").addClass("active").siblings().removeClass("active")}),joms.jQuery(".active-profile-and-friends-activity").bind("click",function(){joms.jQuery(this).hasClass("active-state")||(a(joms.jQuery(this).attr("class")),jax.call("community","frontpage,ajaxGetActivities","active-profile-and-friends",joms.user.getActive()))}),joms.jQuery(".active-profile-activity").bind("click",function(){joms.jQuery(this).hasClass("active-state")||(a(joms.jQuery(this).attr("class")),jax.call("community","frontpage,ajaxGetActivities","active-profile",joms.user.getActive()))}),joms.jQuery(".p-active-profile-and-friends-activity").bind("click",function(){joms.jQuery(this).hasClass("active-state")||(a(joms.jQuery(this).attr("class")),jax.call("community","frontpage,ajaxGetActivities","active-profile-and-friends",joms.user.getActive(),"profile"))}),joms.jQuery(".p-active-profile-activity").bind("click",function(){joms.jQuery(this).hasClass("active-state")||(a(joms.jQuery(this).attr("class")),jax.call("community","frontpage,ajaxGetActivities","active-profile",joms.user.getActive(),"profile"))}),joms.jQuery(".newest-videos").bind("click",function(){joms.jQuery(this).hasClass("active-state")||(a(joms.jQuery(this).attr("class")),jax.call("community","frontpage,ajaxGetNewestVideos",frontpageVideos))}),joms.jQuery(".popular-videos").bind("click",function(){joms.jQuery(this).hasClass("active-state")||(a(joms.jQuery(this).attr("class")),jax.call("community","frontpage,ajaxGetPopularVideos",frontpageVideos))}),joms.jQuery(".featured-videos").bind("click",function(){joms.jQuery(this).hasClass("active-state")||(a(joms.jQuery(this).attr("class")),jax.call("community","frontpage,ajaxGetFeaturedVideos",frontpageVideos))}),joms.jQuery(".popular-member").css("border-right","0").css("padding-right","0")})},loading:function(a){elParent=joms.jQuery("."+a).parent().parent().attr("id"),"undefined"==typeof elParent&&(elParent=joms.jQuery("."+a).parent().attr("id")),joms.jQuery("#"+elParent+" .loading").show(),joms.jQuery("#"+elParent+" a").removeClass("active-state"),joms.jQuery("."+a).addClass("active-state")},hideLoading:function(){joms.jQuery(".loading").hide(),joms.jQuery(".jomTipsJax").addClass("jomTips"),joms.tooltip.setup()}},groups:{invitation:{accept:function(a){jax.call("community","groups,ajaxAcceptInvitation",a)},reject:function(a){jax.call("community","groups,ajaxRejectInvitation",a)}},addInvite:function(a){var b=joms.jQuery("#"+a).parent().attr("id");"friends-list"==b?joms.jQuery("#friends-invited").append(joms.jQuery("#"+a)).html():joms.jQuery("#friends-list").append(joms.jQuery("#"+a)).html()},removeTopic:function(a,b,c){var d='jax.call("community","groups,ajaxShowRemoveDiscussion", "'+b+'","'+c+'");';cWindowShow(d,a,450,100)},lockTopic:function(a,b,c){var d='jax.call("community","groups,ajaxShowLockDiscussion", "'+b+'","'+c+'");';cWindowShow(d,a,450,100)},editBulletin:function(){"none"==joms.jQuery("#bulletin-edit-data").css("display")?(joms.jQuery("#bulletin-edit-data").show(),joms.jQuery(".cPageStory-Author,.cPageStory-Content").hide()):(joms.jQuery("#bulletin-edit-data").hide(),joms.jQuery(".cPageStory-Author,.cPageStory-Content").show())},removeBulletin:function(a,b,c){var d='jax.call("community", "groups,ajaxShowRemoveBulletin", "'+b+'","'+c+'");';cWindowShow(d,a,450,100)},unpublish:function(a){var b='jax.call("community", "groups,ajaxShowUnpublishGroup", "'+a+'");';cWindowShow(b,"",450,100)},leave:function(a){var b='jax.call("community", "groups,ajaxShowLeaveGroup", "'+a+'");';cWindowShow(b,"",450,100)},join:function(a,b){jax.call("community","groups,ajaxJoinGroup",[a],[b])},joinComplete:function(a){joms.jQuery("input#join").val(a),joms.jQuery(".loading-icon").hide(),joms.jQuery("#add-reply").show(),joms.jQuery("#add-reply").click(function(){joms.jQuery("div#community-groups-wrap").hide(),joms.jQuery("textarea#wall-message").css("width","100%"),joms.jQuery(".reply-form").show()})},edit:function(){joms.jQuery("#community-group-info .cdata").each(function(){joms.jQuery(this).next().html()&&"none"!=joms.jQuery(this).css("display")?joms.jQuery(this).css("display","none"):joms.jQuery(this).css("display","block")}),joms.jQuery("#community-group-info .cinput").each(function(){"none"==joms.jQuery(this).css("display")?joms.jQuery(this).css("display","block"):joms.jQuery(this).css("display","none")}),"none"!=joms.jQuery("div#community-group-info-actions").css("display")?joms.jQuery("div#community-group-info-actions").css("display","none"):joms.jQuery("div#community-group-info-actions").css("display","block")},save:function(a){var b=joms.jQuery("#community-group-name").val(),c=joms.jQuery("#community-group-description").val(),d=joms.jQuery("#community-group-website").val(),e=joms.jQuery("#community-group-category").val(),f=joms.jQuery("input[@name='group-approvals']:checked").val();jax.call("community","groups,ajaxSaveGroup",a,b,c,d,e,f)},update:function(a,b,c,d){joms.jQuery("#community-group-data-name").html(a),joms.jQuery("#community-group-data-description").html(b),joms.jQuery("#community-group-data-website").html(c),joms.jQuery("#community-group-data-category").html(d),this.edit()},deleteGroup:function(a){var b="jax.call('community', 'groups,ajaxWarnGroupDeletion', '"+a+"');";cWindowShow(b,"",450,100,"error")},toggleSearchSubmenu:function(a){joms.jQuery(a).next("ul").toggle().find("input[type=text]").focus()},confirmMemberRemoval:function(a,b){var c=function(){jax.call("community","groups,ajaxConfirmMemberRemoval",a,b)};cWindowShow(c,"",450,80,"warning")},removeMember:function(a,b){var c=joms.jQuery("#cWindow input[name=block]").attr("checked");c?jax.call("community","groups,ajaxBanMember",a,b):jax.call("community","groups,ajaxRemoveMember",a,b)}},photos:{multiUpload:{label:{filename:"Filename",size:"Size",status:"Status",filedrag:"Drag files here.",addfiles:"Add Files",startupload:"Start Upload",invalidfiletype:"Invalid File Type",exceedfilesize:"Image file size exceeded limit",stopupload:"Stop Upload"},groupid:"",noticeDivId:"photoUploaderNotice",defaultMsg:"",groupEmptyValidateMsg:"",uploadingCreateMsg:"",uploadingSelectMsg:"",refreshNeeded:!1,defaultUploadUrl:"index.php?option=com_community&view=photos&task=multiUpload",maxFileSize:"10mb",_init:function(a,b){if(void 0!=a&&parseInt(a)>0&&(joms.photos.multiUpload.groupid=a),void 0!=b&&"object"==typeof b)for(var c in b)joms.photos.multiUpload[c]=b[c];var d=navigator.userAgent.toLowerCase(),e=!!d.match(/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i);pluploader=joms.jQuery("#multi_uploader").pluploadQueue({runtimes:"gears,html5,browserplus,html4",url:"index.php?option=com_community&view=photos&task=multiUpload",max_file_size:joms.photos.multiUpload.maxFileSize,chunk_size:joms.photos.multiUpload.maxFileSize,unique_names:!0,resize:e?!1:{width:2100,height:2100,quality:90},filters:[{title:"Image files",extensions:"jpg,gif,png,jpeg"}],flash_swf_url:"components/com_community/assets/multiupload_js/plupload.flash.swf",silverlight_xap_url:"components/com_community/assets/multiupload_js/plupload.silverlight.xap",preinit:{Init:function(a,b){joms.photos.multiUpload.log("[Init]","Info:",b,"Features:",a.features)},BeforeUpload:function(){if("none"!==joms.jQuery("#new-album").css("display")){if(""!=joms.photos.multiUpload.groupid&&""==joms.jQuery("#album-name").val())return joms.photos.multiUpload.stopUploading(),void alert(joms.photos.multiUpload.groupEmptyValidateMsg);joms.photos.multiUpload.stopUploading();var a=joms.jQuery("#album-name").val().trim();jax.call("community","photos,ajaxCreateAlbum",a,joms.photos.multiUpload.groupid)}else{var b=joms.jQuery("#albumid option:selected").html(),c=joms.photos.multiUpload.uploadingSelectMsg.replace("%1$s",""+b+"");joms.photos.multiUpload.displayNotice(c),joms.photos.multiUpload.assignUploadUrl(joms.photos.multiUpload.getSelectedAlbumId())}joms.photos.multiUpload.hideShowInput(!0),joms.jQuery("#photo-uploader").css("overflow","hidden")},UploadFile:function(a,b){joms.photos.multiUpload.log("[UploadFile]",b),joms.jQuery(".plupload_start").addClass("plupload_disabled")},FileUploaded:function(a,b,c){try{var d=joms.jQuery.parseJSON(c.response)}catch(e){joms.photos.multiUpload.removeQueue(b.id),pluploader.pluploadQueue().stop(),joms.photos.multiUpload.displayNotice("Error Uploading.")}var f=pluploader.pluploadQueue().getFile(b.id);if(void 0!=d&&void 0!=f)if(void 0!=d.error&&""==d.photoId){joms.photos.multiUpload.removeQueue(b.id),joms.jQuery("#upload-footer").show(),joms.jQuery("#message-between").hide(),joms.jQuery(".add-more").hide(),cWindowResize();try{pluploader.pluploadQueue().stop()}catch(e){}joms.photos.multiUpload.showThumbnail(),joms.photos.multiUpload.displayNotice(""+d.msg+""),joms.jQuery(".plupload_file_name span").bind("click",function(a){joms.photos.multiUpload.editTitle(a)})}else joms.jQuery("#album-name").attr("albumid",d.albumId),f.imgSrc=d.info,f.photoId=d.photoId,joms.photos.multiUpload.refreshNeeded=!0},FilesAdded:function(){joms.jQuery(".plupload_file_name span").unbind("click"),joms.jQuery(".plupload_button.plupload_start").show(),joms.jQuery(".plupload_button.plupload_start").css("display","inline-block")},FilesRemoved:function(){0==pluploader.pluploadQueue().files.length&&joms.jQuery(".plupload_button.plupload_start").hide()},UploadComplete:function(){joms.photos.multiUpload.uploadCompleteShow(),setTimeout("joms.photos.multiUpload.showThumbnail(); joms.photos.multiUpload.enableEditTitle();",1e3)}},init:{Refresh:function(){joms.photos.multiUpload.log("[Refresh]")},StateChanged:function(a){joms.photos.multiUpload.log("[StateChanged]",a.state==plupload.STARTED?"STARTED":"STOPPED")},QueueChanged:function(){joms.photos.multiUpload.log("[QueueChanged]")},UploadProgress:function(a,b){joms.photos.multiUpload.log("[UploadProgress]","File:",b,"Total:",a.total)},FilesAdded:function(a,b){joms.photos.multiUpload.log("[FilesAdded]"),plupload.each(b,function(a){joms.photos.multiUpload.log(" File:",a)})},FilesRemoved:function(a,b){joms.photos.multiUpload.log("[FilesRemoved]"),plupload.each(b,function(a){joms.photos.multiUpload.log(" File:",a)})},FileUploaded:function(a,b,c){joms.photos.multiUpload.log("[FileUploaded] File:",b,"Info:",c)},ChunkUploaded:function(a,b,c){joms.photos.multiUpload.log("[ChunkUploaded] File:",b,"Info:",c)},Error:function(a,b){b.file?joms.photos.multiUpload.log("[error]",b,"File:",b.file):joms.photos.multiUpload.log("[error]",b)}}}),("html4"==pluploader.pluploadQueue().runtime||joms.jQuery.browser.msie&&parseInt(joms.jQuery.browser.version)<=7||joms.jQuery.browser.mozilla&&1.9==joms.jQuery.browser.version.slice(0,3))&&joms.photos.multiUpload.getBrowserNotSupport(),joms.jQuery(".plupload_button.plupload_start").hide(),joms.jQuery("#cwin_close_btn").click(function(){joms.photos.multiUpload.refreshNeeded&&joms.photos.multiUpload.refreshBrowser()}),joms.jQuery.browser.msie&&joms.jQuery("div.plupload.html5").css("top",230)},log:function(){var a="";plupload.each(arguments,function(b){var c="";"string"!=typeof b?(plupload.each(b,function(a,d){if(b instanceof plupload.File)switch(a){case plupload.QUEUED:a="QUEUED";break;case plupload.UPLOADING:a="UPLOADING";break;case plupload.FAILED:a="FAILED";break;case plupload.DONE:a="DONE"}"function"!=typeof a&&(c+=(c?", ":"")+d+"="+a)}),a+=c+" "):a+=b+" "}),joms.jQuery("#log").val(joms.jQuery("#log").val()+a+"\r\n")},getSelectedAlbumId:function(){return"undefined"==typeof pluploader?!1:joms.jQuery("#album-name").length<=0?!1:void 0!=joms.jQuery("#album-name").attr("albumid")&&parseInt(joms.jQuery("#album-name").attr("albumid"))>0&&"inline"==joms.jQuery("#new-album").css("display")?joms.jQuery("#album-name").attr("albumid"):joms.jQuery("#albumid").val()?joms.jQuery("#albumid").val():joms.jQuery("#album-name").attr("albumid") },showThumbnail:function(){for(var a=pluploader.pluploadQueue(),b=0;b"+d+"");joms.photos.multiUpload.displayNotice(e)},assignUploadUrl:function(a){if("undefined"==typeof pluploader)return!1;var b=joms.photos.multiUpload.defaultUploadUrl,c=pluploader.pluploadQueue();b=b.match(/&+/)?b+"&albumid="+a+"&batchcount="+c.files.length:b+"?albumid="+a+"&batchcount="+c.files.length,joms.jQuery("#multi_uploader").pluploadQueue().settings.url=b},assignNewAlbum:function(a,b){if("undefined"==typeof pluploader)return!1;if(joms.jQuery("#albumid").length<=0)return!1;if(void 0!=b){var c=b,d=new Option(c,a);joms.jQuery("#albumid").append(d).val(a),joms.photos.multiUpload.assignUploadUrl(a),joms.jQuery("#album-name").val("")}else{joms.jQuery("#albumid").val(a);var c=joms.jQuery("#albumid option:selected").html()}var e=joms.photos.multiUpload.uploadingCreateMsg.replace("%1$s",""+c+"");joms.photos.multiUpload.displayNotice(e),joms.photos.multiUpload.showExistingAlbum(),setTimeout("joms.jQuery('#multi_uploader').pluploadQueue().start()",500)},showExistingAlbum:function(){joms.jQuery("#select-album").show(),joms.jQuery("#new-album").hide(),joms.jQuery("#newalbum").hide(),pluploader.pluploadQueue().files.length>0&&joms.jQuery(".plupload_start").removeClass("plupload_disabled")},createNewAlbum:function(){joms.jQuery("#select-album").hide(),joms.jQuery("#new-album").show(),joms.jQuery("#newalbum").show()},startUploading:function(){joms.jQuery("#multi_uploader").pluploadQueue().start()},stopUploading:function(){joms.jQuery("#multi_uploader").pluploadQueue().stop()},goToAlbum:function(a){document.location.href=a},getBrowserNotSupport:function(){jax.call("community","photos,ajaxGotoOldUpload",joms.photos.multiUpload.getSelectedAlbumId(),joms.photos.multiUpload.groupid)},goToOldUpload:function(a){document.location.href=a},refreshBrowser:function(){window.location.reload()},updateLabel:function(a){a=joms.jQuery.parseJSON(a);for(var b=["filename","size","status","filedrag","addfiles","startupload","stopupload"],c=0;c0&&(joms.jQuery(".plupload_file_name span").unbind("click"),joms.jQuery(".plupload_file_name span").bind("click",function(a){joms.photos.multiUpload.editTitle(a)}))},editTitle:function(a){joms.jQuery(".plupload_file_name span").unbind("click");var b=a.target?a.target:a.which,c=joms.jQuery(b).parent().parent().attr("id"),d='';joms.jQuery(b).html(d),joms.jQuery(b).find("input").unbind("keypress").unbind("focusout"),joms.jQuery(b).find("input").bind("keypress",function(a){keyCode=a.keyCode,13==keyCode&&(joms.photos.multiUpload.saveCaption(this,joms.jQuery(this).parent()),joms.jQuery(".plupload_file_name span").bind("click",function(a){joms.photos.multiUpload.editTitle(a)}))}),joms.jQuery(b).find("input").bind("focusout",function(){joms.photos.multiUpload.saveCaption(this,joms.jQuery(this).parent()),joms.jQuery(".plupload_file_name span").bind("click",function(a){joms.photos.multiUpload.editTitle(a)})})},saveCaption:function(a,b){var c=joms.jQuery(a).attr("target"),d=pluploader.pluploadQueue().getFile(c),e=joms.jQuery(a).val();d.name=e;var f=encodeURIComponent(e);jax.call("community","photos,ajaxSaveCaption",d.photoId,f,!1),joms.jQuery(b).html(e)},displayNotice:function(a){joms.jQuery("#"+joms.photos.multiUpload.noticeDivId).html(a)},hideShowInput:function(a){void 0!=a&&a===!0?(joms.jQuery("#upload-header").hide(),joms.jQuery(".custom_plupload_buttons").hide()):(joms.jQuery("#upload-header").show(),joms.jQuery(".custom_plupload_buttons").show(),joms.jQuery(".plupload_button.plupload_start").hide()),cWindowResize()},uploadCompleteShow:function(){joms.jQuery("div#upload-footer").show(),cWindowResize();var a=pluploader.pluploadQueue();joms.ajax.call("photos,ajaxUpdateCounter",[joms.photos.multiUpload.getSelectedAlbumId(),JSON.stringify(a)])},removeQueue:function(a){for(var b=pluploader.pluploadQueue().files,c=[],d=0,e=0;e0&&(c[d]=b[e],d++);for(var e=0;e'+e.msg+""),!1;d=e.msg,joms.jQuery("span.error").remove();var f="";switch(joms.jQuery("#thumb-crop").css("min-height",0),joms.jQuery("#large-avatar-pic").prop("src",d),joms.jQuery("#thumb-hold > img").prop("src",d),joms.jQuery("div.status-anchor img").prop("src",d),joms.jQuery("#large-avatar-pic").load(function(){var a=Math.round(.4*joms.jQuery("#large-avatar-pic").width()),b=Math.round(.4*joms.jQuery("#large-avatar-pic").height());joms.jQuery("#thumb-hold > img").css({width:a+"px",height:b+"px",marginLeft:"0px",marginTop:"0px"})}),a){case"event":f=joms.jQuery(".js-focus-avatar img").prop("src");var g=d.replace("event-","");joms.jQuery(".js-focus-avatar img").prop("src",g),f.search("assets/event.png")>-1&&(c?(selected=joms.jQuery("input:radio[name=repeattype]:checked").val(),custom='{"call":["CEvents","getEventRepeatSaveHTML","'+selected+'"], "library":"events", "arg":["repeattype"]}',jax.call("community","photos,ajaxUploadAvatar",a,b,custom)):jax.call("community","photos,ajaxUploadAvatar",a,b));break;case"group":f=joms.jQuery(".js-focus-avatar img").prop("src");var h=d.replace("group-","");joms.jQuery(".js-focus-avatar img").prop("src",h),f.search("assets/group.png")>-1&&jax.call("community","photos,ajaxUploadAvatar",a,b);break;case"profile":if(f=joms.jQuery(".js-focus-avatar img").prop("src"),0!=e.info.length){var i=e.info,j=i.replace("thumb_","");joms.jQuery(".status-author > img").prop("src",i),joms.jQuery('.cStream-Avatar img[data-author="'+b+'"]').prop("src",i),joms.jQuery(".js-focus-avatar img").prop("src",j)}f.search("assets/user-")>-1&&jax.call("community","photos,ajaxUploadAvatar",a,b)}}}),!1}},loadImgSelect:function(){joms.jQuery("#large-avatar-pic").unbind("load"),joms.jQuery("#large-avatar-pic").load(function(){joms.photos.ajaxImgSelect(),cWindowAutoResize()})},ajaxImgSelect:function(){var a=joms.jQuery("#large-avatar-pic").height(),b=160;160>a&&(b=a),a>160&&(a=160),joms.jQuery("#large-avatar-pic").imgAreaSelect({handles:!0,aspectRatio:"1:1",x1:0,y1:0,x2:b,y2:a,show:!1,hide:!0,enable:!1,parent:"#cWindowContentWrap",minHeight:64,minWidth:64,onInit:joms.photos.previewThumb,onSelectChange:joms.photos.previewThumb});var c=joms.jQuery("#large-avatar-pic").imgAreaSelect({instance:!0});c.setOptions({show:!0,hide:!1,enable:!0}),c.update()},saveThumb:function(a,b){var c=joms.jQuery("#large-avatar-pic").imgAreaSelect({instance:!0}),d=c.getSelection();jax.call("community","photos,ajaxUpdateThumbnail",a,b,d.x1,d.y1,d.width,d.height)},previewThumb:function(a,b){var c=64/(b.width||1),d=64/(b.height||1);joms.jQuery("#thumb-hold >img").css({width:Math.round(c*joms.jQuery("#large-avatar-pic").width())+"px",height:Math.round(d*joms.jQuery("#large-avatar-pic").height())+"px",marginLeft:"-"+Math.round(c*b.x1)+"px",marginTop:"-"+Math.round(d*b.y1)+"px"})},ajaxRemoveImgSelect:function(){joms.jQuery(".imgareaselect-selection").parent().remove(),joms.jQuery(".imgareaselect-outer").remove()},photoSlider:{moveSpace:4,partialOpacity:.6,fullOpacity:1,intervalTime:30,timer:"",controlObj:"",event:"",parentElem:"",stopAnimeId:"",img_thumbId:"photoSlider_thumb",img_thumbClass:"currentView",thumbnail:{width:0,height:0},_init:function(a,b,c){void 0!=c&&joms.photos.photoSlider.updateConfig(c);var d=joms.jQuery("#"+a);if(joms.photos.photoSlider.controlObj=d,joms.photos.photoSlider.parentElem=joms.jQuery(d.parent()),void 0!=b&&""!=b){joms.photos.photoSlider.stopAnimeId=b,joms.jQuery("."+joms.photos.photoSlider.stopAnimeId).css("opacity",joms.photos.photoSlider.partialOpacity);var e=joms.gallery.getPlaylistIndex(joms.gallery.currentPhoto().id);joms.jQuery("."+joms.photos.photoSlider.stopAnimeId).eq(e).css("opacity",joms.photos.photoSlider.fullOpacity)}joms.photos.photoSlider.parentElem.bind({mouseover:function(a){var b=(joms.photos.photoSlider.getValue(joms.jQuery(this).css("width")),joms.photos.photoSlider.getValue(joms.jQuery(this).css("height"))),c=joms.jQuery(this).offset();a.pageY>c.top+.1*b&&a.pageY0&&(joms.photos.photoSlider[b[c]]=a[b[c]])},moveContent:function(){if(joms.photos.photoSlider.parentElem.unbind("mouseover"),joms.photos.photoSlider.timer=setInterval("joms.photos.photoSlider.animate()",joms.photos.photoSlider.intervalTime),""!=joms.photos.photoSlider.stopAnimeId&&joms.jQuery("."+joms.photos.photoSlider.stopAnimeId).length>0){var a=joms.jQuery("."+joms.photos.photoSlider.stopAnimeId).eq(0);joms.photos.photoSlider.thumbnail.width=joms.photos.photoSlider.getValue(a.css("width")),joms.photos.photoSlider.thumbnail.height=joms.photos.photoSlider.getValue(a.css("height"))}},animate:function(){if(joms.jQuery("#startTagMode").length>0&&"none"==joms.jQuery("#startTagMode").css("display"))return joms.photos.photoSlider.stop(),!1;var a=joms.photos.photoSlider.getValue(joms.photos.photoSlider.controlObj.css("left")),b=joms.photos.photoSlider.getValue(joms.photos.photoSlider.controlObj.css("width")),c=joms.photos.photoSlider.getValue(joms.photos.photoSlider.parentElem.css("width")),d=c/2;joms.photos.photoSlider.getMouseXPosition()>d?a+b-c>=0&&joms.photos.photoSlider.controlObj.css("left",a-joms.photos.photoSlider.moveSpace+"px"):0>a&&joms.photos.photoSlider.controlObj.css("left",a+joms.photos.photoSlider.moveSpace+"px")},updateMousePos:function(a){joms.photos.photoSlider.event=a},getMouseXPosition:function(){return joms.photos.photoSlider.event.pageX-joms.photos.photoSlider.parentElem.offset().left},getMouseYPosition:function(){return joms.photos.photoSlider.event.pageY-joms.photos.photoSlider.parentElem.offset().top},getValue:function(a){return""==a||"auto"==a?intVal=0:(intVal=parseInt(a.replace("px","")),("number"!=typeof intVal||"NaN"==intVal)&&(intVal=0)),intVal},viewImage:function(a){return joms.jQuery("#startTagMode").length>0&&"none"==joms.jQuery("#startTagMode").css("display")?!1:void(void 0!=joms.gallery&&void 0!=jsPlaylist&&(joms.photos.photoSlider.stop(),joms.gallery.displayPhoto(jsPlaylist.photos[joms.gallery.getPlaylistIndex(a)])))},switchPhoto:function(){if(void 0==joms.photos.photoSlider.controlObj||""==joms.photos.photoSlider.controlObj)return!1;var a,b=window.location.hash||"",c=window.location.href;c=c.replace(b,""),b&&b.match(/^#photoid=\d+$/)&&(a=b.replace("#photoid=","")),a||(a=c.match(/.+photoid=(\d+).*/),a=a&&a[1]),a||(a=joms.photos.photoSlider.controlObj.find(d).eq(0).attr("id")),joms.photos.photoSlider.controlObj.find("img").removeClass(joms.photos.photoSlider.img_thumbClass),joms.photos.photoSlider.controlObj.find('img[id="'+a+'"]').addClass(joms.photos.photoSlider.img_thumbClass);var d=joms.jQuery("img#photoSlider_thumb"+a).css("opacity",joms.photos.photoSlider.fullOpacity);joms.jQuery(".image_thumb").not(d).css("opacity",joms.photos.photoSlider.partialOpacity),!d.attr("src")&&d.data("src")&&(d[0].src=d.data("src"));for(var e=d,f=0;6>f&&(e=e.closest("li").next("li"),e.length);f++)e=e.find("img"),e.length&&!e.attr("src")&&e.data("src")&&(e[0].src=e.data("src"));for(var g=d,f=6;f>0&&(g=g.closest("li").prev("li"),g.length);f--)g=g.find("img"),g.length&&!g.attr("src")&&g.data("src")&&(g[0].src=g.data("src"));var h=d.closest("li"),i=(h.position()||{}).left,j=h.closest("ul"),k=(j.position()||{}).left,l=j.width(),m=j.closest("div"),n=m.width(),o=n/2-h.outerWidth(!0)/2;k=n>l?n/2-l/2:Math.max(0-(l-n),Math.min(0,0-i+o)),j.stop().animate({left:k})},updateThumb:function(a,b){var c='img[id="'+joms.photos.photoSlider.img_thumbId+a+'"]';1==joms.jQuery(".slider-gallery").find(c).length&&joms.jQuery(".slider-gallery").find(c).attr("src",b)},removeThumb:function(a){joms.jQuery("#cPhoto"+a).remove();var b=joms.photos.photoSlider.controlObj.find("img").length,c=79;joms.photos.photoSlider.controlObj.css("width",b*c+"px")},reset:function(a){var b=joms.photos.photoSlider.parentElem.offset();return a.pageX>b.left&&a.pageXb.top&&a.pageY0&&(joms.tooltips.repositionMinitip(),joms.minitip.addContent(a))},repositionMinitip:function(){var a=joms.tooltips.currentJElement.offset().top-(joms.jQuery("#"+joms.minitip.id.canvas).height()+20);if(joms.jQuery.browser.msie&&joms.jQuery.browser.version.substr(0,1)<=7)var b=joms.tooltips.currentJElement.offset().left-65;else var b=joms.tooltips.currentJElement.offset().left+30;joms.jQuery("#"+joms.minitip.id.canvas).css({top:a,left:b})},setDelay:function(a,b,c,d,e){return void 0==a.attr("id")&&a.attr("id","temp_minitooltip"+Math.random().toString()),joms.jQuery("#"+joms.minitip.id.canvas).length>0&&a.attr("id")==joms.jQuery("#"+joms.minitip.id.canvas).attr("currentMinitip")?!1:(void 0!=d&&parseInt(d)>0&&(joms.tooltips.minitipStyle.width=d),void 0!=e&&parseInt(e)>0&&(joms.tooltips.minitipStyle.height=e),joms.tooltips.currentJElement=a,joms.tooltips.currentJElement.bind("mouseout",function(){joms.jQuery(this).removeClass(c),clearTimeout(joms.tooltips.currentTimeout),joms.tooltips.reset(),joms.minitip.hide()}),joms.tooltips.currentJElement.addClass(c),joms.tooltips.currentJaxCall=b,void(joms.tooltips.currentTimeout=setTimeout("joms.tooltips.showDialog('"+c+"')",500)))},reset:function(){joms.tooltips.currentJaxCall="",joms.tooltips.currentTimeout=""}},friends:{saveTag:function(){var a=jax.getFormValues("tagsForm");return jax.call("community","friends,ajaxFriendTagSave",a),!1},saveGroup:function(a){""==document.getElementById("newtag").value?window.alert("TPL_DB_INVALIDTAG"):jax.call("community","friends,ajaxAddGroup",a,joms.jQuery("#newtag").val())},cancelRequest:function(a){var b='jax.call("community" , "friends,ajaxCancelRequest" , "'+a+'");';cWindowShow(b,"",450,100)},connect:function(a){var b='jax.call("community", "friends,ajaxConnect", '+a+")";cWindowShow(b,"",450,140)},addNow:function(){var a=jax.getFormValues("addfriend");return jax.call("community","friends,ajaxSaveFriend",a),!1},confirmFriendRemoval:function(a){var b=function(){jax.call("community","friends,ajaxConfirmFriendRemoval",a)};cWindowShow(b,"",450,80,"warning")},remove:function(a){var b,c=joms.jQuery("#cWindow input[name=block]").attr("checked");b=c?function(){jax.call("community","friends,ajaxBlockFriend",a)}:function(){jax.call("community","friends,ajaxRemoveFriend",a)},cWindowShow(b,"",450,80,"warning")},updateFriendList:function(a,b){currentFriends="",noFriend="",joms.jQuery("#community-invitation-list").hasClass("load-more")?currentFriends=joms.jQuery("#community-invitation-list").html():""==joms.jQuery.trim(a)&&(noFriend=b),newFriends=currentFriends+a+noFriend,joms.jQuery("#community-invitation-list").html(newFriends),joms.invitation.filterMember(),joms.jQuery(".cTabNav #ctab-result").click()},loadFriend:function(a,b,c,d,e){joms.jQuery("#community-invitation-list").hasClass("load-more")&&joms.jQuery("#community-invitation-list").removeClass("load-more"),jax.call("community","system,ajaxLoadFriendsList",a,b,c,d,e)},loadMoreFriend:function(a,b,c,d){name=joms.jQuery("#friend-search-filter").val(),joms.jQuery("#community-invitation-list").addClass("load-more"),jax.call("community","system,ajaxLoadFriendsList",name,a,b,c,d)},showForm:function(a,b,c,d,e){var f='jax.call("community", "system,ajaxShowFriendsForm","'+a+'","'+b+'","'+c+'","'+d+'","'+e+'")',g=520;g="0"!=d?g:g-108,g-=108,cWindowShow(f,"",550,g)},selectRecipients:function(){joms.jQuery("#community-invited-list li").each(function(){var a=joms.jQuery(this).attr("id");if(joms.jQuery("#inbox-selected-to #"+a).length>0);else{var b=joms.jQuery(this).clone();b.appendTo("#inbox-selected-to")}}),joms.jQuery(".invitation-check label").empty(),cWindowHide()}},messaging:{loadComposeWindow:function(a){var b='jax.call("community", "inbox,ajaxCompose", '+a+")";cWindowShow(b,"",450,295)},sendCompleted:function(){joms_message_sending=!1},send:function(){if(joms_message_sending)return!1;joms_message_sending=!0;var a=jax.getFormValues("writeMessageForm");return jax.call("community","inbox,ajaxSend",a),!1},confirmDeleteMarked:function(a){var b=new Array;if(joms.jQuery("#inbox-listing INPUT[type='checkbox']").each(function(){joms.jQuery(this).attr("checked")&&b.push(joms.jQuery(this).attr("value"))}),""!=b.toString())var c='jax.call("community", "inbox,ajaxDeleteMessages", "'+a+'")';else var c='jax.call("community", "inbox,ajaxDeleteMessages", "'+a+'","empty")';cWindowShow(c,"",450,100)},deleteMarked:function(a){var b=new Array;return joms.jQuery("#inbox-listing INPUT[type='checkbox']").each(function(){joms.jQuery(this).attr("checked")&&b.push(joms.jQuery(this).attr("value"))}),"inbox"==a?jax.call("community","inbox,ajaxRemoveFullMessages",b.toString()):jax.call("community","inbox,ajaxRemoveSentMessages",b.toString()),!1}},walls:{insertOrder:"prepend",add:function(a,b){jax.loadingFunction=function(){joms.jQuery("#wall-message,#wall-submit").attr("disabled",!0)},jax.doneLoadingFunction=function(){joms.jQuery("#wall-message,#wall-submit").attr("disabled",!1)},cache_id="function"==typeof getCacheId?getCacheId():"",jax.call("community",b,joms.jQuery("#wall-message").val(),a,cache_id)},insert:function(a){joms.jQuery("#wall-message").val(""),"prepend"==joms.walls.insertOrder?joms.jQuery("#wall-containter").prepend(a):joms.jQuery("#wall-containter .cComment:last").length>0?joms.jQuery("#wall-containter .cComment:last").after(a):joms.jQuery("#wall-containter").prepend(a)},remove:function(a,b,c){confirm("Are you sure you want to delete this wall?")&&(jax.call("community",a+",ajaxRemoveWall",b,c),joms.jQuery("#wall_"+b).fadeOut("normal",function(){joms.jQuery(this).remove()}))},update:function(a,b){cWindowHide(),joms.jQuery("#wall_"+a).replaceWith(b)},save:function(a,b){jax.call("community","system,ajaxUpdateWall",a,joms.jQuery("#wall-edit-"+a).val(),b)},edit:function(a,b){null!=joms.jQuery("#wall-edit-"+a).val()?(joms.jQuery("#wall-message-"+a).show(),joms.jQuery("#wall-edit-container-"+a).children().remove()):(joms.jQuery("#wall-message-"+a).hide(),joms.jQuery("#wall_"+a+" div.content").prepend('').prepend('
'),jax.call("community","system,ajaxEditWall",a,b),joms.utils.textAreaWidth("#wall-edit-"+a),joms.utils.autogrow("#wall-edit-"+a))},more:function(){var a=joms.jQuery("#wall-groupId").val(),b=joms.jQuery("#wall-discussionId").val(),c=joms.jQuery("#wall-limitStart").val();joms.jQuery("#wall-more .more-wall-text").hide(),joms.jQuery("#wall-more .loading").show(),jax.call("community","system,ajaxGetOlderWalls",a,b,c)},append:function(a){joms.jQuery("#wall-more,#wall-groupId,#wall-discussionId,#wall-limitStart").remove(),joms.jQuery("#wall-containter").append(a)},prepend:function(a){joms.jQuery("#wall-more").remove(),joms.jQuery("#wall-groupId").remove(),joms.jQuery("#wall-discussionId").remove(),joms.jQuery("#wall-limitStart").remove(),joms.jQuery("#wall-containter").prepend(a)},showVideoWindow:function(a){var b='jax.call("community" , "videos,ajaxShowVideoWindow", "'+a+'");';cWindowShow(b,"",640,360)}},toolbar:{timeout:500,closetimer:0,ddmenuitem:0,open:function(a){joms.jQuery("#"+a).length>0&&(joms.toolbar.cancelclosetime(),joms.toolbar.ddmenuitem&&(joms.toolbar.ddmenuitem.style.visibility="hidden"),joms.toolbar.ddmenuitem=document.getElementById(a),joms.toolbar.ddmenuitem.style.visibility="visible")},close:function(){joms.toolbar.ddmenuitem&&(joms.toolbar.ddmenuitem.style.visibility="hidden")},closetime:function(){joms.toolbar.closetimer=window.setTimeout(joms.toolbar.close,joms.toolbar.timeout)},cancelclosetime:function(){joms.toolbar.closetimer&&(window.clearTimeout(joms.toolbar.closetimer),joms.toolbar.closetimer=null)}},registrations:{showTermsWindow:function(a){var b='jax.call("community", "register,ajaxShowTnc", "'+a+'")';cWindowShow(b,this.windowTitle,600,350)},authenticate:function(){jax.call("community","register,ajaxGenerateAuthKey")},authenticateAssign:function(){jax.call("community","register,ajaxAssignAuthKey")},assignAuthKey:function(fname,lblname,authkey){eval("document.forms['"+fname+"'].elements['"+lblname+"'].value = '"+authkey+"';")},showWarning:function(a,b){cWindowShow("joms.jQuery('#cWindowContent').html('"+a+"')",b,450,200,"warning")}},miniwall:{initialize:function(){var a=joms.jQuery("#activity-stream-container");joms.jQuery('a[href="#removeComment"]').on("click",function(){var a=joms.jQuery(this).parents("[data-commentid]").data("commentid");joms.miniwall.remove(a)}),a.on("click",'a[href="#showallcomments"]',function(a){a.preventDefault();var b=joms.jQuery(this);if(!b.data("loading")){b.data("loading",1);var c=b.closest("li").data("streamid");jax.call("community","system,ajaxStreamShowComments",c)}}),joms.jQuery(".cStream-Form textarea").width(joms.jQuery(".cStream-Form").width()-12)},add:function(a,b){if("undefined"!=typeof b){var c=null;c="cModule-ActivityStream"==joms.miniwall.type(b)?joms.jQuery("#cModule-ActivityStream").find("#wall-cmt-"+a):joms.jQuery(".cMain").find("#wall-cmt-"+a);var d=c.find("textarea");return d.data("inittextntags")?void d.textntags("val",function(b){joms.miniwall._add(a,c,b)}):void joms.miniwall._add(a,c,d.val())}},_add:function(a,b,c){c=joms.jQuery.trim(c),c.length>0&&(b.find(".wall-coc-form-action.add").attr("disabled",!0),b.find(".wall-coc-errors").hide(),jax.loadingFunction=function(){b.find("textarea").attr("disabled",!0),b.find(".wall-coc-form-actions").append('Posting...'),jax.loadingFunction=function(){}},jax.doneLoadingFunction=function(){b.find(".wall-coc-form-actions").find("em").remove(),b.find("textarea").attr("disabled",!1).val(""),b.find(".wall-coc-form-action.add").attr("disabled",!1),cmtCountObj=b.parent().parent().find(".wall-cmt-count"),curCmtCount=parseInt(cmtCountObj.html()),cmtCountObj.parent().fadeOut("fast",function(){cmtCountObj.html(curCmtCount+1),cmtCountObj.parent().fadeIn("fast")}),jax.doneLoadingFunction=function(){}},jax.call("community","system,ajaxStreamAddComment",a,c))},insert:function(a,b){joms.jQuery("#wall-cmt-"+a+" .wallform").before(b),joms.jQuery("#wall-cmt-"+a+" .wallnone").removeClass("wallnone"),joms.miniwall.cancel(a)},loadall:function(a,b){joms.jQuery("li[data-streamid="+a+"] div[data-commentid]").remove(),joms.jQuery("li[data-streamid="+a+"] div[data-commentmore]").replaceWith(b)},cancel:function(a){joms.jQuery("#wall-cmt-"+a+" .wall-coc-errors").hide(),joms.jQuery("#wall-cmt-"+a+".wall-coc-form-action.add").removeAttr("disabled"),joms.jQuery("#wall-cmt-"+a+" [data-formblock]").hide(),joms.jQuery("li[data-streamid="+a+"] [data-commentid]").length>0&&joms.jQuery("li[data-streamid="+a+"] [data-replyblock]").show()},remove:function(a){var b=joms.jQuery("#wall-"+a).parent().parent().parent().find(".wall-cmt-count");jax.loadingFunction=function(){joms.jQuery("#wall-"+a).css({backgroundColor:"#ffdddd"}).find(".wall-coc-remove-link").show().html('Removing...'),jax.loadingFunction=function(){}},jax.doneLoadingFunction=function(){var c=parseInt(b.html());c>0&&(1==c&&joms.jQuery("#wall-"+a).parent().parent().find(".cComment:last").addClass("wallnone"),b.parent().fadeOut("fast",function(){b.html(c-1),b.parent().fadeIn("fast")})),joms.jQuery("[data-commentid="+a+"]").fadeOut("fast",function(){joms.jQuery(this).remove()}).find(".wall-coc-remove-link").hide(),jax.doneLoadingFunction=function(){}},jax.call("community","system,ajaxStreamRemoveComment",a)},show:function(a,b){if("undefined"!=typeof b){var c=null,d=null;"cModule-ActivityStream"==joms.miniwall.type(b)?(c=joms.jQuery("#cModule-ActivityStream").find("li[data-streamid="+a+"] [data-formblock]"),d=joms.jQuery("#cModule-ActivityStream").find("li[data-streamid="+a+"] [data-replyblock]")):(c=joms.jQuery(".cMain").find("li[data-streamid="+a+"] [data-formblock]"),d=joms.jQuery(".cMain").find("li[data-streamid="+a+"] [data-replyblock]")),c.show(),c.find("button").attr("onclick","joms.miniwall.add('"+a+"', this);return false;"),d.hide();var e=c.find("textarea");e.data("autogrow")||(joms.utils.textAreaWidth(e),joms.utils.autogrow(e),e.focus(),e.blur(function(){""==joms.jQuery(this).val()&&joms.miniwall.cancel(a)}).data("autogrow",!0))}},type:function(a){for(var b=joms.jQuery(a),c=50,d="";void 0!=b.prop("tagName")&&b.prop("tagName")!=joms.jQuery("body").prop("tagName")&&c>0;)""!=d||"cModule-ActivityStream"!=b.attr("id")&&"cMain"!=b.attr("class")||(d=b.attr(void 0!=b.attr("id")?"id":"class")),b=b.parent(),c--;return d}},comments:{add:function(a){var b=joms.jQuery("#"+a+" textarea").val();""!=b&&(joms.jQuery("#"+a+".wall-coc-form-action.add").attr("disabled",!0),cache_id="function"==typeof getCacheId?getCacheId():"",jax.call("community","plugins,walls,ajaxAddComment",a,b,cache_id))},insert:function(a,b){joms.jQuery("#"+a+" form").before(b),joms.comments.cancel(a)},remove:function(a){var b=joms.jQuery(a).parents(".cComment"),c=joms.jQuery(b).index(),d=joms.jQuery(a).parents(".cComment").parent().attr("id");jax.call("community","plugins,walls,ajaxRemoveComment",d,c)},cancel:function(a){joms.jQuery("#"+a+" textarea").val(""),joms.jQuery("#"+a+" textarea").height("auto"),joms.jQuery("#"+a+" form").hide(),joms.jQuery("#"+a+" .show-cmt").show(),joms.jQuery("#"+a+" .wall-coc-errors").hide(),joms.jQuery("#"+a+".wall-coc-form-action.add").removeAttr("disabled")},show:function(a){var b=joms.jQuery("#"+a+" form").parent().width();joms.jQuery("#"+a+".wall-coc-form-action.add").removeAttr("disabled"),joms.jQuery("#"+a+" form").width(b).show(),joms.jQuery("#"+a+" .show-cmt").hide();var c=joms.jQuery("#"+a+" textarea");c.data("autogrow")||(joms.utils.textAreaWidth(c),joms.utils.autogrow(c),c.blur(function(){""==joms.jQuery(this).val()&&joms.comments.cancel(a)}).data("autogrow",!0))},edit:function(a,b,c){if("undefined"!=typeof c){var d=null;d=joms.jQuery("cModule-ActivityStream"==joms.miniwall.type(c)?"#cModule-ActivityStream":".cMain"),d.find("div[data-commentid="+a+"]").hide();var e=document.createElement("div"),f=d.find("div[data-commentid="+a+"] .cStream-Content span.comment").html();d.find("li[data-streamid="+b+"] [data-formblock]").show(),d.find("li[data-streamid="+b+"] [data-replyblock]").hide();var g=d.find("li[data-streamid="+b+"] .cStream-Form").find("textarea");e.innerHTML=f;var h=e.textContent||e.innerText;g.val(h),d.find("li[data-streamid="+b+"] button").attr("onClick","joms.comments.saveEdit("+a+","+b+", this);return false;"),d.find("li[data-streamid="+b+"] .cStream-FormCancel").attr("onClick","joms.comments.cancelEdit("+a+","+b+", this);return false;"),g.data("autogrow")||(joms.utils.textAreaWidth(g),joms.utils.autogrow(g),g.focus())}},cancelEdit:function(a,b){joms.jQuery("div[data-commentid="+a+"]").show(),joms.jQuery("li[data-streamid="+b+"] .cStream-FormCancel").attr("onClick","joms.miniwall.cancel("+b+");return false;"),joms.jQuery("li[data-streamid="+b+"] button").attr("onClick","joms.miniwall.add("+b+");return false;"),joms.miniwall.cancel(b)},saveEdit:function(a,b,c){var d=null;d=joms.jQuery("cModule-ActivityStream"==joms.miniwall.type(c)?"#cModule-ActivityStream":".cMain");var e=d.find("li[data-streamid="+b+"] .cStream-Form").find("textarea");return e.data("inittextntags")?void e.textntags("val",function(c){jax.call("community","system,ajaxeditComment",a,c,b)}):void jax.call("community","system,ajaxeditComment",a,e.val(),b)}},utils:{textAreaWidth:function(target){with(joms.jQuery(target))css("width","100%"),css("width",parseInt(parent().width())-parseInt(css("borderLeftWidth"))-parseInt(css("borderRightWidth"))-parseInt(css("padding-left"))-parseInt(css("padding-right"))+11)},autogrow:function(a,b){void 0==b&&(b={}),b.maxHeight=b.maxHeight||300,joms.jQuery(a).autogrow(b)}},map:{queue:[],execute:function(a){return window.google&&window.google.maps&&window.google.maps.places?void a():joms.map.loading?void joms.map.queue.push(a):(joms.map.loading=!0,joms.map.queue.push(a),void joms.map.loadScript())},loadScript:function(){var a=document.createElement("script");a.type="text/javascript",a.src="http://maps.googleapis.com/maps/api/js?libraries=places&sensor=false&callback=joms.map.loadScriptCallback",document.body.appendChild(a)},loadScriptCallback:function(){if(joms.map.queue&&joms.map.queue.length)for(;joms.map.queue.length;)joms.map.queue.shift()();joms.map.loading=!1}},maps:{mapsObj:null,geocoder:null,init:function(){(null!=joms.jQuery(".cMapFade")||null!=joms.jQuery(".cMapHeatzone"))&&(joms.jQuery(".cMapFade").live("mouseover",function(){joms.jQuery(this).find("img:eq(2)").fadeOut(0)}),joms.jQuery(".cMapFade").live("mouseout",function(){joms.jQuery(this).find("img:eq(2)").fadeIn(0)}),joms.jQuery(".cMapHeatzone").live("mouseover",function(){joms.jQuery(this).parent().find("img:eq(1)").fadeOut(0)}),joms.jQuery(".cMapHeatzone").live("mouseout",function(){joms.jQuery(this).parent().find("img:eq(1)").fadeIn(0)}))},initialize:function(a,b,c,d){joms.map.execute(function(){"undefined"==typeof google.maps?setTimeout("joms.maps.initialize('"+a+"', '"+b+"')",1e3):(joms.maps.geocoder=new google.maps.Geocoder,joms.maps.geocoder.geocode({address:b},function(b,e){if(e==google.maps.GeocoderStatus.OK){null==joms.maps.mapsObj&&(joms.maps.mapsObj=new Array); var f=new google.maps.LatLng(-34.397,150.644),g={zoom:14,center:f,mapTypeId:google.maps.MapTypeId.ROADMAP},h=joms.maps.mapsObj.length;joms.maps.mapsObj[h]=new google.maps.Map(document.getElementById(a),g),joms.maps.mapsObj[h].setCenter(b[0].geometry.location);var i=new google.maps.Marker({map:joms.maps.mapsObj[h],position:b[0].geometry.location,title:c});if(d.length>0){var j=new google.maps.InfoWindow({content:d});google.maps.event.addListener(i,"click",function(){var b=joms.jQuery("div#"+a).data("maps");j.open(joms.maps.mapsObj[b],i)})}joms.jQuery("div#"+a).data("maps",h)}else alert("Geocode was not successful for the following reason: "+e)}))})},addMarker:function(a,b,c,d,e){joms.map.execute(function(){if(null==joms.maps.mapsObj)setTimeout("joms.maps.addMarker('"+a+"', "+b+", "+c+", '"+d+"', '"+e+"')",1e3);else{var f=joms.jQuery("div#"+a).data("maps"),g=new google.maps.LatLng(b,c),h=new google.maps.Marker({position:g,map:joms.maps.mapsObj[f],title:d});if(e.length>0){var i=new google.maps.InfoWindow({content:e});google.maps.event.addListener(h,"click",function(){var b=joms.jQuery("div#"+a).data("maps");i.open(joms.maps.mapsObj[b],h)})}}})}},connect:{checkRealname:function(a){var b=jax.loadingFunction;jax.loadingFunction=function(){},jax.doneLoadingFunction=function(){jax.loadingFunction=b},jax.call("community","connect,ajaxCheckName",a)},checkEmail:function(a){var b=jax.loadingFunction;jax.loadingFunction=function(){},jax.doneLoadingFunction=function(){jax.loadingFunction=b},jax.call("community","connect,ajaxCheckEmail",a)},checkUsername:function(a){var b=jax.loadingFunction;jax.loadingFunction=function(){},jax.doneLoadingFunction=function(){jax.loadingFunction=b},jax.call("community","connect,ajaxCheckUsername",a)},update:function(){var a="jax.call('community', 'connect,ajaxUpdate' );";cWindowShow(a,"",450,200)},updateEmail:function(){joms.jQuery("#facebook-email-update").submit()},importData:function(){var a=joms.jQuery("#importstatus").is(":checked")?1:0,b=joms.jQuery("#importavatar").is(":checked")?1:0;jax.call("community","connect,ajaxImportData",a,b)},mergeNotice:function(){var a="jax.call('community','connect,ajaxMergeNotice');";cWindowShow(a,"",450,200)},merge:function(){var a="jax.call('community','connect,ajaxMerge');";cWindowShow(a,"",450,200)},validateUser:function(){var a="jax.call('community','connect,ajaxValidateLogin','"+joms.jQuery("#existingusername").val()+"','"+joms.jQuery("#existingpassword").val()+"');";cWindowShow(a,"",450,200)},newUser:function(){var a="jax.call('community','connect,ajaxShowNewUserForm');";cWindowShow(a,"",450,200)},existingUser:function(){var a="jax.call('community','connect,ajaxShowExistingUserForm');";cWindowShow(a,"",450,200)},selectType:function(){if("1"==joms.jQuery("[name=membertype]:checked").val()){{joms.jQuery("#tnc:checked").val()}if(0==joms.jQuery("#tnc:checked").length&&1==joms.jQuery("#tnc").length)return joms.jQuery("span#err_msg").css("display","block"),!1;joms.connect.newUser()}else joms.connect.existingUser()},validateNewAccount:function(){jax.call("community","connect,ajaxCheckEmail",joms.jQuery("#newemail").val()),jax.call("community","connect,ajaxCheckUsername",joms.jQuery("#newusername").val()),jax.call("community","connect,ajaxCheckName",joms.jQuery("#newname").val());var a=!0;if((""==joms.jQuery("#newname").val()||"none"!=joms.jQuery("#error-newname").css("display"))&&(a=!1),(""==joms.jQuery("#newusername").val()||"none"!=joms.jQuery("#error-newusername").css("display"))&&(a=!1),(""==joms.jQuery("#newemail").val()||"none"!=joms.jQuery("#error-newemail").css("display"))&&(a=!1),joms.jQuery(".jsProfileType").length>0&&0==joms.jQuery(".jsProfileType input:checked").length&&(jax.call("community","connect,ajaxCheckProfileType"),a=!1),a){var b="";joms.jQuery(".jsProfileType").length>0&&joms.jQuery(".jsProfileType input").length>0&&(b=joms.jQuery(".jsProfileType input:checked").length>0?joms.jQuery(".jsProfileType input:checked").val():b);var c="jax.call('community', 'connect,ajaxCreateNewAccount' , '"+joms.jQuery("#newname").val()+"', '"+joms.jQuery("#newusername").val()+"','"+joms.jQuery("#newemail").val()+"','"+b+"');";cWindowShow(c,"",450,200)}}},videos:{playProfileVideo:function(a,b){var c="jax.call('community', 'profile,ajaxPlayProfileVideo', "+a+", "+b+")";cWindowShow(c,"",640,360)},linkConfirmProfileVideo:function(a){var b="jax.call('community', 'profile,ajaxConfirmLinkProfileVideo', '"+a+"');";cWindowShow(b,"",450,100)},linkProfileVideo:function(a){var b="jax.call('community', 'profile,ajaxLinkProfileVideo', '"+a+"');";cWindowShow(b,"",450,100)},removeConfirmProfileVideo:function(a,b){var c="jax.call('community', 'profile,ajaxRemoveConfirmLinkProfileVideo', '"+a+"', '"+b+"');";cWindowShow(c,"",450,100)},removeLinkProfileVideo:function(a,b){var c="jax.call('community', 'profile,ajaxRemoveLinkProfileVideo', '"+a+"', '"+b+"');";cWindowShow(c,"",450,100)},showEditWindow:function(a,b){"undefined"==typeof b&&(b="");var c="jax.call('community', 'videos,ajaxEditVideo', '"+a+"' , '"+b+"');";cWindowShow(c,"",450,400)},deleteVideo:function(a,b,c){var d="jax.call('community' , 'videos,ajaxRemoveVideo', '"+a+"','"+b+"','"+c+"');";cWindowShow(d,"",450,150)},playerConf:{},addVideo:function(a,b){if("undefined"==typeof a||""==a)var a="",b="";var c="jax.call('community', 'videos,ajaxAddVideo', '"+a+"', '"+b+"');";cWindowShow(c,"",600,500)},linkVideo:function(a,b){var c="jax.call('community', 'videos,ajaxLinkVideo', '"+a+"', '"+b+"');";cWindowShow(c,"",450,100)},uploadVideo:function(a,b){var c="jax.call('community', 'videos,ajaxUploadVideo', '"+a+"', '"+b+"');";cWindowShow(c,"",450,100)},submitLinkVideo:function(){var a=!0,b=joms.jQuery("#linkVideo input[name=videoLinkUrl]");joms.jQuery.trim(b.val())?(b.removeClass("invalid"),b.siblings("#videoLinkUrlError").hide()):(b.addClass("invalid"),b.siblings("#videoLinkUrlError").show(),a=!1);var c=joms.jQuery("#linkVideo select[name=category_id]");c.val()?(c.removeClass("invalid"),c.siblings("#videoCategoryError").hide()):(c.addClass("invalid"),c.siblings("#videoCategoryError").show(),a=!1),a&&(joms.jQuery("#cwin-wait").css("margin-left","20px"),joms.jQuery("#cwin-wait").show(),document.linkVideo.submit())},submitUploadVideo:function(){var a=!0,b=joms.jQuery("#uploadVideo input[name=videoFile]");joms.jQuery.trim(b.val())?b.removeClass("invalid"):(b.addClass("invalid"),a=!1);var c=joms.jQuery("#uploadVideo input[name=title]");joms.jQuery.trim(c.val())?(c.removeClass("invalid"),c.siblings("#videoTitleError").hide()):(c.addClass("invalid"),c.siblings("#videoTitleError").show(),a=!1);var d=joms.jQuery("#uploadVideo select[name=category_id]");d.val()?(d.removeClass("invalid"),d.siblings("#videoCategoryError").hide()):(d.addClass("invalid"),d.siblings("#videoCategoryError").show(),a=!1),a&&(joms.jQuery("#cwin-wait").css("margin-left","20px"),joms.jQuery("#cwin-wait").show(),document.uploadVideo.submit())},fetchThumbnail:function(a){var b="jax.call('community' , 'videos,ajaxFetchThumbnail', '"+a+"','myvideos');";cWindowShow(b,"",450,150)},toggleSearchSubmenu:function(a){joms.jQuery(a).next("ul").toggle().find("input[type=text]").focus()},selectVideoTagFriends:function(a){joms.jQuery("#community-invited-list li").each(function(){var b=joms.jQuery(this).attr("id");b=b.substr("invitation-friend-".length),jax.call("community","videos,ajaxAddVideoTag",a,b)}),joms.jQuery(".invitation-check label").empty(),cWindowHide()},addVideoTextTag:function(tags,textRemove){var videoTextTags=joms.jQuery(".videoTextTags");"string"==typeof tags&&(tags=eval("("+tags+")"));var singleTag=!1;joms.jQuery.isArray(tags)||(tags=[tags],singleTag=!0),joms.jQuery.each(tags,function(a,b){if(void 0!=b.id){var c=joms.jQuery('');c.data("tag",b).attr("id","videoTextTag-"+b.id).appendTo(videoTextTags);var d=joms.jQuery("
");if(d.attr("href",b.profileUrl).html(b.displayName).prependTo(c),b.canRemove){var e=joms.jQuery('');e.appendTo(c);var f=joms.jQuery('');f.addClass("_remove").html(textRemove).click(function(){joms.videos.removeVideoTag(b)}).appendTo(e),e.before(" ").prepend("(").append(")")}}}),joms.videos.commifyTextTags()},removeVideoTag:function(a){jax.call("community","videos,ajaxRemoveVideoTag",a.videoId,a.userId),void 0==a?joms.jQuery(".videoTextTags").remove():joms.jQuery("#videoTextTag-"+a.id).remove(),joms.videos.commifyTextTags()},commifyTextTags:function(){joms.jQuery(".videoTextTags .comma").remove(),videoTextTag=joms.jQuery(".videoTextTag"),videoTextTag.each(function(a){if(0!=a){var b=joms.jQuery('');b.html(", ").prependTo(this)}})},checkSize:function(a){return joms.jQuery("form#uploadVideo button").prop("disabled",!0),joms.jQuery.browser.msie?(joms.jQuery("form#uploadVideo button").prop("disabled",!1),!1):(Size=a.files[0].size,void jax.call("community","videos,ajaxCheckFileSize",Size))}},users:{banUser:function(a,b){var c="jax.call('community', 'profile,ajaxBanUser', '"+a+"' , '"+b+"');";cWindowShow(c,"",450,100)},removePicture:function(a){var b="jax.call('community', 'profile,ajaxRemovePicture', '"+a+"');";cWindowShow(b,"",450,100)},updateURL:function(a){var b="jax.call('community', 'profile,ajaxUpdateURL', '"+a+"');";cWindowShow(b,"",450,100)},uploadNewPicture:function(a){var b="jax.call('community', 'profile,ajaxUploadNewPicture', '"+a+"');";cWindowShow(b,"",450,100)},confirmBlockUser:function(a){var b='jax.call("community", "profile,ajaxConfirmBlockUser", "'+a+'");';cWindowShow(b,"",450,100)},blockUser:function(a){var b='jax.call("community", "profile,ajaxBlockUser", "'+a+'");';cWindowShow(b,"",450,100)},confirmUnBlockUser:function(a){var b='jax.call("community", "profile,ajaxConfirmUnBlockUser", "'+a+'");';cWindowShow(b,"",450,100)},unBlockUser:function(a,b){b=b||null;var c='jax.call("community", "profile,ajaxUnblockUser", "'+a+'", "'+b+'");';cWindowShow(c,"",450,100)},confirmIgnoreUser:function(a){var b='jax.call("community", "profile,ajaxConfirmIgnoreUser", "'+a+'");';cWindowShow(b,"",450,100)},ignoreUser:function(a){var b='jax.call("community", "profile,ajaxIgnoreUser", "'+a+'");';cWindowShow(b,"",450,100)},confirmUnIgnoreUser:function(a){var b='jax.call("community", "profile,ajaxConfirmUnIgnoreUser", "'+a+'");';cWindowShow(b,"",450,100)},unIgnoreUser:function(a){var b='jax.call("community", "profile,ajaxUnIgnoreUser", "'+a+'");';cWindowShow(b,"",450,100)},removeCover:function(a){var b="jax.call('community', 'profile,ajaxRemoveCover', '"+a+"');";cWindowShow(b,"",450,100)}},user:{getActive:function(){return js_profileId}},events:{deleteEvent:function(a){var b="jax.call('community', 'events,ajaxWarnEventDeletion', '"+a+"');";cWindowShow(b,"",450,100,"warning")},join:function(a){var b='jax.call("community", "events,ajaxRequestInvite", "'+a+'", location.href );';cWindowShow(b,"",450,100)},leave:function(a){var b='jax.call("community", "events,ajaxIgnoreEvent", "'+a+'");';cWindowShow(b,"",450,100)},sendmail:function(a){var b='jax.call("community", "events,ajaxSendEmail", "'+a+'");';cWindowShow(b,"",450,300)},confirmBlockGuest:function(a,b){var c='jax.call("community", "events,ajaxConfirmBlockGuest", "'+a+'", "'+b+'");';cWindowShow(c,"",450,100)},blockGuest:function(a,b){var c='jax.call("community", "events,ajaxBlockGuest", "'+a+'", "'+b+'");';cWindowShow(c,"",450,100)},confirmUnblockGuest:function(a,b){var c='jax.call("community", "events,ajaxConfirmUnblockGuest", "'+a+'", "'+b+'");';cWindowShow(c,"",450,100)},unblockGuest:function(a,b){var c='jax.call("community", "events,ajaxUnblockGuest", "'+a+'", "'+b+'");';cWindowShow(c,"",450,100)},confirmRemoveGuest:function(a,b){var c='jax.call("community", "events,ajaxConfirmRemoveGuest", "'+a+'", "'+b+'");';cWindowShow(c,"",450,80,"warning")},removeGuest:function(a,b){var c=joms.jQuery("#cWindow input[name=block]").attr("checked"),d="";d=c?'jax.call("community", "events,ajaxBlockGuest", "'+a+'", "'+b+'");':'jax.call("community", "events,ajaxRemoveGuest", "'+a+'", "'+b+'");',cWindowShow(d,"",450,100,"warning")},joinNow:function(a){jax.call("community","events,ajaxJoinInvitation",a)},rejectNow:function(a){jax.call("community","events,ajaxRejectInvitation",a)},toggleSearchSubmenu:function(a){joms.jQuery(a).next("ul").toggle().find("input[type=text]").focus()},displayNearbyEvents:function(a){joms.ajax.call("events,ajaxDisplayNearbyEvents",[a],{success:function(a){joms.jQuery("#community-event-nearby-listing").html(a)}})},getDayEvent:function(a,b,c,d){jax.loadingFunction=function(){joms.jQuery(".loading-icon").show()},jax.doneLoadingFunction=function(){joms.jQuery(".loading-icon").hide()},jax.cacheCall("community","events,ajaxGetEvents",a,b,c,d)},displayDayEvent:function(response){joms.jQuery(".events-list").html("");var day_event=eval("("+response+")");day_event.length>0?joms.jQuery("strong.happening_title").show():joms.jQuery("strong.happening_title").hide();for(var i=0;i '+day_event[i].title+""),joms.jQuery('a[class^="date_day_"]').mouseenter(function(){for(var a=joms.jQuery(this).attr("class").split("_"),b=a[2],c=parseInt(a[3])+1,d=b;c>d;d++)joms.jQuery(".event_date_"+d).addClass("highlightrunning")}),joms.jQuery('a[class^="date_day_"]').mouseleave(function(){joms.jQuery(".highlightrunning").removeClass("highlightrunning")}),i+1!=day_event.length&&joms.jQuery(".events-list").html(joms.jQuery(".events-list").html())}},getCalendar:function(a,b){jax.cacheCall("community","events,ajaxGetCalendar",a,b)},displayCalendar:function(a){joms.jQuery("div#event").html(a),init_calendar()},switchImport:function(a){"file"==a&&(joms.jQuery("#event-import-url").css("display","none"),joms.jQuery("#event-import-file").css("display","block"),joms.jQuery("#import-type").val("file")),"url"==a&&(joms.jQuery("#event-import-file").css("display","none"),joms.jQuery("#event-import-url").css("display","block"),joms.jQuery("#import-type").val("url"))},showMapWindow:function(){var a='jax.call("community", "events,ajaxShowMap");';cWindowShow(a,"",450,100)},showDesc:function(){joms.jQuery("#event-discription").show(),joms.jQuery("#event-description-link").hide()},submitRSVP:function(a,b){var c=joms.jQuery(b),d=c.parent(),e=c.prev("span"),f=(c.val(),c.attr("class"),c.find("option:selected").text());return joms.events.submitRSVP.processing?!1:(d.append('
'),void setTimeout(function(){e.html("Processing..."),e.removeAttr("class"),joms.events.submitRSVP.processing=!0,joms.ajax.call("events,ajaxUpdateStatus",[a,c.val()],{success:function(a){joms.events.submitRSVP.processing=!1,joms.jQuery("#community-event-members").replaceWith(a),e.attr("class",c.find("option:selected").attr("class")),e.html(f),d.children(".noclick").remove()}})},100))},save:function(){var a="jax.call('community', 'events,ajaxShowRepeatOption');";cWindowShow(a,"",450,100)},uploadAvatar:function(a,b,c){var d=null;c&&(d='{"call":["CEvents","getEventRepeatSaveHTML"], "library":"events", "arg":{"radio":"repeattype"}}');var e=jax.call("community","photos,ajaxUploadAvatar",a,b,d);cWindowShow(e,"",450,100)}},profile:{confirmRemoveAvatar:function(){var a='jax.call("community", "profile,ajaxConfirmRemoveAvatar");';cWindowShow(a,"",450,100)},setStatusLimit:function(a){joms.jQuery(a).keyup(function(){var a=parseInt(joms.jQuery(this).attr("maxlength"));joms.jQuery(this).val().length>a&&joms.jQuery(this).val(joms.jQuery(this).val().substr(0,joms.jQuery(this).attr("maxlength"))),joms.jQuery("#profile-status-notice span").html(a-joms.jQuery(this).val().length)})}},privacy:{init:function(){joms.jQuery("select.js_PrivacySelect").each(function(){var a,b="";joms.jQuery(this).find("option").each(function(){joms.jQuery(this).attr("selected")&&(a=joms.jQuery(this).val())}),b+="
\n",b+="
"+joms.jQuery(this).find('option[selected="selected"]').text()+"
\n",b+="
\n\n
\n
",joms.jQuery(this).parent().prepend(b),joms.jQuery(this).hide()}),joms.jQuery(".js_dropDownChild").die("click touchstart"),joms.jQuery(".js_dropDownChild").live("click touchstart",function(a){a.preventDefault();var b=joms.jQuery(this).attr("name"),c="";joms.jQuery(this).closest(".js_PriContainer").find("option").each(function(){joms.jQuery(this).val()==b?(joms.jQuery(this).attr("selected","selected"),c=joms.jQuery(this).text()):joms.jQuery(this).attr("selected",!1)});var d=joms.jQuery(this).parent().parent().parent().parent().find("dt"),e=d.attr("name");d.removeClass("js_dropSelect-"+e).addClass("js_dropSelect-"+b).attr("name",b).html(""+c+""),joms.privacy.closeAll()}),joms.jQuery(".js_dropDownMaster dt").die("click touchstart"),joms.jQuery(".js_dropDownMaster dt").live("click touchstart",function(a){a.preventDefault(),joms.jQuery(this).parent().data("state")?(joms.privacy.closeAll(),joms.jQuery("body").unbind("click")):(joms.privacy.closeAll(),joms.jQuery(this).parent().parent().addClass("js_PrivacyOpen"),joms.jQuery(this).parent().data("state",1).addClass("js_Current").find("dd").show(),joms.jQuery("body").bind("click",function(a){var b=joms.jQuery(a.target);0==b.parents(".js_PriContainer").length&&joms.privacy.closeAll()}))})},closeAll:function(){joms.jQuery(".js_PriContainer").removeClass("js_PrivacyOpen"),joms.jQuery(".js_dropDownMaster").each(function(){joms.jQuery(this).data("state",0).removeClass("js_Current").find("dd").hide()})}},tooltip:{setup:function(){joms.jQuery(".jomNameTips").tipsy({live:!0,gravity:"sw"}),joms.jQuery(".qtip-active").hide(),setTimeout("joms.jQuery('.qtip-active').hide()",150);try{clearTimeout(joms.jQuery.fn.qtip.timers.show)}catch(a){}return joms.jQuery(".jomTips").each(function(){var a="tipNormal",b=220,c={corner:{target:"topMiddle",tooltip:"bottomMiddle"}},d={when:{event:"mouseout"},effect:{length:10}};joms.jQuery(this).hasClass("tipRight")&&(a="tipRight",b=320,c={corner:{target:"rightMiddle",tooltip:"leftMiddle"}}),joms.jQuery(this).hasClass("tipWide")&&(b=420),joms.jQuery(this).hasClass("tipFullWidth")&&(b=joms.jQuery(this).innerWidth()-20);var e="",f=joms.jQuery(this).attr("title"),g="";f&&(g=f.split("::")),joms.jQuery(this).attr("title",""),2==g.length?(f=g[1],e={text:g[0]}):e=e={text:""},joms.jQuery(this).qtip({content:{text:f,title:e},style:{name:a,width:b},position:c,hide:d,show:{solo:!0,effect:{length:50}}}).removeClass("jomTips")}),!0},setStyle:function(){return joms.jQuery.fn.qtip.styles.tipNormal={width:320,border:{width:7,radius:5},tip:!0,name:"dark"},joms.jQuery.fn.qtip.styles.tipRight={tip:"leftMiddle",name:"tipNormal"},!0}},like:{init:function(){joms.jQuery('a[href="#like"]').live("click",function(){var a=joms.jQuery(this).parents("li.stream").data("streamid");return jax.call("community","system,ajaxStreamAddLike",a),!1}),joms.jQuery('a[href="#unlike"]').live("click",function(){var a=joms.jQuery(this).parents("li.stream").data("streamid");return jax.call("community","system,ajaxStreamUnlike",a),!1})},extractData:function(a){a=a.split("-");var b=[];return b.element=a[1],b.itemid=a[2],b.element=b.element.replace("_","."),b},like:function(a){var b=joms.jQuery(a).parents(".like-snippet"),c=this.extractData(b.attr("id"));joms.jQuery(a).unbind("onclick"),joms.ajax.call("system,ajaxLike",[c.element,c.itemid],{success:function(a){b.replaceWith(a)}})},newLike:function(a){var b=joms.jQuery(a).parent(),c=this.extractData(b.attr("id"));joms.jQuery(a).unbind("onclick");var d=joms.jQuery(joms.jQuery(a).children()[1]).html();joms.ajax.call("system,ajaxLike",[c.element,c.itemid],{success:function(){d=parseInt(d)+1,joms.jQuery(a).addClass("js-focus-like"),joms.jQuery(a).attr("onclick","joms.like.newDislike(this)"),joms.jQuery(joms.jQuery(a).children()[1]).html(d)}})},newDislike:function(a){var b=joms.jQuery(a).parent(),c=this.extractData(b.attr("id"));joms.jQuery(a).unbind("onclick");var d=joms.jQuery(joms.jQuery(a).children()[1]).html();joms.ajax.call("system,ajaxDislike",[c.element,c.itemid],{success:function(){d=parseInt(d)-1,joms.jQuery(a).removeClass("js-focus-like"),joms.jQuery(a).attr("onclick","joms.like.newLike(this)"),joms.jQuery(joms.jQuery(a).children()[1]).html(d)}})},dislike:function(a){var b=joms.jQuery(a).parents(".like-snippet"),c=this.extractData(b.attr("id"));joms.jQuery(a).unbind("onclick"),joms.ajax.call("system,ajaxDislike",[c.element,c.itemid],{success:function(a){b.replaceWith(a)}})},unlike:function(a){var b=joms.jQuery(a).parents(".like-snippet"),c=this.extractData(b.attr("id"));joms.jQuery(a).unbind("onclick"),joms.ajax.call("system,ajaxUnlike",[c.element,c.itemid],{success:function(a){b.replaceWith(a)}})}},tag:{add:function(a,b){jax.call("community","system,ajaxAddTag",a,b,joms.jQuery("#tag-addbox").val())},pick:function(a,b,c){jax.call("community","system,ajaxAddTag",a,b,c)},remove:function(a){jax.call("community","system,ajaxRemoveTag",a)},moreHide:function(){joms.jQuery("#tag-list li").each(function(a,b){a>8&&joms.jQuery(b).hide()}),joms.jQuery(".more-tag-show").show(),joms.jQuery(".more-tag-hide").hide()},moreShow:function(){joms.jQuery("#tag-list li").each(function(a,b){a>8&&joms.jQuery(b).show()}),joms.jQuery(".more-tag-show").hide(),joms.jQuery(".more-tag-hide").show()},toggleMore:function(){joms.jQuery("#tag-list li").each(function(a,b){a>8&&joms.jQuery(b).toggle()})},list:function(a){var b="jax.call('community', 'system,ajaxShowTagged', '"+a+"');";cWindowShow(b,"",450,100)},edit:function(a,b){joms.tag.moreShow(a,b);var c=a+"-"+b;joms.jQuery("#tag-editor.tag-editor-"+c+",.tag-token a.tag-delete").show()},done:function(a,b){joms.tag.moreHide(a,b);var c=a+"-"+b;joms.jQuery("#tag-editor.tag-editor-"+c+",.tag-token a.tag-delete").hide()}},geolocation:{showNearByEvents:function(a){joms.map.execute(function(){joms.jQuery("#community-event-nearby-listing").show(),joms.jQuery("#showNearByEventsLoading").show(),"undefined"==typeof a?navigator.geolocation?navigator.geolocation.getCurrentPosition(function(a){var b=a.coords.latitude,c=a.coords.longitude;geocoder=new google.maps.Geocoder;var d=new google.maps.LatLng(b,c);geocoder.geocode({latLng:d},function(b,c){c==google.maps.GeocoderStatus.OK?b[4]&&(a=b[4].formatted_address,joms.geolocation.setCookie("currentLocation",a),joms.events.displayNearbyEvents(a)):alert("Geocoder failed due to: "+c)})}):(alert("Sorry, your browser does not support this feature."),joms.jQuery("#community-event-nearby-listing").hide(),joms.jQuery("#showNearByEventsLoading").hide()):joms.events.displayNearbyEvents(a)})},validateNearByEventsForm:function(){var a=joms.jQuery("#userInputLocation").val();0!=a.length&&joms.geolocation.showNearByEvents(a)},setCookie:function(a,b){var c=new Date;c.setTime(c.getTime()+36e5),document.cookie=a+"="+escape(b)+";expires="+c},getCookie:function(a){return document.cookie.length>0&&(c_start=document.cookie.indexOf(a+"="),-1!=c_start)?(c_start=c_start+a.length+1,c_end=document.cookie.indexOf(";",c_start),-1==c_end&&(c_end=document.cookie.length),unescape(document.cookie.substring(c_start,c_end))):""}},file:{showFileUpload:function(a,b){var c='jax.call("community", "files,ajaxFileUploadForm","'+a+'",'+b+")";cWindowShow(c,"",600,400)},enableEditName:function(){joms.jQuery(".plupload_file_name span").length>0&&(joms.jQuery(".plupload_file_name span").unbind("click"),joms.jQuery(".plupload_file_name span").bind("click",function(a){joms.file.editName(a)}))},editName:function(a){joms.jQuery(".plupload_file_name span").unbind("click");var b=a.target?a.target:a.which,c=joms.jQuery(b).parent().parent().attr("id"),d='';joms.jQuery(b).html(d),joms.jQuery(b).find("input").unbind("keypress").unbind("focusout"),joms.jQuery(b).find("input").bind("keypress",function(a){keyCode=a.keyCode,13==keyCode&&(joms.file.saveName(this,joms.jQuery(this).parent()),joms.jQuery(".plupload_file_name span").bind("click",function(a){joms.file.editName(a)}))}),joms.jQuery(b).find("input").bind("focusout",function(){joms.file.saveName(this,joms.jQuery(this).parent()),joms.jQuery(".plupload_file_name span").bind("click",function(a){joms.file.editName(a)})})},saveName:function(a,b){var c=joms.jQuery(a).attr("target"),d=joms.jQuery("#html5_uploader").pluploadQueue().getFile(parseInt(c)),e=joms.jQuery(a).val();d.name=e;var f=encodeURIComponent(e);jax.call("community","files,ajaxSaveName",d.id,f),joms.jQuery(b).html(e)},ajaxDeleteFile:function(a,b){jax.call("community","files,ajaxDeleteFile",a,b)},ajaxUploadFile:function(a,b,c){var d=!1,e=joms.file.___uploader=joms.jQuery("#html5_uploader").pluploadQueue({runtimes:"html5,html4",url:a,max_file_size:c+"mb",chunk_size:c+"mb",unique_names:!0,filters:[{title:"Media files",extensions:b}],preinit:{FileUploaded:function(a,b,c){try{var d=joms.jQuery.parseJSON(c.response)}catch(e){joms.jQuery("#html5_uploader").pluploadQueue().stop()}var f=joms.jQuery("#html5_uploader").pluploadQueue().getFile(b.id);f.id=d.id,"undefined"!=typeof d.msg&&(joms.jQuery("#html5_uploader").pluploadQueue().stop(),joms.jQuery("#cWindowContent").prepend(""+d.msg+" "))},UploadComplete:function(){setTimeout("joms.file.enableEditName();",1e3),d=!0,joms.jQuery("#upload-footer").show(),cWindowResize(),joms.jQuery("a.add-more").click(function(){joms.jQuery("#html5_uploader").pluploadQueue().splice(),joms.jQuery(".plupload_buttons").show(),joms.jQuery(".plupload_file_status").hide(),joms.jQuery("div#upload-footer").hide(),cWindowResize()})}}});"html4"==e.pluploadQueue().runtime&&joms.file.ieUploadButtonFix(),joms.jQuery(".plupload_header").remove(),joms.jQuery("span.plupload_upload_status").remove(),joms.jQuery("input:file").parent().css("top","245px"),joms.jQuery("#cwin_close_btn").click(function(){d&&window.location.reload()})},ieUploadButtonFix:function(){var a=joms.file.___uploader;if(a){var b=a.find(".plupload_add"),c=a.find("form"),d=c.find("input[type=file]");if(b.length&&d.length){b.wrap("");var e=b.parent();e.css({display:"inline-block",position:"relative",overflow:"hidden"}),c.appendTo(e),setTimeout(function(){c.css({margin:0,padding:0,position:"absolute",left:0,top:0,right:"",bottom:"",width:"100%",height:"100%",overflow:"hidden"}),d.css({margin:0,padding:0,position:"absolute",width:"70px",fontSize:"30px"})},1e3)}}},viewFile:function(a,b){var c='jax.call("community", "files,ajaxviewFiles","'+a+'","'+b+'")';cWindowShow(c,"",600,400)},ajaxdownloadFile:function(a,b){var c='jax.call("community","files,ajaxFileDownload","'+a+'","'+b+'")';cWindowShow(c,"",600,200)},getFileList:function(a,b,c,d,e){joms.jQuery("#load-more-btn").html(""),jax.call("community","files,ajaxgetFileList",a,b,c,d,e)},updateFileList:function(a,b){currentFiles=joms.jQuery("#"+b).html(),newFiles=currentFiles+a,joms.jQuery("#"+b).html(newFiles)},viewMore:function(a,b){var c='jax.call("community","files,ajaxviewMore","'+a+'","'+b+'")';cWindowShow(c,"",600,200)},loadFile:function(a,b,c,d,e){joms.jQuery("#load-more-btn").html(""),jax.call("community","files,ajaxgetFileList",a,b,c,d,e)},searchFileUpdate:function(a){joms.jQuery(joms.jQuery("ul.cTabNav li.active").children().attr("href")).html(a)},startdownload:function(a){var b="dl_"+(new Date).getTime();a=a.replace("&","&"),joms.jQuery("