$(function() {
        // open tree
        $('#'+lnk).css('color', '#f2b011').parents('.ltr ul').css('display','block')
        
        $('.ltr li li').not('.ltr li:first li').add('.ltr li:first li li').css('margin', '9px 0')
        $('.ltr a').each(function(){
            if(!$(this).attr('href'))
                $(this).attr('href','#')
        }).filter('a[href="#"]').click(function(){
            var block = $(this).parents('li:first').find('ul:first');
            if(block.filter(':visible').length)
                block.slideUp(50)
            else
                block.slideDown(50)
            return false;
        })
        $('.ltr a').not('a[href="#"]').click(function(e){
            $('#location').attr('action','/'+$(this).attr('href'))
            $('#lnk').val($(this).attr('id'))
            $('#location').submit()
            e.preventDefault()
        })
        $('.leftMenuItemGreen:first').parents('li:first').css('margin-top', '47px')
        $('#cameraswf').flash(
            {src: '/assets/templates/default/images/camera.swf',
              width: 215,
              height: 170,
              wmode : "transparent"
            },
            {version: 8}
        );
        $('#camera_mini').flash(
            {src: '/assets/templates/default/images/camera2.swf',
              width: 160,
              height: 123,
              wmode : "transparent"
            },
            {version: 8}
        );

        var radius = {radius: 4}
        var settings = {
          tl: radius,
          tr: radius,
          bl: radius,
          br: radius,
          antiAlias: true,
          autoPad: true,
          validTags: ["div"]
        }

        $('.roundedcorners').corner(settings).each(function(){
            $(this).width($('img', this).width())
        })
        var radius3 = {radius: 3}
        var settings3 = {
          tl: radius3,
          tr: radius3,
          bl: radius3,
          br: radius3,
          antiAlias: true,
          autoPad: true,
          validTags: ["div"]
        }
        $('.roundedcorners3').corner(settings3).each(function(){
            $(this).width($('img', this).width())
        })
        try {
            $.datepicker.setDefaults($.extend({showMonthAfterYear: false}, $.datepicker.regional['']));
            $(".datepicker").datepicker($.datepicker.regional['ru']);
        } catch (e) {}

        $('.footerw1 .block, .fc1, .fc2, .fc3, .cursor-pointer').click(function(){
            document.location = $(this).attr('href')
        })

});

var interval
var galleries={}

