(function(a){a.extend({xmlToJSON:function(g){try{if(!g){return null;}var f={};f.typeOf="JSXBObject";var d=(g.nodeType==9)?g.documentElement:g;f.RootName=d.nodeName||"";if(g.nodeType==3||g.nodeType==4){return g.nodeValue;}var b=function(l){var e="";if(l&&typeof l=="string"){e=l;}var m=/^((-)?([0-9]*)((\.{0,1})([0-9]+))?$)/;return m.test(e);};function k(l){var m=/-/g;var e=String(l).replace(m,"_");return e;}function c(m,l){if(l.attributes.length>0){var e=l.attributes.length-1;var n;m._attributes=[];do{n=String(k(l.attributes[e].name));m._attributes.push(n);m[n]=a.trim(l.attributes[e].value);}while(e--);}}function j(e){e.getNodeByAttribute=function(l,p){if(this.length>0){var n;var m=this.length-1;try{do{n=this[m];if(n[l]==p){return n;}}while(m--);}catch(o){return false;}return false;}};e.contains=function(l,o){if(this.length>0){var m=this.length-1;try{do{if(this[m][l]==o){return true;}}while(m--);}catch(n){return false;}return false;}};e.indexOf=function(l,o){var p=-1;if(this.length>0){var m=this.length-1;try{do{if(this[m][l]==o){p=m;}}while(m--);}catch(n){return -1;}return p;}};e.SortByAttribute=function(n,m){if(this.length){function l(r,p){var q=r[p];q=(b(q))?parseFloat(q):q;return q;}function o(s,q){var t=0;var r,p;r=l(s,n);p=l(q,n);if(r<p){t=-1;}else{if(p<r){t=1;}}if(m){t=(m.toUpperCase()=="DESC")?(0-t):t;}return t;}this.sort(o);}};e.SortByValue=function(m){if(this.length){function l(p){var o=p.Text;o=(b(o))?parseFloat(o):o;return o;}function n(r,p){var s=0;var q,o;q=l(r);o=l(p);if(q<o){s=-1;}else{if(o<q){s=1;}}if(m){s=(m.toUpperCase()=="DESC")?(0-s):s;}return s;}this.sort(n);}};e.SortByNode=function(n,m){if(this.length){function l(r,q){var p=r[q][0].Text;p=(b(p))?parseFloat(p):p;return p;}function o(s,q){var t=0;var r,p;r=l(s,n);p=l(q,n);if(r<p){t=-1;}else{if(p<r){t=1;}}if(m){t=(m.toUpperCase()=="DESC")?(0-t):t;}return t;}this.sort(o);}};}function i(r,o){var p;var m;var q;var e="";if(!o){return null;}if(o.attributes.length>0){c(r,o);}r.Text="";if(o.hasChildNodes()){var l=o.childNodes.length-1;var s=0;do{m=o.childNodes[s];switch(m.nodeType){case 1:r._children=[];p=(m.localName)?m.localName:m.baseName;p=k(p);if(e!=p){r._children.push(p);}if(!r[p]){r[p]=[];}q={};r[p].push(q);if(m.attributes.length>0){c(q,m);}if(!r[p].contains){j(r[p]);}e=p;if(m.hasChildNodes()){i(q,m);}break;case 3:r.Text+=a.trim(m.nodeValue);break;case 4:r.Text+=(m.text)?a.trim(m.text):a.trim(m.nodeValue);break;}}while(s++<l);}}i(f,d);g=null;d=null;return f;}catch(h){return null;}}});a.extend({textToXML:function(f){var c=null;try{c=(a.browser.msie)?new ActiveXObject("Microsoft.XMLDOM"):new DOMParser();c.async=false;}catch(d){throw new Error("XML Parser could not be instantiated");}var b;try{if(a.browser.msie){b=(c.loadXML(f))?c:false;}else{b=c.parseFromString(f,"text/xml");}}catch(d){throw new Error("Error parsing XML string");}return b;}});})(jQuery);var SOAPClient={Proxy:"",SOAPServer:"",ContentType:"text/xml",CharSet:"utf-8",ResponseXML:null,ResponseText:"",Status:0,ContentLength:0,Namespace:function(a,b){return{"name":a,"uri":b};},SendRequest:function(a,d){if(!!SOAPClient.Proxy){SOAPClient.ResponseText="";SOAPClient.ResponseXML=null;SOAPClient.Status=0;var b=a.toString();SOAPClient.ContentLength=b.length;function c(f){if(!!d){SOAPClient.Status=f.status;SOAPClient.ResponseText=f.responseText;SOAPClient.ResponseXML=f.responseXML;var e=$.xmlToJSON(f.responseXML);d(e);}}$.ajax({type:"POST",url:SOAPClient.Proxy,dataType:"xml",processData:false,data:b,complete:c,contentType:SOAPClient.ContentType+'; charset="'+SOAPClient.CharSet+'"',beforeSend:function(e){e.setRequestHeader("Method","POST");e.setRequestHeader("Content-Length",SOAPClient.ContentLength);e.setRequestHeader("SOAPServer",SOAPClient.SOAPServer);e.setRequestHeader("SOAPAction",a.Action);}});}},ToXML:function(d){var b=[];var i=false;try{if(!!d&&typeof(d)==="object"&&d.typeOf==="SOAPObject"){if(!!d.ns){if(typeof(d.ns)==="object"){i=true;b.push("<"+d.ns.name+":"+d.name);b.push(" xmlns:"+d.ns.name+'="'+d.ns.uri+'"');}else{b.push("<"+d.name);b.push(' xmlns="'+d.ns+'"');}}else{b.push("<"+d.name);}if(d.attributes.length>0){var h;var a=d.attributes.length-1;do{h=d.attributes[a];if(i){b.push(" "+d.ns.name+":"+h.name+'="'+h.value+'"');}else{b.push(" "+h.name+'="'+h.value+'"');}}while(a--);}b.push(">");if(d.hasChildren()){var f,c;for(f in d.children){c=d.children[f];if(typeof(c)==="object"){b.push(SOAPClient.ToXML(c));}}}if(!!d.value){b.push(d.value);}if(i){b.push("</"+d.ns.name+":"+d.name+">");}else{b.push("</"+d.name+">");}return b.join("");}}catch(g){alert("Unable to process SOAPObject! Object must be an instance of SOAPObject");}}};var SOAPRequest=function(d,c){this.Action=d;var b=[];var e=[];var a=(!!c)?[c]:[];this.addNamespace=function(f,g){b.push(new SOAPClient.Namespace(f,g));};this.addHeader=function(f){e.push(f);};this.addBody=function(f){a.push(f);};this.toString=function(){var f=new SOAPObject("soapenv:Envelope");f.attr("xmlns:soapenv","http://schemas.xmlsoap.org/soap/envelope/");if(b.length>0){var h,j;
for(h in b){if(!b.hasOwnProperty||b.hasOwnProperty(h)){j=b[h];if(typeof(j)==="object"){f.attr("xmlns:"+j.name,j.uri);}}}}if(e.length>0){var l=f.appendChild(new SOAPObject("soapenv:Header"));var k;for(k in e){if(!e.hasOwnProperty||e.hasOwnProperty(k)){l.appendChild(e[k]);}}}if(a.length>0){var i=f.appendChild(new SOAPObject("soapenv:Body"));var g;for(g in a){if(!a.hasOwnProperty||a.hasOwnProperty(g)){i.appendChild(a[g]);}}}return f.toString();};};var SOAPObject=function(a){this.typeOf="SOAPObject";this.ns=null;this.name=a;this.attributes=[];this.children=[];this.value=null;this.attr=function(b,c){this.attributes.push({"name":b,"value":c});return this;};this.appendChild=function(b){this.children.push(b);return b;};this.hasChildren=function(){return(this.children.length>0)?true:false;};this.val=function(b){if(!b){return this.value;}else{this.value=b;return this;}};this.toString=function(){return SOAPClient.ToXML(this);};};
/* Copyright (c) 2010 Brandon Aaron (http://brandonaaron.net)
 * Licensed under the MIT License (LICENSE.txt).
 *
 * Version 2.1.2
 */
(function(a){a.fn.bgiframe=(a.browser.msie&&/msie 6\.0/i.test(navigator.userAgent)?function(d){d=a.extend({top:"auto",left:"auto",width:"auto",height:"auto",opacity:true,src:"javascript:false;"},d);var c='<iframe class="bgiframe"frameborder="0"tabindex="-1"src="'+d.src+'"'+'style="display:block;position:absolute;z-index:-1;'+(d.opacity!==false?"filter:Alpha(Opacity='0');":"")+"top:"+(d.top=="auto"?"expression(((parseInt(this.parentNode.currentStyle.borderTopWidth)||0)*-1)+'px')":b(d.top))+";"+"left:"+(d.left=="auto"?"expression(((parseInt(this.parentNode.currentStyle.borderLeftWidth)||0)*-1)+'px')":b(d.left))+";"+"width:"+(d.width=="auto"?"expression(this.parentNode.offsetWidth+'px')":b(d.width))+";"+"height:"+(d.height=="auto"?"expression(this.parentNode.offsetHeight+'px')":b(d.height))+";"+'"/>';return this.each(function(){if(a(this).children("iframe.bgiframe").length===0){this.insertBefore(document.createElement(c),this.firstChild);}});}:function(){return this;});a.fn.bgIframe=a.fn.bgiframe;function b(c){return c&&c.constructor===Number?c+"px":c;}})(jQuery);(function(c){var a=["DOMMouseScroll","mousewheel"];c.event.special.mousewheel={setup:function(){if(this.addEventListener){for(var d=a.length;d;){this.addEventListener(a[--d],b,false);}}else{this.onmousewheel=b;}},teardown:function(){if(this.removeEventListener){for(var d=a.length;d;){this.removeEventListener(a[--d],b,false);}}else{this.onmousewheel=null;}}};c.fn.extend({mousewheel:function(d){return d?this.bind("mousewheel",d):this.trigger("mousewheel");},unmousewheel:function(d){return this.unbind("mousewheel",d);}});function b(f){var d=[].slice.call(arguments,1),g=0,e=true;f=c.event.fix(f||window.event);f.type="mousewheel";if(f.wheelDelta){g=f.wheelDelta/120;}if(f.detail){g=-f.detail/3;}d.unshift(f,g);return c.event.handle.apply(this,d);}})(jQuery);(function(g){if(/1\.(0|1|2)\.(0|1|2)/.test(g.fn.jquery)||/^1.1/.test(g.fn.jquery)){alert("blockUI requires jQuery v1.2.3 or later!  You are using v"+g.fn.jquery);return;}g.fn._fadeIn=g.fn.fadeIn;var i=document.documentMode||0;var d=g.browser.msie&&((g.browser.version<8&&!i)||i<8);var e=g.browser.msie&&/MSIE 6.0/.test(navigator.userAgent)&&!i;g.blockUI=function(o){c(window,o);};g.unblockUI=function(o){h(window,o);};g.growlUI=function(s,q,r,o){var p=g('<div class="growlUI"></div>');if(s){p.append("<h1>"+s+"</h1>");}if(q){p.append("<h2>"+q+"</h2>");}if(r==undefined){r=3000;}g.blockUI({message:p,fadeIn:700,fadeOut:1000,centerY:false,timeout:r,showOverlay:false,onUnblock:o,css:g.blockUI.defaults.growlCSS});};g.fn.block=function(o){return this.unblock({fadeOut:0}).each(function(){if(g.css(this,"position")=="static"){this.style.position="relative";}if(g.browser.msie){this.style.zoom=1;}c(this,o);});};g.fn.unblock=function(o){return this.each(function(){h(this,o);});};g.blockUI.version=2.23;g.blockUI.defaults={message:"<h1>Please wait...</h1>",css:{padding:0,margin:0,width:"30%",top:"40%",left:"35%",textAlign:"center",color:"#000",border:"3px solid #aaa",backgroundColor:"#fff",cursor:"wait"},overlayCSS:{backgroundColor:"#000",opacity:0.6,cursor:"wait"},growlCSS:{width:"350px",top:"10px",left:"",right:"10px",border:"none",padding:"5px",opacity:0.6,cursor:null,color:"#fff",backgroundColor:"#000","-webkit-border-radius":"10px","-moz-border-radius":"10px"},iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank",forceIframe:false,baseZ:1000,centerX:true,centerY:true,allowBodyStretch:true,bindEvents:true,constrainTabKey:true,fadeIn:200,fadeOut:400,timeout:0,showOverlay:true,focusInput:true,applyPlatformOpacityRules:true,onUnblock:null,quirksmodeOffsetHack:4};var b=null;var f=[];function c(q,o){var B=(q==window);var r=o&&o.message!==undefined?o.message:undefined;o=g.extend({},g.blockUI.defaults,o||{});o.overlayCSS=g.extend({},g.blockUI.defaults.overlayCSS,o.overlayCSS||{});var A=g.extend({},g.blockUI.defaults.css,o.css||{});r=r===undefined?o.message:r;
if(B&&b){h(window,{fadeOut:0});}if(r&&typeof r!="string"&&(r.parentNode||r.jquery)){var u=r.jquery?r[0]:r;var y={};g(q).data("blockUI.history",y);y.el=u;y.parent=u.parentNode;y.display=u.style.display;y.position=u.style.position;if(y.parent){y.parent.removeChild(u);}}var C=o.baseZ;var x=(g.browser.msie||o.forceIframe)?g('<iframe class="blockUI" style="z-index:'+(C++)+';display:none;border:none;margin:0;padding:0;position:absolute;width:100%;height:100%;top:0;left:0" src="'+o.iframeSrc+'"></iframe>'):g('<div class="blockUI" style="display:none"></div>');var w=g('<div class="blockUI blockOverlay" style="z-index:'+(C++)+';display:none;border:none;margin:0;padding:0;width:100%;height:100%;top:0;left:0"></div>');var s=B?g('<div class="blockUI blockMsg blockPage" style="z-index:'+C+';display:none;position:fixed"></div>'):g('<div class="blockUI blockMsg blockElement" style="z-index:'+C+';display:none;position:absolute"></div>');if(r){s.css(A);}if(!o.applyPlatformOpacityRules||!(g.browser.mozilla&&/Linux/.test(navigator.platform))){w.css(o.overlayCSS);}w.css("position",B?"fixed":"absolute");if(g.browser.msie||o.forceIframe){x.css("opacity",0);}g([x[0],w[0],s[0]]).appendTo(B?"body":q);var F=d&&(!g.boxModel||g("object,embed",B?null:q).length>0);if(e||F){if(B&&o.allowBodyStretch&&g.boxModel){g("html,body").css("height","100%");}if((e||!g.boxModel)&&!B){var G=l(q,"borderTopWidth"),v=l(q,"borderLeftWidth");var E=G?"(0 - "+G+")":0;var p=v?"(0 - "+v+")":0;}g.each([x,w,s],function(t,J){var z=J[0].style;z.position="absolute";if(t<2){B?z.setExpression("height","Math.max(document.body.scrollHeight, document.body.offsetHeight) - (jQuery.boxModel?0:"+o.quirksmodeOffsetHack+') + "px"'):z.setExpression("height",'this.parentNode.offsetHeight + "px"');B?z.setExpression("width",'jQuery.boxModel && document.documentElement.clientWidth || document.body.clientWidth + "px"'):z.setExpression("width",'this.parentNode.offsetWidth + "px"');if(p){z.setExpression("left",p);}if(E){z.setExpression("top",E);}}else{if(o.centerY){if(B){z.setExpression("top",'(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"');}z.marginTop=0;}else{if(!o.centerY&&B){var H=(o.css&&o.css.top)?parseInt(o.css.top):0;var I="((document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "+H+') + "px"';z.setExpression("top",I);}}}});}if(r){s.append(r);if(r.jquery||r.nodeType){g(r).show();}}if((g.browser.msie||o.forceIframe)&&o.showOverlay){x.show();}if(o.fadeIn){if(o.showOverlay){w._fadeIn(o.fadeIn);}if(r){s.fadeIn(o.fadeIn);}}else{if(o.showOverlay){w.show();}if(r){s.show();}}k(1,q,o);if(B){b=s[0];f=g(":input:enabled:visible",b);if(o.focusInput){setTimeout(n,20);}}else{a(s[0],o.centerX,o.centerY);}if(o.timeout){var D=setTimeout(function(){B?g.unblockUI(o):g(q).unblock(o);},o.timeout);g(q).data("blockUI.timeout",D);}}function h(r,s){var q=r==window;var p=g(r);var t=p.data("blockUI.history");var u=p.data("blockUI.timeout");if(u){clearTimeout(u);p.removeData("blockUI.timeout");}s=g.extend({},g.blockUI.defaults,s||{});k(0,r,s);var o=q?g("body").children().filter(".blockUI"):g(".blockUI",r);if(q){b=f=null;}if(s.fadeOut){o.fadeOut(s.fadeOut);setTimeout(function(){j(o,t,s,r);},s.fadeOut);}else{j(o,t,s,r);}}function j(o,r,q,p){o.each(function(s,t){if(this.parentNode){this.parentNode.removeChild(this);}});if(r&&r.el){r.el.style.display=r.display;r.el.style.position=r.position;if(r.parent){r.parent.appendChild(r.el);}g(r.el).removeData("blockUI.history");}if(typeof q.onUnblock=="function"){q.onUnblock(p,q);}}function k(o,s,t){var r=s==window,q=g(s);if(!o&&(r&&!b||!r&&!q.data("blockUI.isBlocked"))){return;}if(!r){q.data("blockUI.isBlocked",o);}if(!t.bindEvents||(o&&!t.showOverlay)){return;}var p="mousedown mouseup keydown keypress";o?g(document).bind(p,t,m):g(document).unbind(p,m);}function m(r){if(r.keyCode&&r.keyCode==9){if(b&&r.data.constrainTabKey){var q=f;var p=!r.shiftKey&&r.target==q[q.length-1];var o=r.shiftKey&&r.target==q[0];if(p||o){setTimeout(function(){n(o);},10);return false;}}}if(g(r.target).parents("div.blockMsg").length>0){return true;}return g(r.target).parents().children().filter("div.blockUI").length==0;}function n(o){if(!f){return;}var p=f[o===true?f.length-1:0];if(p){p.focus();}}function a(v,o,z){var w=v.parentNode,u=v.style;var q=((w.offsetWidth-v.offsetWidth)/2)-l(w,"borderLeftWidth");var r=((w.offsetHeight-v.offsetHeight)/2)-l(w,"borderTopWidth");if(o){u.left=q>0?(q+"px"):"0";}if(z){u.top=r>0?(r+"px"):"0";}}function l(o,q){return parseInt(g.css(o,q))||0;}})(jQuery);(function(a){a.DF={version:"1.0",copyright:"Dating Factory"};a.extend(a.DF,{scripts:[],require:function(b){if(this.scripts.indexOf(b)==-1){document.write('<script language="JavaScript" type="text/javascript" src="'+b+'"></scr'+"ipt>");this.scripts.push(b);}},registerJsFile:function(b){if(this.scripts.indexOf(b)==-1){this.scripts.push(b);
}},_blockElementOverlayMessage:{message:null,overlayCSS:{backgroundColor:"#FFFFFF",opacity:"0.6"}}});})(jQuery);$.DF.Popup={_popup:null,_query:[],_opened:false,open:function(a,b){a=a||'<div class="loading"></div>';if(!$.DF.Popup._opened){$.DF.Popup._popup.find("div.content").html(a);$.blockUI({message:$.DF.Popup._popup});$.DF.Popup.align();$.DF.Popup._opened=true;if($.isFunction(b)){b();}}else{$.DF.Popup._query.push({html:a,callback:b});}},update:function(a,b){if($.DF.Popup._opened&&a){$.DF.Popup._popup.find("div.content").html(a);$.DF.Popup.align("slow",b);}},close:function(a){$.DF.Popup._popup.find("div.content").html("");$.unblockUI();$.DF.Popup._opened=false;if($.DF.Popup._query.length>0){setTimeout(function(){var b=$.DF.Popup._query.shift();$.DF.Popup.open(b.html,b.callback);},150);}},align:function(e,h){var d=this._popup.find("div.content").children(":first");var c=d.width()+10;var a=d.height()+10;var g=Math.max(0,parseInt($(window).width()-c)/2);var f=Math.max(0,parseInt($(window).height()-a)/2);var b=this._popup.parents("div.blockMsg");if(e!="slow"){b.resizeTo(c,a);b.moveTo(g,f);}else{b.animate({left:g,top:f,width:c,height:a},300,function(){if($.isFunction(h)){h();}});}}};$(document).ready(function(){$.extend($.blockUI.defaults,{css:{padding:0,margin:0,width:"auto",top:"40%",left:"35%",textAlign:"center",border:"none",backgroundColor:"#ffffff"},overlayCSS:{backgroundColor:"#000000",opacity:"0.6"},fadeIn:0,fadeOut:0});$.DF.Popup._popup=$('<div class="popup"><div class="head"></div><div class="content"></div></div>');$(document.body).append($.DF.Popup._popup);});window.alert=function(a){$.DF.Popup.open(String.format('<div class="alert"><p>{0}</p><button type="button" class="submit common" onclick="$.DF.Popup.close()">Ok</button></div>',a));};$.DF.Sticker={_queue:[],_sticker:null,options:{timeout:15*1000,close:true},open:function(i,f,l){var d=this.buildHTML(i);var g=this._queue.push(d)-1;var h=d.find("div.content");h.html(f);d.css("left",-1000);d.css("top",-1000);var c=d.find("div.content");if($.browser.msie){c.css("float","left").children(":first").css("float","left");}var a=c.realWidth()+12;var k=c.realHeight()+12+5;if($.browser.msie){c.css("float","").children(":first").css("float","");}if($.browser.msie&&$.browser.version<7){d.find("div.popup").width(a-12);}if(this._queue.length==1){var b=parseInt($(window).width()-a)/2;var j=parseInt($(window).height()-k)/2;}else{var e=this._queue[0].offset();var b=e.left+(this._queue.length-1)*20;var j=e.top+(this._queue.length-1)*20;}b+=$(window).scrollLeft();j+=$(window).scrollTop();d.css("opacity",0);d.css("left",b);d.css("top",j);d.css("width",a);d.css("height",k);d.animate({opacity:1},200,function(){d.css("filter","");if($.browser.msie){d.bgiframe();}});l=$.extend({},this.options,l||{});if(l.timeout>0){d.timer=setTimeout(function(){$.DF.Sticker.close(d);},l.timeout);}if(l.close){$('<img alt="close" title="close" width="16" height="16" src="/theme/images/ico_close.gif" class="close" />').appendTo(d.find("div.popup")).click(function(){$.DF.Sticker.close(d);});}return d;},close:function(d){if(d){d.animate({opacity:0},200,function(){d.trigger("remove");d.remove();});clearTimeout(d.timer);var b=this._queue.indexOf(d);if(b>=0&&b<this._queue.length){for(var c=b+1;c<this._queue.length;c++){this._queue[c].animate({left:"-=20px",top:"-=20px"},200);}var a=this._queue.slice(0,b);var e=this._queue.slice(b+1,this._queue.length);this._queue=a.concat(e);}}},buildHTML:function(a){var b=$(String.format('<div class="sticker {0}"><div class="shadow"></div><div class="popup"><div class="head"></div><div class="content"></div></div></div>',a));$(document.body).append(b);b.find("div.shadow").css("opacity",0.5);return b;}};$.DF.AjaxComponent={"guestbook.ReadGuestbook":{"url":"/guestbook/viewGuestbook.do","component":"guestbook.ReadGuestbook","template":"preview.html"},"guestbook.EditGuestbook":{"component":"guestbook.GuestbookComment","template":"edit.html"},"profile.ViewProfile":{"url":"/viewProfile.do","component":"profile.ViewProfile"},"profile.EditProfile":{"url":"/editMyProfile.do","component":"profile.MyProfileEdit","template":"parted.html"},"informer.Message":{"url":"/informer/viewMessage.do","component":"informer.InformerMessage","template":"default.html"},"chat.ChatHistory":{"url":"/chat/history/","component":"chat.ChatHistory"},"gallery.EditMediaItem":{"component":"profile.gallery.MediaItem","template":"editTiny.html","attributes[editMode]":true,"attributes[edit]":false},"search.Search":{"url":"/widget/search/quick/","component":"search.Search","template":"widget.html","attributes[searchType]":"Quick"},"search.SearchResult":{"url":"/widget/search/quick.do","component":"search.SearchResult","template":"widget.html","action":"searchAction"},"page.LandingPage":{"component":"page.LandingPage","template":"default.html"}};$.DF.AjaxRender={_loading:null,_request:function(b,a,c){if(a){$(a).block($.DF._blockElementOverlayMessage);}$.ajax({type:"GET",data:b,dataType:"html",url:"/ajaxRender.do",error:function(d,f,e){},success:function(d,e){if(a){$(a).unblock();
$(a).html(d);}if($.isFunction(c)){c(d);}}});},ReadGuestbook:function(b,a,c){var b=$.extend(b||{},$.DF.AjaxComponent["guestbook.ReadGuestbook"]);this._request(b,a,c);},EditGuestbook:function(b,a,c){var b=$.extend(b||{},$.DF.AjaxComponent["guestbook.EditGuestbook"],{"random":parseInt((new Date())*Math.random())});this._request(b,a,c);},ViewProfileComposeMessage:function(b,a,c){var b=$.extend(b||{},$.DF.AjaxComponent["profile.ViewProfile"],{template:"composeMessage.html"});this._request(b,a,c);},ViewProfileContextMenu:function(b,a,c){var b=$.extend(b||{},$.DF.AjaxComponent["profile.ViewProfile"],{template:"contextMenu.html"});this._request(b,a,c);},ViewProfile:function(b,a,c){var b=$.extend(b||{},$.DF.AjaxComponent["profile.ViewProfile"],{template:"parted.html"});this._request(b,a,c);},EditProfile:function(b,a,c){var b=$.extend(b||{},$.DF.AjaxComponent["profile.EditProfile"],{"random":parseInt((new Date())*Math.random())});this._request(b,a,c);},InformerMessage:function(b,a,c){var b=$.extend(b||{},$.DF.AjaxComponent["informer.Message"]);this._request(b,a,c);},ChatHistory:function(a,c){var b=$.DF.AjaxComponent["chat.ChatHistory"];this._request(b,a,c);},EditMediaItem:function(b,a,c){var b=$.extend(b||{},$.DF.AjaxComponent["gallery.EditMediaItem"],{"random":parseInt((new Date())*Math.random())});this._request(b,a,c);},QuickSearch:function(b,a,c){var b=$.extend(b||{},$.DF.AjaxComponent["search.Search"]);this._request(b,a,c);},QuickSearchResult:function(b,a,c){var b=$.extend(b||{},$.DF.AjaxComponent["search.SearchResult"]);this._request(b,a,c);},LandingPage:function(b,a,c){var b=$.extend(b||{},$.DF.AjaxComponent["page.LandingPage"]);this._request(b,a,c);}};$.DF.AjaxSubmit={initialize:function(b,a,c){$(b).unbind("submit",$.DF.AjaxSubmit.onSubmit).bind("submit",{additional:a,callback:c},$.DF.AjaxSubmit.onSubmit);},serialize:function(b){var c={};var a=["input:hidden","input:text:enabled","input:password:enabled","input:checkbox:checked:enabled","input:radio:checked:enabled","textarea:enabled","select:enabled"].join(",");$(b).find(a).each(function(){c[this.name]=$(this).val()||"";});return c;},onSubmit:function(b){var a=this;$(a).block($.DF._blockElementOverlayMessage);var c=$.extend({url:$(a).attr("action")},b.data.additional||{});c=$.extend(c,$.DF.AjaxSubmit.serialize(a));$.ajax({type:$(a).attr("method"),url:"/ajaxRender.do",data:c,dataType:"html",success:function(d){$(a).unblock();if($.isFunction(b.data.callback)){$.hitch(a,b.data.callback)($.trim(d));}},error:function(d,f,e){$(a).unblock();}});b.preventDefault();}};$.DF.SOAP={_request:function(e,b,d){var c=new SOAPObject(e);c.ns="urn:dp-core.com:operations";$.each(b,function(f,g){c.appendChild(new SOAPObject(f)).val(g);});var a=new SOAPRequest("",c);SOAPClient.SendRequest(a,function(f){if($.isFunction(d)){d(f);}});},_proxy:function(a){SOAPClient.Proxy="/ws/"+a;},getCountryById:function(a,b){this._proxy("GeoService");this._request("getCountryById",{"countryId":a},function(e){var c=e.Body[0].getCountryByIdResponse[0];var d=c.Country[0].name[0].Text;if($.isFunction(b)){b(d);}});},getRegionsListByCountryId:function(a,b){this._proxy("GeoService");this._request("getRegionsListByCountryId",{"countryId":a},function(j){var c=j.Body[0].getRegionsListByCountryIdResponse[0];var k=[],f=c.RegionsList[0].Region||[];for(var e=0,g=f.length;e<g;e++){var d=f[e].name[0].Text;for(var h=0;h<f[e].nestingLevel;h++){d="&nbsp;&nbsp;"+d;}k.push([f[e].id,d,(f[e].selectable[0].Text!="false")]);}if($.isFunction(b)){b(k);}});},getCitiesListByCountryId:function(a,b){this._proxy("GeoService");this._request("getCitiesListByCountryId",{"countryId":a},function(h){var c=h.Body[0].getCitiesListByCountryIdResponse[0];var f=[],e=c.CitiesList[0].City||[];for(var d=0,g=e.length;d<g;d++){f.push([e[d].id,e[d].name[0].Text]);}if($.isFunction(b)){b(f);}});},getCitiesListByRegionId:function(b,a){this._proxy("GeoService");this._request("getCitiesListByRegionId",{"regionId":b},function(h){var c=h.Body[0].getCitiesListByRegionIdResponse[0];var f=[],e=c.CitiesList[0].City||[];for(var d=0,g=e.length;d<g;d++){f.push([e[d].id,e[d].name[0].Text]);}if($.isFunction(a)){a(f);}});},getCitiesListForPostalCode:function(a,b,c){this._proxy("GeoService");this._request("getCitiesListForPostalCode",{"countryId":a,"postalCode":b},function(j){var d=j.Body[0].getCitiesListForPostalCodeResponse[0];var g=[],f=d.CitiesList[0].City||[];for(var e=0,h=f.length;e<h;e++){g.push([f[e].id,f[e].name[0].Text]);}if($.isFunction(c)){c(g);}});},getPostalCodesByCountryId:function(a,b){this._proxy("GeoService");this._request("getPostalCodesByCountryId",{"countryId":a},function(h){var c=h.Body[0].getPostalCodesByCountryIdResponse[0];var e=[],d=c.PostalCodesSet[0].string||[];for(var f=0,g=d.length;f<g;f++){e.push([d[f].Text,d[f].Text]);}if($.isFunction(b)){b(e);}});},getPostalCodesByCityId:function(b,a){this._proxy("GeoService");this._request("getPostalCodesListByCityId",{"cityId":b},function(h){var c=h.Body[0].getPostalCodesListByCityIdResponse[0];var e=[],d=c.PostalCodesList[0].PostalCode||[];
for(var f=0,g=d.length;f<g;f++){e.push([d[f].id,d[f].name[0].Text]);}if($.isFunction(a)){a(e);}});},getStatisticsInfo:function(a){this._proxy("InformerService");this._request("getStatisticsInfo",{},function(d){var b=d.Body[0].getStatisticsInfoResponse[0];var c={blockedCount:parseInt(b["return"][0].blockedCount[0].Text),buddiesCount:parseInt(b["return"][0].buddiesCount[0].Text),friendsCount:parseInt(b["return"][0].friendsCount[0].Text),newChatRequestsCount:parseInt(b["return"][0].newChatRequestsCount[0].Text),newMessagesCount:parseInt(b["return"][0].newMessagesCount[0].Text),visitorsCount:parseInt(b["return"][0].visitorsCount[0].Text)};if($.isFunction(a)){a(c);}});}};$.DF.REST={_request:function(d,a,f,e,g){var c="/ws/rs/"+a+"/"+f.join("/")+".json";var b={type:d,url:c,data:e,dataType:"json",success:function(h){if($.isFunction(g)){g(h);}h.ServicePath=f;$().trigger(a,h);},error:function(h,j,i){if($.isFunction(g)){g({"ServiceOperationResult":{"success":false,"messageText":h.responseText}});}}};if($.browser.opera){$.extend(b,{contentType:"application/json",data:b.data||{"operadata":Math.random()}});}$.ajax(b);},ping:function(a){this._request("POST","InformerService",["ping"],null,a);},chatRequest:function(b,a){this._request("POST","InformerService",["messages","CHAT_REQUEST",b],null,a);},chatResponse:function(a,d,b,c){this._request("POST","InformerService",["messages",a,"reply",d,b],null,c);},closeMessage:function(a,b){this._request("POST","InformerService",["messages",a,"close"],null,b);},setAdultRating:function(a,b){this._request("POST","MemberService",["myprofile","filter","edit",a],null,b);}};(function(a){a.fn.extend({"attach":function(c,b){c=c||[];this.each(function(d,g){for(var e=0,f=c.length;e<f;e++){a(g).addOption(c[e][0],c[e][1],c[e][2]);}if(b!=null){a(g).val(b);}});return this;},"clear":function(c,b){this.each(function(d,e){a(e).empty();if(c!==true){a(e).addOption(b||"0",c||"");}});return this;},"addOption":function(e,f,b,d){var c=a(String.format('<option value="{0}">{1}</option>',e,f));if(b==false){c.attr("disabled","disabled");}if(d==true){c.attr("selected","selected");}this.each(function(g,h){if(h.options){a(h).append(c);}});return this;}});})(jQuery);