$(function() {

    if ($(".balloon")[0]) {
        $('a', $('#content')).fancybox({
            'transitionIn'    :    'elastic',
            'transitionOut'    :    'elastic',
            'speedIn'        :    300,
            'speedOut'        :    200,
            'scrolling' : 'auto',
            'autoDimensions' : false
        });
    }

    if ($("#gmRu")[0]) {
        var myLatlng = new google.maps.LatLng(55.777695, 37.606732);
        var myOptions = {
            zoom: 14,
            center: myLatlng,
            mapTypeId: google.maps.MapTypeId.ROADMAP
        };
        var map = new google.maps.Map(document.getElementById("gmRu"), myOptions);
        var marker = new google.maps.Marker({
            position: myLatlng,
            map: map,
            title:"Investment Advisory Group International"
        });

        var myLatlng1 = new google.maps.LatLng(40.748266, -73.985311);
        var myOptions1 = {
            zoom: 14,
            center: myLatlng1,
            mapTypeId: google.maps.MapTypeId.ROADMAP
        };
        var map1 = new google.maps.Map(document.getElementById("gmEn"), myOptions1);
        var marker1 = new google.maps.Marker({
            position: myLatlng1,
            map: map1,
            title:"Investment Advisory Group International"
        });
    }


    $('.items', $('#news')).hide();

    $('.items:first', $('#news')).show();

    $('.sections li:first-child', $('#news')).find('a').addClass('active');


    $('.sections', $('#news')).delegate('a', 'click', function() {
        var el = $(this);

        $('.sections a', $('#news')).removeClass('active');
        $(this).addClass('active');

        $('.items', $('#news')).hide();

        $('#items-' + el.attr('id')).show();

        return false;
    });
});

