$(document).ready(function() { $("#header > p").html("Бизнес центрыАренда на метроАренда на улицеКонтактыЗаказать обратный звонок"); window.scrollTo(0,100); jQuery.fn.extend({ exists: function() { return this.length } }); $.getScript("/JS/jquery.lazyload.js").done(function(script, textStatus) { $("body > ul > li > div > span > img").lazyload({ placeholder : "/img/pre-loading.gif", effect : "fadeIn" }); if($("#header").attr("class")) { $("body > ul > li.contact > div > span > u").each(function() { $(this).before("Открыть презентацию офиса") }) } }) $("#business-center-photos").css("left", $(window).innerWidth() / 2 - $("#business-center-photos").width() / 2 ); //$.getScript("http://www.google.com/jsapi").done(function(script, textStatus) { //google.load("maps","3", {"other_params":"sensor=false","callback": function() { search_pano = new google.maps.StreetViewPanorama(document.getElementById("panorama"), { position: new google.maps.LatLng(55.738766, 37.581855), panControl: false, scrollwheel: false, addressControl: false, zoomControl: false, pov: { heading: -64, pitch: 16, zoom: 1 } } ); //interval_pano = setInterval(function() { // var pov = search_pano.getPov(); // pov.heading += 0.2; // search_pano.setPov(pov); //}, 10) search_pano.controls[google.maps.ControlPosition.BOTTOM_CENTER].push(document.getElementById("business-center-photos")); //}}) //}) var abc_id_hover; var show_abc = 0; var search_pano; $("#business-center-photos > div").width($("#business-center-photos > div > img").length * 136); $("body > div:last-child").after("
"); $("#header > ul li:last-child").css("border-width", "0px"); $("#header > span").after("
"); $("#header").after("
"); $.get("/get_content.asp?get_abc=1", function(data) { $("#header > div").html(data); $.get("/get_content.asp?get_all_bc=1", function(data) { $("#abc > div").html(data); $("#abc > div").hover(function() { $(abc_id_hover).addClass("active"); show_abc = 1; }, function() { show_abc = 0; //$(abc_id_hover).removeClass("active"); }) $("#header > div").hover(function() { show_abc = 1; }, function() { show_abc = 0; setInterval(function() { if(show_abc == 0) { $("#header > div > span").removeClass("active"); $("#abc").hide(); } }, 500); }) $("#header > div > span").hover(function() { show_abc = 1; $("#abc").css("opacity", "0.5"); $(abc_id_hover).removeClass("active"); $(this).addClass("active"); abc_id_hover = $(this); $("#abc > div").css("top", 87); $("#abc > div").css("left", $(this).offset().left); $("#abc").show(); $("#abc > div > div > a").hide(); $("#abc > div > div > a[letter='" + $("#header > div > span.active").html() + "']").show(); $("#abc").css("opacity", "1"); if($("#abc > div > div > a:visible").length > 15) { $(".tmp_scroll").height(400); $(".tmp_scroll").css("overflow-y", "scroll"); } else { $(".tmp_scroll").css("overflow-y", "none"); } }, function() { //show_abc = 0; }) }) }) $("#business-center").width($("#panorama").width()); //$("#business-center").css("top", $("#panorama").offset().top); $.getScript("/JS/jquery.prettyPhoto.js", function() { $.getScript("/JS/jquery-ui-1.10.3.custom.min.js", function() { $.getScript("/JS/spin_min.js", function() { //$.getScript("http://www.google.com/jsapi").done(function(script, textStatus) { //google.load("maps","3", {"other_params":"sensor=false","callback": function() { //============================================================= //============================$("#offices-for-rent").after("
"); if($("#bc-on-map").exists()) { ymaps.ready(function() { var bconmap = new ymaps.Map ("bc-on-map", { center: [55.738900, 37.581101], zoom: 14 }, { minZoom: 11, maxZoom: 15 } ); var myPlacemark = new ymaps.Placemark([55.738900, 37.581101]); bconmap.geoObjects.add(myPlacemark); bconmap.controls .add('zoomControl', { right: 20, top: 20 }) $("#route-street").autocomplete({ source:function(request, response) { $.ajax({ url: "/get_content.asp?get_list_street=1", type: "get", dataType: "json", data: { term: request.term }, success: function(responseData){ var array = responseData.map(function(element) { return {value: element['street'], id: element['id_street']}; }); response(array); } }) }, select: function(event, ui) { $("#route-street").attr("search", ui.item.id) }, change: function( event, ui ) { if ( !ui.item ) { $("#route-street").val(""); } } }); $("#route-calculate").click(function() { if($("#route-street").val() == "") { } else { if($("#route-home").val() == "") { } else { ymaps.route([[55.738900, 37.581101], "Россия, Москва, " + $("#route-street").val() + ", дом " + $("#route-home").val()], {mapStateAutoApply: true} ).then( function (route) { bconmap.geoObjects.add(route); }, function (error) { alert('Возникла ошибка: ' + error.message); } ); } } }) }); } $("#dialog").dialog({ autoOpen: false, resizable: false, modal: true, closeOnEscape: true, title: "Заявка на обратный звонок", width: "auto", open: function() { $('.ui-dialog').css('z-index', 90000012); $('.ui-widget-overlay').css('z-index', 90000003); $('.ui-widget-overlay').css('opacity', 0.2); $('.ui-widget-overlay').css('background', '#2b2c2f'); $('.ui-widget-header').css("font-size", "18px"); $('.ui-widget-header').css("font-weight", "bold"); $('.ui-widget-header').css("font-family", "Roboto Condensed"); $(".ui-dialog").css("box-shadow","#4D4D4D 0px 0px 50px"); $(this).closest('.ui-dialog').find('.ui-dialog-titlebar-close').show(); } }); $("#dialog1").dialog({ autoOpen: false, resizable: false, modal: true, closeOnEscape: true, title: "Заявка на обратный звонок", width: "auto", open: function() { $('.ui-dialog').css('z-index', 90000012); $('.ui-widget-overlay').css('z-index', 90000003); $('.ui-widget-overlay').css('opacity', 0.2); $('.ui-widget-overlay').css('background', '#2b2c2f'); $('.ui-widget-header').css("font-size", "18px"); $('.ui-widget-header').css("font-weight", "bold"); $('.ui-widget-header').css("font-family", "Roboto Condensed"); $(".ui-dialog").css("box-shadow","#4D4D4D 0px 0px 50px"); $(".ui-dialog").css("box-shadow","#4D4D4D 0px 0px 50px"); $('.ui-widget-overlay').addClass('custom-overlay'); $(this).closest('.ui-dialog').find('.ui-dialog-titlebar-close').show(); }, close: function() { $('.ui-widget-overlay').removeClass('custom-overlay'); } }); function open_dialog_zakaz() { if($("#offices-for-rent ul li.active").length > 0) { $.get("/get_content.asp?zakaz_call_back=" + $("#offices-for-rent ul li.active").find("img").attr("src").substring($("#offices-for-rent ul li.active").find("img").attr("src").indexOf("./photo/") + 8, $("#offices-for-rent ul li.active").find("img").attr("src").indexOf(".jpg")), function(data) { $("#dialog_content1").html(data); $("#dialog1").dialog("open"); }) } else { $.get("/get_content.asp?zakaz_call_back=1", function(data) { $("#dialog_content1").html(data); $("#dialog1").dialog("open"); }) } } $(".contact div img").click(function() { //$("#dialog").dialog("open"); open_dialog_zakaz(); }) $("#header > ul.contact > li > img").click(function() { //$("#dialog").dialog("open"); open_dialog_zakaz(); }) $("#header p span").click(function() { open_dialog_zakaz(); }) $("#business-center-photos div img").prettyPhoto({animation_speed:'normal', social_tools:false, deeplinking: false, slideshow: 8000, autoplay_slideshow: true}); $("body > ul > li > div span div a").prettyPhoto({animation_speed:'normal', social_tools:false, deeplinking: false, slideshow: 8000, autoplay_slideshow: true}); $("body > ul > li > div > span").click(function() { $(this).find("div a:nth-child(1)").click(); }) //============================================================= //}}) //}) }) }) }) $(window).load(function() { $("#business-center").width($("#panorama").width()); $("#business-center").css("top", $("#panorama").offset().top); $("#panorama").outerHeight($("#panorama").outerHeight() - 55); $("#panorama > iframe").outerWidth($("#panorama").outerWidth()); $("#panorama > iframe").outerHeight($("#panorama").outerHeight()); }) }) var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-47883307-2']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })();