(function($){var _loadedStylesheets=null;$.extend({guid:1,env:{project:'default',staticDomain:'dating.ezstatic.com'},globals:{},filters:{localToStatic:function(value){if(!value.match(/^\/(scripts|styles|images|flash)\//))
return value;return'http://'+$.env.staticDomain+value;},uncombine:function(value){var filtered=[],reg=/\?\?([\w\/\.-]*\.(js|css),?)+$/i,file,pathSegments;for(var i=0;i<value.length;i++){file=value[i];if(file.match(reg)){pathSegments=file.split('??');file=pathSegments[1].split(',');for(var j=0;j<file.length;j++){filtered.push(pathSegments[0]+file[j]);}}else{filtered.push(file);}}
return filtered;}},ajaxUpdateCallbacks:[],redirect:function(url,target,ajaxableRedirect){if(ajaxableRedirect===false){document.location=url;}else{$.ajaxLoad(url,{target:target});}},ajaxResponseHandler:function(data){if(data.title)
document.title=data.title;if(data.styles){if(_loadedStylesheets==null)
_loadedStylesheets=$.filters.uncombine($.getLoadedStylesheets());var stylesheetsToLoad=$.filters.uncombine(data.styles),$head=$('head');for(var i=0;i<stylesheetsToLoad.length;i++){var stylesheet=stylesheetsToLoad[i];if(_loadedStylesheets.indexOf(stylesheet)!==-1)continue;$head.append('<link href="'+stylesheet+'" media="screen" rel="stylesheet" type="text/css" />');_loadedStylesheets.push(stylesheet);}}
if(data.content&&data.contentContainer){var elmt=$(data.contentContainer);elmt.html(data.content);data.content=data.contentContainer=null;$._triggerAjaxUpdateCallbacks(elmt);}
if(data.contentUpdates){var $container;for(var container in data.contentUpdates){$container=$(container);$container.html(data.contentUpdates[container]);$._triggerAjaxUpdateCallbacks($container);}}
if(data.scripts)
$.registerScriptLoader(data.scripts);if(data.callbacks){var executeCallbacks=function(){for(var i=0;i<data.callbacks.length;i++){var callback=data.callbacks[i];if($.isFunction(callback)){callback();}}};$(function(){if($.scriptLoaderRegistred()){$(document).bind("loaderready.callbacks",function(){$(document).unbind("loaderready.callbacks");executeCallbacks();});}else{executeCallbacks();}});}
if(data.widgets&&data.widgets.length)
$.registerWidgetLoader(data.widgets,false);},addAjaxUpdateCallback:function(callback){if($.isFunction(callback)){$.ajaxUpdateCallbacks.push(callback);}},_triggerAjaxUpdateCallbacks:function(elmt){var callback;for(var i=0;i<$.ajaxUpdateCallbacks.length;i++){callback=$.ajaxUpdateCallbacks[i];callback(elmt);}},getLoadedScripts:function(){var scripts=[];$('script').each(function(){if(this.src)
scripts.push(this.src);});return scripts;},getLoadedStylesheets:function(){var stylesheets=[];$('link[rel=stylesheet]').each(function(){stylesheets.push(this.href);});return stylesheets;}});$.fn.extend({blink:function(speed,iterations){speed=speed||200;iterations=iterations||2;return this.each(function(){var elmt=$(this);if(!elmt.is(':visible'))
elmt.fadeIn(speed);for(var i=0;i<(iterations*2);i++){if(i%2==0){elmt.fadeOut(speed);}else{elmt.fadeIn(speed);}}});},addLoader:function(){var loaderTemplate=$(document.createElement('div'));loaderTemplate
.addClass('ajaxLoader')
.append($(document.createElement('div'))
.addClass('overlay')
.addClass('border')
.addClass('light-border-color')
.append($(document.createElement('div')).addClass('indicator')));return this.each(function(){var $this=$(this);if(!$this.is(':visible'))
$this.show();if($this.height()<30)
$this.css('min-height','30px');$this.html(loaderTemplate.clone());});},removeLoader:function(){return this.each(function(){var $this=$(this);$this.find('.ajaxLoader').fadeOut(200,function(){$(this).remove();});$this.removeClass('relative');});}});var _currentRequest=undefined;$.ajaxPrefilter("text easy-ajx",function(options,originalOptions,jqXHR){if(typeof options.success=='function'){options.success=options.success.wrap(function(proceed,data,textStatus){proceed(data,textStatus);$.ajaxResponseHandler(data.document);});}else{options.success=function(data,textStatus){$.ajaxResponseHandler(data.document);};}
jqXHR.setRequestHeader('X-Expected-Response','EasyResponse');if(_currentRequest)
_currentRequest.abort();_currentRequest=jqXHR;});$.ajaxSetup({converters:{"text easy-ajx":function(textValue){var data=$.evalJSON(textValue);if(data.location){$.redirect(data.location,data.target,data.ajaxableRedirect);throw new Error("Redirecting");}
return data;}}});})(jQuery);
