(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);}};