//var $J = jQuery.noConflict();
jQuery(document).ready(function(){
	
	$('.items_list tr:even').addClass('even');
	
	// search input
	$('#search label').click(function(){
		$(this).hide();
	});
	$('#search_input').blur(function(){
		if ($(this).val() == ''){
			$('#search label').show();
		}
	});
	$('#search_input').each(function(){
		if ($(this).val() != ''){
			$('#search label').hide();
		}
	});

    $('#msk a').mouseover(function(){
        $('#msk a').removeClass('active');
        $(this).addClass('active');
        $('#contacts .point').hide();
        $('#contacts .point-small').show();
        $('#point' + $(this).data('point') + '-small').hide();
        $('#point' + $(this).data('point')).show();
    });

    $('#contacts .point-small').hover(
        function(){
            $('#m'+$(this).data('point')).addClass('active').mouseover();
        },
        function(){
            $('#m'+$(this).data('point')).removeClass('active').mouseover();
        }
    );

    $('#contacts .point-small').click(function(){
        $('#m'+$(this).data('point')).addClass('active').mouseover();
    });
	
	$('a[href$=".jpg"], a[href$=".jpeg"], a[href$=".gif"], a[href$=".png"]').not('[rel="lightbox"]').slimbox();

    $('marquee').marquee('pointer').mouseover(function () {
        $(this).trigger('stop');
    }).mouseout(function () {
        $(this).trigger('start');
    }).mousemove(function (event) {
        if ($(this).data('drag') == true) {
            this.scrollLeft = $(this).data('scrollX') + ($(this).data('x') - event.clientX);
        }
    }).mousedown(function (event) {
        $(this).data('drag', true).data('x', event.clientX).data('scrollX', this.scrollLeft);
    }).mouseup(function () {
        $(this).data('drag', false);
    });
});

$(window).resize(function(){
	
});

