/*
 * Plusmedia — scroll íåîáû÷àéíûé.
 * */
 
 var locked = false;
jQuery.fn.extend({
scrgal: function(options){
	this.initOptions = options;
	var b = this;
    
	this.getItemsWidth2 = function(self){
	
		var items = $(self).find('.vitems');
		
		var size = 0;
		items.find('div').each(function(i, obj){
			size += $(obj).outerWidth(true);
			
		});
	
		return size;
	}
   
	$(this).mousemove(function(e){       
		e = e || window.event;
		var mx = e.pageX || e.clientX;
		var of = b.offset();
		mx-=of.left;	
		
		//window.alert(b.width());
      
		var move = mx/parseFloat(b.width()) * (b.getItemsWidth2 (b)-b.width());
        var ll = move+parseFloat(b.find('div.vitems').css('margin-left'));
        
		    b.find('div.vitems').css({'margin-left':-move+'px'});
		    if ($.browser.msie) {
			    b.find('div.vitems').stop();
			    b.find('div.vitems').animate({'marginLeft':-move+'px'}, "fast");
		    }
      
    });
}});

$(document).ready(function(){
    $('div.voodoo div.vitems div.vitem img').each(function(i, obj){
        $(obj).css({'opacity':0.9});
       $(obj).mouseover(function (e){
          if (!locked){  $(this).stop();
            $(this).fadeTo("fast", 1.0);
          }
        });
        $(obj).mouseout(function (e){
             if (!locked){ // $(this).stop();
            $(this).stop();
            $(this).fadeTo("slow", 0.9);
             }
        });              
    });
});
