/* * Metadata - jQuery plugin for parsing metadata from elements * * Copyright (c) 2006 John Resig, Yehuda Katz, J�örn Zaefferer, Paul McLanahan * * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/gpl.html * * Revision: $Id: jquery.metadata.js 3640 2007-10-11 18:34:38Z pmclanahan $ * */ /** * Sets the type of metadata to use. Metadata is encoded in JSON, and each property * in the JSON will become a property of the element itself. * * There are four supported types of metadata storage: * * attr: Inside an attribute. The name parameter indicates *which* attribute. * * class: Inside the class attribute, wrapped in curly braces: { } * * elem: Inside a child element (e.g. a script tag). The * name parameter indicates *which* element. * html5: Values are stored in data-* attributes. * * The metadata for an element is loaded the first time the element is accessed via jQuery. * * As a result, you can define the metadata type, use $(expr) to load the metadata into the elements * matched by expr, then redefine the metadata type and run another $(expr) for other elements. * * @name $.metadata.setType * * @example

This is a p

* @before $.metadata.setType("class") * @after $("#one").metadata().item_id == 1; $("#one").metadata().item_label == "Label" * @desc Reads metadata from the class attribute * * @example

This is a p

* @before $.metadata.setType("attr", "data") * @after $("#one").metadata().item_id == 1; $("#one").metadata().item_label == "Label" * @desc Reads metadata from a "data" attribute * * @example

This is a p

* @before $.metadata.setType("elem", "script") * @after $("#one").metadata().item_id == 1; $("#one").metadata().item_label == "Label" * @desc Reads metadata from a nested script element * * @example

This is a p

* @before $.metadata.setType("html5") * @after $("#one").metadata().item_id == 1; $("#one").metadata().item_label == "Label" * @desc Reads metadata from a series of data-* attributes * * @param String type The encoding type * @param String name The name of the attribute to be used to get metadata (optional) * @cat Plugins/Metadata * @descr Sets the type of encoding to be used when loading metadata for the first time * @type undefined * @see metadata() */ (function($) { $.extend({ metadata : { defaults : { type: 'class', name: 'metadata', cre: /({.*})/, single: 'metadata' }, setType: function( type, name ){ this.defaults.type = type; this.defaults.name = name; }, get: function( elem, opts ){ var settings = $.extend({},this.defaults,opts); // check for empty string in single property if ( !settings.single.length ) settings.single = 'metadata'; var data = $.data(elem, settings.single); // returned cached data if it already exists if ( data ) return data; data = "{}"; var getData = function(data) { if(typeof data != "string") return data; if( data.indexOf('{') < 0 ) { data = eval("(" + data + ")"); } }; var getObject = function(data) { if(typeof data != "string") return data; data = eval("(" + data + ")"); return data; }; if ( settings.type == "html5" ) { var object = {}; $( elem.attributes ).each(function() { var name = this.nodeName; if(name.match(/^data-/)) name = name.replace(/^data-/, ''); else return true; object[name] = getObject(this.nodeValue); }); } else { if ( settings.type == "class" ) { var m = settings.cre.exec( elem.className ); if ( m ) data = m[1]; } else if ( settings.type == "elem" ) { if( !elem.getElementsByTagName ) return; var e = elem.getElementsByTagName(settings.name); if ( e.length ) data = $.trim(e[0].innerHTML); } else if ( elem.getAttribute != undefined ) { var attr = elem.getAttribute( settings.name ); if ( attr ) data = attr; } object = getObject(data.indexOf("{") < 0 ? "{" + data + "}" : data); } $.data( elem, settings.single, object ); return object; } } }); /** * Returns the metadata object for the first member of the jQuery object. * * @name metadata * @descr Returns element's metadata object * @param Object opts An object contianing settings to override the defaults * @type jQuery * @cat Plugins/Metadata */ $.fn.metadata = function( opts ){ return $.metadata.get( this[0], opts ); }; })(jQuery);/* ### jQuery Star Rating Plugin v4.11 - 2013-03-14 ### * Home: http://www.fyneworks.com/jquery/star-rating/ * Code: http://code.google.com/p/jquery-star-rating-plugin/ * * Licensed under http://en.wikipedia.org/wiki/MIT_License ### */ /*# AVOID COLLISIONS #*/ ;if(window.jQuery) (function($){ /*# AVOID COLLISIONS #*/ // IE6 Background Image Fix if ((!$.support.opacity && !$.support.style)) try { document.execCommand("BackgroundImageCache", false, true)} catch(e) { }; // Thanks to http://www.visualjquery.com/rating/rating_redux.html // plugin initialization $.fn.rating = function(options){ if(this.length==0) return this; // quick fail // Handle API methods if(typeof arguments[0]=='string'){ // Perform API methods on individual elements if(this.length>1){ var args = arguments; return this.each(function(){ $.fn.rating.apply($(this), args); }); }; // Invoke API method handler $.fn.rating[arguments[0]].apply(this, $.makeArray(arguments).slice(1) || []); // Quick exit... return this; }; // Initialize options for this call var options = $.extend( {}/* new object */, $.fn.rating.options/* default options */, options || {} /* just-in-time options */ ); // Allow multiple controls with the same name by making each call unique $.fn.rating.calls++; // loop through each matched element this .not('.star-rating-applied') .addClass('star-rating-applied') .each(function(){ // Load control parameters / find context / etc var control, input = $(this); var eid = (this.name || 'unnamed-rating').replace(/\[|\]/g, '_').replace(/^\_+|\_+$/g,''); var context = $(this.form || document.body); // FIX: http://code.google.com/p/jquery-star-rating-plugin/issues/detail?id=23 var raters = context.data('rating'); if(!raters || raters.call!=$.fn.rating.calls) raters = { count:0, call:$.fn.rating.calls }; var rater = raters[eid] || context.data('rating'+eid); // if rater is available, verify that the control still exists if(rater) control = rater.data('rating'); if(rater && control)//{// save a byte! // add star to control if rater is available and the same control still exists control.count++; //}// save a byte! else{ // create new control if first star or control element was removed/replaced // Initialize options for this rater control = $.extend( {}/* new object */, options || {} /* current call options */, ($.metadata? input.metadata(): ($.meta?input.data():null)) || {}, /* metadata options */ { count:0, stars: [], inputs: [] } ); // increment number of rating controls control.serial = raters.count++; // create rating element rater = $(''); input.before(rater); // Mark element for initialization (once all stars are ready) rater.addClass('rating-to-be-drawn'); // Accept readOnly setting from 'disabled' property if(input.attr('disabled') || input.hasClass('disabled')) control.readOnly = true; // Accept required setting from class property (class='required') if(input.hasClass('required')) control.required = true; // Create 'cancel' button rater.append( control.cancel = $('
' + control.cancelValue + '
') .on('mouseover',function(){ $(this).rating('drain'); $(this).addClass('star-rating-hover'); //$(this).rating('focus'); }) .on('mouseout',function(){ $(this).rating('draw'); $(this).removeClass('star-rating-hover'); //$(this).rating('blur'); }) .on('click',function(){ $(this).rating('select'); }) .data('rating', control) ); }; // first element of group // insert rating star (thanks Jan Fanslau rev125 for blind support https://code.google.com/p/jquery-star-rating-plugin/issues/detail?id=125) var star = $('
' + this.value + '
'); rater.append(star); // inherit attributes from input element if(this.id) star.attr('id', this.id); if(this.className) star.addClass(this.className); // Half-stars? if(control.half) control.split = 2; // Prepare division control if(typeof control.split=='number' && control.split>0){ var stw = ($.fn.width ? star.width() : 0) || control.starWidth; var spi = (control.count % control.split), spw = Math.floor(stw/control.split); star // restrict star's width and hide overflow (already in CSS) .width(spw) // move the star left by using a negative margin // this is work-around to IE's stupid box model (position:relative doesn't work) .find('a').css({ 'margin-left':'-'+ (spi*spw) +'px' }) }; // readOnly? if(control.readOnly)//{ //save a byte! // Mark star as readOnly so user can customize display star.addClass('star-rating-readonly'); //} //save a byte! else//{ //save a byte! // Enable hover css effects star.addClass('star-rating-live') // Attach mouse events .on('mouseover',function(){ $(this).rating('fill'); $(this).rating('focus'); }) .on('mouseout',function(){ $(this).rating('draw'); $(this).rating('blur'); }) .on('click',function(){ $(this).rating('select'); }) ; //}; //save a byte! // set current selection if(this.checked) control.current = star; // set current select for links if(this.nodeName=="A"){ if($(this).hasClass('selected')) control.current = star; }; // hide input element input.hide(); // backward compatibility, form element to plugin input.on('change.rating',function(event){ if(event.selfTriggered) return false; $(this).rating('select'); }); // attach reference to star to input element and vice-versa star.data('rating.input', input.data('rating.star', star)); // store control information in form (or body when form not available) control.stars[control.stars.length] = star[0]; control.inputs[control.inputs.length] = input[0]; control.rater = raters[eid] = rater; control.context = context; input.data('rating', control); rater.data('rating', control); star.data('rating', control); context.data('rating', raters); context.data('rating'+eid, rater); // required for ajax forms }); // each element // Initialize ratings (first draw) $('.rating-to-be-drawn').rating('draw').removeClass('rating-to-be-drawn'); return this; // don't break the chain... }; /*--------------------------------------------------------*/ /* ### Core functionality and API ### */ $.extend($.fn.rating, { // Used to append a unique serial number to internal control ID // each time the plugin is invoked so same name controls can co-exist calls: 0, focus: function(){ var control = this.data('rating'); if(!control) return this; if(!control.focus) return this; // quick fail if not required // find data for event var input = $(this).data('rating.input') || $( this.tagName=='INPUT' ? this : null ); // focus handler, as requested by focusdigital.co.uk if(control.focus) control.focus.apply(input[0], [input.val(), $('a', input.data('rating.star'))[0]]); }, // $.fn.rating.focus blur: function(){ var control = this.data('rating'); if(!control) return this; if(!control.blur) return this; // quick fail if not required // find data for event var input = $(this).data('rating.input') || $( this.tagName=='INPUT' ? this : null ); // blur handler, as requested by focusdigital.co.uk if(control.blur) control.blur.apply(input[0], [input.val(), $('a', input.data('rating.star'))[0]]); }, // $.fn.rating.blur fill: function(){ // fill to the current mouse position. var control = this.data('rating'); if(!control) return this; // do not execute when control is in read-only mode if(control.readOnly) return; // Reset all stars and highlight them up to this element this.rating('drain'); this.prevAll().addBack().filter('.rater-'+ control.serial).addClass('star-rating-hover'); },// $.fn.rating.fill drain: function() { // drain all the stars. var control = this.data('rating'); if(!control) return this; // do not execute when control is in read-only mode if(control.readOnly) return; // Reset all stars control.rater.children().filter('.rater-'+ control.serial).removeClass('star-rating-on').removeClass('star-rating-hover'); },// $.fn.rating.drain draw: function(){ // set value and stars to reflect current selection var control = this.data('rating'); if(!control) return this; // Clear all stars this.rating('drain'); // Set control value var current = $( control.current );//? control.current.data('rating.input') : null ); var starson = current.length ? current.prevAll().addBack().filter('.rater-'+ control.serial) : null; if(starson) starson.addClass('star-rating-on'); // Show/hide 'cancel' button control.cancel[control.readOnly || control.required?'hide':'show'](); // Add/remove read-only classes to remove hand pointer this.siblings()[control.readOnly?'addClass':'removeClass']('star-rating-readonly'); },// $.fn.rating.draw select: function(value,wantCallBack){ // select a value var control = this.data('rating'); if(!control) return this; // do not execute when control is in read-only mode if(control.readOnly) return; // clear selection control.current = null; // programmatically (based on user input) if(typeof value!='undefined' || this.length>1){ // select by index (0 based) if(typeof value=='number') return $(control.stars[value]).rating('select',undefined,wantCallBack); // select by literal value (must be passed as a string if(typeof value=='string'){ //return $.each(control.stars, function(){ //console.log($(this).data('rating.input'), $(this).data('rating.input').val(), value, $(this).data('rating.input').val()==value?'BINGO!':''); if($(this).data('rating.input').val()==value) $(this).rating('select',undefined,wantCallBack); }); // don't break the chain return this; }; } else{ control.current = this[0].tagName=='INPUT' ? this.data('rating.star') : (this.is('.rater-'+ control.serial) ? this : null); }; // Update rating control state this.data('rating', control); // Update display this.rating('draw'); // find current input and its sibblings var current = $( control.current ? control.current.data('rating.input') : null ); var lastipt = $( control.inputs ).filter(':checked'); var deadipt = $( control.inputs ).not(current); // check and uncheck elements as required deadipt.prop('checked',false);//.removeAttr('checked'); current.prop('checked',true);//.attr('checked','checked'); // trigger change on current or last selected input $(current.length? current : lastipt ).trigger({ type:'change', selfTriggered:true }); // click callback, as requested here: http://plugins.jquery.com/node/1655 if((wantCallBack || wantCallBack == undefined) && control.callback) control.callback.apply(current[0], [current.val(), $('a', control.current)[0]]);// callback event // don't break the chain return this; },// $.fn.rating.select readOnly: function(toggle, disable){ // make the control read-only (still submits value) var control = this.data('rating'); if(!control) return this; // setread-only status control.readOnly = toggle || toggle==undefined ? true : false; // enable/disable control value submission if(disable) $(control.inputs).attr("disabled", "disabled"); else $(control.inputs).removeAttr("disabled"); // Update rating control state this.data('rating', control); // Update display this.rating('draw'); },// $.fn.rating.readOnly disable: function(){ // make read-only and never submit value this.rating('readOnly', true, true); },// $.fn.rating.disable enable: function(){ // make read/write and submit value this.rating('readOnly', false, false); }// $.fn.rating.select }); /*--------------------------------------------------------*/ /* ### Default Settings ### eg.: You can override default control like this: $.fn.rating.options.cancel = 'Clear'; */ $.fn.rating.options = { //$.extend($.fn.rating, { options: { cancel: 'Cancel Rating', // advisory title for the 'cancel' link cancelValue: '', // value to submit when user click the 'cancel' link split: 0, // split the star into how many parts? // Width of star image in case the plugin can't work it out. This can happen if // the jQuery.dimensions plugin is not available OR the image is hidden at installation starWidth: 16//, //NB.: These don't need to be pre-defined (can be undefined/null) so let's save some code! //half: false, // just a shortcut to control.split = 2 //required: false, // disables the 'cancel' button so user can only select one of the specified values //readOnly: false, // disable rating plugin interaction/ values cannot be.one('change', //focus: function(){}, // executed when stars are focused //blur: function(){}, // executed when stars are focused //callback: function(){}, // executed when a star is clicked }; //} }); /*--------------------------------------------------------*/ // auto-initialize plugin $(function(){ $('input[type=radio].star').rating(); }); /*# AVOID COLLISIONS #*/ })(jQuery); /*# AVOID COLLISIONS #*/ var urlsSwitching = {'block':'/?ls=block&yclid=853721348289596361','table':'/?ls=table&yclid=853721348289596361','map':'/?ls=map&yclid=853721348289596361'}; var updateText = 'Загрузка ...'; var resultBlock = 'appartment_box'; var bg_img = '/themes/atlas/images/pages/opacity.png'; var useGoogleMap = 1; var useYandexMap = 0; var useOSMap = 0; var modeListShow = 'block'; $(function () { $('div#appartment_box').on('mouseover mouseout', 'div.appartment_item', function(event){ if (event.type == 'mouseover') { $(this).find('div.apartment_item_edit').show(); } else { $(this).find('div.apartment_item_edit').hide(); } }); }); function setListShow(mode){ modeListShow = mode; reloadApartmentList(urlsSwitching[mode]); }; $(function () { if(modeListShow == 'map'){ list.apply(); } }); eval(function(p,a,c,k,e,r){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('5 G(b,a){b.N().14(G,o.n.31);4.H=b;4.2B=b.N().2q();4.M=a;4.C=u;4.q=u;4.16=u;4.1i=t;4.L(b.w())}G.6.2C=5(){7 d=4;7 g;7 f;4.q=3x.3r("1Z");4.q.5n=4.2B;9(4.1i){4.29()}4.4L().4D.4x(4.q);4.2W=o.n.v.1M(4.w(),"49",5(){f=g});o.n.v.1G(4.q,"3Z",5(){g=I;f=t});o.n.v.1G(4.q,"2L",5(e){g=t;9(!f){7 c;7 b;7 a=d.H.N();o.n.v.12(a,"2L",d.H);o.n.v.12(a,"3T",d.H);9(a.2z()){b=a.1s();c=d.H.1B();a.w().1O(c);1P(5(){a.w().1O(c);9(b!==u&&(a.w().15()>b)){a.w().3C(b+1)}},3w)}e.3t=I;9(e.2g){e.2g()}}});o.n.v.1G(4.q,"2f",5(){7 a=d.H.N();o.n.v.12(a,"2f",d.H)});o.n.v.1G(4.q,"2e",5(){7 a=d.H.N();o.n.v.12(a,"2e",d.H)})};G.6.2Q=5(){9(4.q&&4.q.3h){4.1N();o.n.v.2S(4.2W);o.n.v.55(4.q);4.q.3h.4X(4.q);4.q=u}};G.6.38=5(){9(4.1i){7 a=4.26(4.C);4.q.S.1L=a.y+"B";4.q.S.1I=a.x+"B"}};G.6.1N=5(){9(4.q){4.q.S.3a="2V"}4.1i=t};G.6.29=5(){9(4.q){7 e="";7 c=4.3e.4h(" ");7 b=Y(c[0].3f(/^\\s+|\\s+$/g,""),10);7 d=Y(c[1].3f(/^\\s+|\\s+$/g,""),10);7 a=4.26(4.C);4.q.S.3Y=4.2O(a);e="<3X 3W=\'"+4.2K+"\' S=\'1X: 1W; 1L: "+d+"B; 1I: "+b+"B; ";9(!4.H.N().1d){e+="3V: 3U("+(-1*d)+"B, "+((-1*b)+4.1h)+"B, "+((-1*d)+4.1m)+"B, "+(-1*b)+"B);"}e+="\'>";4.q.3S=e+"<1Z S=\'"+"1X: 1W;"+"1L: "+4.1V[0]+"B;"+"1I: "+4.1V[1]+"B;"+"3P: "+4.2F+";"+"1y-1o: "+4.2v+"B;"+"1y-3J: "+4.2s+";"+"1y-3H: "+4.2p+";"+"1y-S: "+4.2n+";"+"1x-3D: "+4.2l+";"+"1x-3A: 1c;"+"1C: "+4.1h+"B;"+"3v-1A:"+4.1m+"B;"+"\'>"+4.16.1x+"";9(2i 4.16.13==="1a"||4.16.13===""){4.q.13=4.H.N().2U()}K{4.q.13=4.16.13}4.q.S.3a=""}4.1i=I};G.6.2M=5(a){4.16=a;7 b=z.3l(0,a.2R-1);b=z.21(4.M.p-1,b);7 c=4.M[b];4.2K=c.3g;4.1m=c.1A;4.1h=c.1C;4.1V=c.5i||[0,0];4.2d=c.5c||[Y(4.1m/2,10),Y(4.1h/2,10)];4.2F=c.54||"4Z";4.2v=c.4W||11;4.2l=c.4Q||"2V";4.2p=c.4N||"4K";4.2n=c.4H||"4F";4.2s=c.4E||"4C,4B-4z";4.3e=c.4y||"0 0"};G.6.30=5(a){4.C=a};G.6.2O=5(b){7 a=[];a.Z("4v: 4t;");a.Z("1X: 1W; 1L: "+b.y+"B; 1I: "+b.x+"B;");a.Z("1C: "+4.1h+"B; 1A: "+4.1m+"B;");j a.4s("")};G.6.26=5(b){7 a=4.39().28(b);a.x-=4.2d[1];a.y-=4.2d[0];a.x=Y(a.x,10);a.y=Y(a.y,10);j a};5 D(a){4.V=a;4.T=a.w();4.U=a.2T();4.X=a.3d();4.19=a.3c();4.k=[];4.C=u;4.2c=u;4.W=F G(4,a.20())}D.6.41=5(){j 4.k.p};D.6.1D=5(){j 4.k};D.6.2P=5(){j 4.C};D.6.w=5(){j 4.T};D.6.N=5(){j 4.V};D.6.1B=5(){7 i;7 b=F o.n.1l(4.C,4.C);7 a=4.1D();A(i=0;ib){9(e.w()!==4.T){e.L(4.T)}}K 9(c<4.X){9(e.w()!==4.T){e.L(4.T)}}K 9(c===4.X){A(i=0;ia){4.W.1N();j}9(c<4.X){4.W.1N();j}7 b=4.V.20().p;7 d=4.V.2G()(4.k,b);4.W.30(4.C);4.W.2M(d);4.W.29()};D.6.2X=5(a){7 i;9(4.k.1g){j 4.k.1g(a)!==-1}K{A(i=0;i<4.k.p;i++){9(a===4.k[i]){j I}}}j t};5 8(a,c,b){4.14(8,o.n.31);c=c||[];b=b||{};4.k=[];4.E=[];4.1r=[];4.1f=u;4.1b=t;4.U=b.3R||3Q;4.X=b.3N||2;4.1U=b.2y||u;4.M=b.3K||[];4.1T=b.13||"";4.1v=I;9(b.2x!==1a){4.1v=b.2x}4.19=t;9(b.2w!==1a){4.19=b.2w}4.18=t;9(b.2u!==1a){4.18=b.2u}4.1d=t;9(b.2t!==1a){4.1d=b.2t}4.1t=b.3I||8.2r;4.1u=b.3G||8.2o;4.1e=b.3F||8.2j;4.1S=b.3E||8.2m;4.1Q=b.3B||8.2E;4.1z=b.3z||8.2k;4.1R=b.3y||"O";9(3L.3M.3u().1g("3O")!==-1){4.1Q=4.1z}4.2D();4.2A(c,I);4.L(a)}8.6.2C=5(){7 a=4;4.1f=4.w();4.1b=I;4.1q();4.1r=[o.n.v.1M(4.w(),"3s",5(){a.1w(t);9(4.15()===(4.2h("3q")||0)||4.15()===4.2h("2y")){o.n.v.12(4,"2N")}}),o.n.v.1M(4.w(),"2N",5(){a.1k()})]};8.6.2Q=5(){7 i;A(i=0;i<4.k.p;i++){9(4.k[i].w()!==4.1f){4.k[i].L(4.1f)}}A(i=0;i<4.E.p;i++){4.E[i].1F()}4.E=[];A(i=0;i<4.1r.p;i++){o.n.v.2S(4.1r[i])}4.1r=[];4.1f=u;4.1b=t};8.6.38=5(){};8.6.2D=5(){7 i,1o;9(4.M.p>0){j}A(i=0;i<4.1e.p;i++){1o=4.1e[i];4.M.Z({3g:4.1t+(i+1)+"."+4.1u,1A:1o,1C:1o})}};8.6.3p=5(){7 i;7 a=4.1D();7 b=F o.n.1l();A(i=0;i3){d=F o.n.1l(4.w().1B().22(),4.w().1B().25())}K{d=F o.n.1l(F o.n.1p(2Y.4r,-37.4q),F o.n.1p(-2Y.4p,37.4o))}7 a=4.2a(d);7 b=z.21(e+4.1Q,4.k.p);A(i=e;i