function Js_Basket_Content_IlluminateImage(id)
{
    this.Id = id;
    this.LastClass = "";
    this.Images = $("#" + this.Id + " img"); //this.Images.css({ opacity: .75 });
    this.IsHidden = false;

    var obj = this;

    this.Images.each(function()
    {        
        $(this).click(function() { $(this).animate({ opacity: 0.25 }, 150); });
        $(this).hover(
		function()
		{
		    if (!obj.IsHidden)
		    {
		        obj.IsHidden = true;
		        obj.Images.stop().animate({ opacity: .25 }, 350);
		    }

		    $(this).stop().animate({ opacity: 1 }, 100);
		},
		function() { $(this).animate({ opacity: .25 }, 50); }
	);
    });

    $("#" + this.Id).hover(
	    function() { obj.Images.stop().animate({ opacity: .25 }, 500); obj.IsHidden = true; },
	    function() { obj.Images.stop().animate({ opacity: 1 }, 150); } //function() { obj.Images.stop().animate({ opacity: .75 }, 150); }
        );
}

function Js_Basket_Content_PopupImage(cssClassName)
{
    $("." + cssClassName).click(function() { return hs.expand(this, { align: 'center', slideshowGroup: cssClassName }); });
}

jQuery(
    function()
    {
        jQuery(".Css_Content_LinksToCommandSites_Select").change(
            function()
            {
                var value = (this).value;

                if (value != '')
                {
                    window.open(value, 'league');
                }
            }
        );

        new Js_Basket_Content_IlluminateImage("Content_BasketballRegions");
        
        try
        {
            var map = new YMaps.Map(document.getElementById("YMapsID"));
            map.setCenter(new YMaps.GeoPoint(37.598725,55.763072), 15);
			map.enableScrollZoom({'smooth' : true});
			map.addOverlay(createObject("Placemark", new YMaps.GeoPoint(37.592938,55.761217), "constructor#pmlbmPlacemark", "ООО \"РФБ\""));
       map.addOverlay(createObject("Polyline", [], "constructor#FF3732c85Polyline", ""));
       map.addOverlay(createObject("Polyline", [], "constructor#FF3732c85Polyline", ""));
       map.addOverlay(createObject("Polyline", [new YMaps.GeoPoint(37.6041,55.765108),new YMaps.GeoPoint(37.603344,55.764548),new YMaps.GeoPoint(37.602922,55.764244),new YMaps.GeoPoint(37.602755,55.764067),new YMaps.GeoPoint(37.602565,55.763891),new YMaps.GeoPoint(37.601588,55.764367),new YMaps.GeoPoint(37.601131,55.764588),new YMaps.GeoPoint(37.600795,55.764747),new YMaps.GeoPoint(37.600567,55.764882),new YMaps.GeoPoint(37.599732,55.764579),new YMaps.GeoPoint(37.598963,55.764289),new YMaps.GeoPoint(37.598025,55.763944),new YMaps.GeoPoint(37.597535,55.763735),new YMaps.GeoPoint(37.597088,55.76349),new YMaps.GeoPoint(37.596759,55.763321),new YMaps.GeoPoint(37.596516,55.763176),new YMaps.GeoPoint(37.595159,55.762547),new YMaps.GeoPoint(37.59432,55.762202),new YMaps.GeoPoint(37.593437,55.761966),new YMaps.GeoPoint(37.593046,55.761204)], "constructor#FF3732c810Polyline", ""));
       map.addOverlay(createObject("Polyline", [], "constructor#FF3732c85Polyline", ""));
        
        function createObject (type, point, style, description) {
            var allowObjects = ["Placemark", "Polyline", "Polygon"],
                index = YMaps.jQuery.inArray( type, allowObjects),
                constructor = allowObjects[(index == -1) ? 0 : index];
                description = description || "";
            
            var object = new YMaps[constructor](point, {style: style, hasBalloon : !!description});
            object.description = description;
            
            return object;
        }
        }
        catch (e)
        {
        }        
    }
);

