$( document ).ready( function() {

	$( '#nav ul.general li' ).hover( function() {
	
		$( this ).children( 'a:first' ).addClass( 'active' );
		$( this ).children( 'ul' ).show();
		
	}, function() {
	
		$( this ).children( 'a:first' ).removeClass( 'active' );
		$( this ).children( 'ul' ).hide();
		
	});
	
	$( '#news .show-menu' ).click( function() {
		$( '#news .is-menu' ).toggle( );
		return false;
	});

	$( '#news .is-menu' ).click( function() {
		var id = $( this ).attr( 'id' ).replace( 'id_', '' );
		//$( '#news .is_cats' ).css( 'display', 'none' );
		$( '#news .row_id_' + id ).toggle( );
		return false;
	});
	
	$('a.lightbox').lightBox();
	
	$('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);
	});
	
});
