/* jquery visualistaion by Roman Lapaev, www.lapaev.com */





jQuery(function(){
	
});
var j = 0;
jQuery.fn.codaSlider = function(settings) {
	 settings = jQuery.extend({
     easeFunc: "expoinout",
     easeTime: 750,
     toolTip: false
  }, settings);
	return this.each(function(){
		var container = jQuery(this);
		// Remove the preloader gif...
		container.find("p.loading").remove();
		// Self-explanatory...
		container.removeClass("csw").addClass("stripViewer");
		// Get the width of a panel, set from CSS...
		var panelWidth = container.find("div.panel").width();
		// panelCount gives us a count of the panels in the container...
		var panelCount = container.find("div.panel").size();
		// Calculate the width of all the panels when lined up end-to-end...
		var stripViewerWidth = panelWidth*panelCount;
		// Use the above width to specify the CSS width for the panelContainer element...
		container.find("div.panelContainer").css("width" , stripViewerWidth);
		// Set the navWidth as a multiple of panelCount to account for margin-right on each li
		var navWidth = panelCount*2;
		
		// Specify the current panel.
		// If the loaded URL has a hash (cross-linking), we're going to use that hash to give the slider a specific starting position...
		if (location.hash && parseInt(location.hash.slice(1)) <= panelCount) {
			var cPanel = parseInt(location.hash.slice(1));
			var cnt = - (panelWidth*(cPanel - 1));
			jQuery(this).find("div.panelContainer").css({ left: cnt });
		// Otherwise, we'll just set the current panel to 1...
		} else { 
			var cPanel = 1;
		};
		
		// Create appropriate nav
		container.each(function(i) {
			
			// Create the Left and Right arrows
			jQuery(this).before("<div class='stripNavL' id='stripNavL" + j + "'><a href='#'>Left</a><\/div>");
			jQuery(this).before("<div class='stripNavR' id='stripNavR" + j + "'><a href='#'>Right</a><\/div>");
			
			
			
			// Tab nav
			jQuery("div#stripNav" + j + " a").each(function(z) {
				// Figure out the navWidth by adding up the width of each li
				navWidth += jQuery(this).parent().width();
				// What happens when a nav link is clicked
				jQuery(this).bind("click", function() {
					jQuery(this).addClass("current").parent().parent().find("a").not(jQuery(this)).removeClass("current"); // wow!
					var cnt = - (panelWidth*z);
					cPanel = z + 1;
					jQuery(this).parent().parent().parent().next().find("div.panelContainerz").animate({ left: cnt}, settings.easeTime, settings.easeFunc);
				});
			});
			
			// Left nav
			jQuery("div#stripNavL" + j + " a").click(function(){
				if (cPanel == 1) {
					var cnt = - (panelWidth*(panelCount - 1));
					cPanel = panelCount;
					jQuery(this).parent().parent().find("div.stripNav a.current").removeClass("current").parent().parent().find("li:last a").addClass("current");
				} else {
					cPanel -= 1;
					var cnt = - (panelWidth*(cPanel - 1));
					jQuery(this).parent().parent().find("div.stripNav a.current").removeClass("current").parent().prev().find("a").addClass("current");
				};
				jQuery(this).parent().parent().find("div.panelContainer").animate({ left: cnt}, settings.easeTime, settings.easeFunc);
				// Change the URL hash (cross-linking)...
				location.hash = cPanel;
				return false;
			});
			
			// Right nav
			jQuery("div#stripNavR" + j + " a").click(function(){
				if (cPanel == panelCount) {
					var cnt = 0;
					cPanel = 1;
					jQuery(this).parent().parent().find("div.stripNav a.current").removeClass("current").parent().parent().find("a:eq(0)").addClass("current");
				} else {
					var cnt = - (panelWidth*cPanel);
					cPanel += 1;
					jQuery(this).parent().parent().find("div.stripNav a.current").removeClass("current").parent().next().find("a").addClass("current");
				};
				jQuery(this).parent().parent().find("div.panelContainer").animate({ left: cnt}, settings.easeTime, settings.easeFunc);
				// Change the URL hash (cross-linking)...
				location.hash = cPanel;
				return false;
			});
			
			// Same-page cross-linking
			jQuery("a.cross-link").click(function(){
				jQuery(this).parents().find(".stripNav ul li a:eq(" + (parseInt(jQuery(this).attr("href").slice(1)) - 1) + ")").trigger('click');
			});	
			
			// Set the width of the nav using the navWidth figure we calculated earlier. This is so the nav can be centred above the slider
			jQuery("div#stripNav" + j).css("width" , navWidth);
			
			// Specify which tab is initially set to "current". Depends on if the loaded URL had a hash or not (cross-linking).
			if (location.hash && parseInt(location.hash.slice(1)) <= panelCount) {
				jQuery("div#stripNav" + j + " a:eq(" + (location.hash.slice(1) - 1) + ")").addClass("current");
			} else {
				jQuery("div#stripNav" + j + " a:eq(0)").addClass("current");
			}
			
		});
		
		j++;
  });
};



$(document).ready(function(){
   var navTimer = null;
    $("div#models").hover(function(){ 
    
    					
    					
       					 if ( navTimer ) {
       					   clearTimeout( navTimer );
       					   navTimer = null;
       					 } else

    	      			$("div#models").animate({opacity: 0}, 150).animate({ backgroundPosition: "-221px bottom"}, 100) .animate({opacity: 1}, 150)
    	      			
    }, function(){ 
    					navTimer = setTimeout(function(){
    	      			$("div#models").animate({opacity: 0}, 150)
     				   .animate({  backgroundPosition: "0px bottom"}, 100)
     				   .animate({opacity: 1}, 150)
     				 	 navTimer = null;
        }, 300);
     });
     
});

$(document).ready(function(){
   var navTimer = null;
    $("div#models_uk").hover(function(){ 
    
    					
    					
       					 if ( navTimer ) {
       					   clearTimeout( navTimer );
       					   navTimer = null;
       					 } else

    	      			$("div#models_uk").animate({opacity: 0}, 150).animate({ backgroundPosition: "-221px bottom"}, 100) .animate({opacity: 1}, 150)
    	      			
    }, function(){ 
    					navTimer = setTimeout(function(){
    	      			$("div#models_uk").animate({opacity: 0}, 150)
     				   .animate({  backgroundPosition: "0px bottom"}, 100)
     				   .animate({opacity: 1}, 150)
     				 	 navTimer = null;
        }, 300);
     });
     
});


$(document).ready(function(){
   var navTimer = null;
    $("div#models_en").hover(function(){ 
    
    					
    					
       					 if ( navTimer ) {
       					   clearTimeout( navTimer );
       					   navTimer = null;
       					 } else

    	      			$("div#models_en").animate({opacity: 0}, 150).animate({ backgroundPosition: "-221px bottom"}, 100) .animate({opacity: 1}, 150)
    	      			
    }, function(){ 
    					navTimer = setTimeout(function(){
    	      			$("div#models_en").animate({opacity: 0}, 150)
     				   .animate({  backgroundPosition: "0px bottom"}, 100)
     				   .animate({opacity: 1}, 150)
     				 	 navTimer = null;
        }, 300);
     });
     
});


$(document).ready(function(){
      var navTimer2 = null;
    $("div#where-to-buy").hover(function(){ 
    
    					
    					
       					 if ( navTimer2 ) {
       					   clearTimeout( navTimer2 );
       					   navTimer2 = null;
       					 } else

    	      			$("div#where-to-buy").animate({opacity: 0}, 150).animate({ backgroundPosition: "-221px bottom"}, 100) .animate({opacity: 1}, 150)
    	      			
    }, function(){ 
    					navTimer2 = setTimeout(function(){
    	      			$("div#where-to-buy").animate({opacity: 0}, 150)
     				   .animate({  backgroundPosition: "0px bottom"}, 100)
     				   .animate({opacity: 1}, 150)
     				 	 navTimer2 = null;
        }, 300);
     });
     
});


$(document).ready(function(){
      var navTimer2 = null;
    $("div#where-to-buy_uk").hover(function(){ 
    
    					
    					
       					 if ( navTimer2 ) {
       					   clearTimeout( navTimer2 );
       					   navTimer2 = null;
       					 } else

    	      			$("div#where-to-buy_uk").animate({opacity: 0}, 150).animate({ backgroundPosition: "-221px bottom"}, 100) .animate({opacity: 1}, 150)
    	      			
    }, function(){ 
    					navTimer2 = setTimeout(function(){
    	      			$("div#where-to-buy_uk").animate({opacity: 0}, 150)
     				   .animate({  backgroundPosition: "0px bottom"}, 100)
     				   .animate({opacity: 1}, 150)
     				 	 navTimer2 = null;
        }, 300);
     });
     
});


$(document).ready(function(){
      var navTimer2 = null;
    $("div#where-to-buy_en").hover(function(){ 
    
    					
    					
       					 if ( navTimer2 ) {
       					   clearTimeout( navTimer2 );
       					   navTimer2 = null;
       					 } else

    	      			$("div#where-to-buy_en").animate({opacity: 0}, 150).animate({ backgroundPosition: "-221px bottom"}, 100) .animate({opacity: 1}, 150)
    	      			
    }, function(){ 
    					navTimer2 = setTimeout(function(){
    	      			$("div#where-to-buy_en").animate({opacity: 0}, 150)
     				   .animate({  backgroundPosition: "0px bottom"}, 100)
     				   .animate({opacity: 1}, 150)
     				 	 navTimer2 = null;
        }, 300);
     });
     
});



$(document).ready(function(){
      var navTimer3 = null;
    $("div#varanty").hover(function(){ 
    
    					
    					
       					 if ( navTimer3 ) {
       					   clearTimeout( navTimer3 );
       					   navTimer3 = null;
       					 } else

    	      			$("div#varanty").animate({opacity: 0}, 150).animate({ backgroundPosition: "-221px bottom"}, 100) .animate({opacity: 1}, 150)
    	      			
    }, function(){ 
    					navTimer3 = setTimeout(function(){
    	      			$("div#varanty").animate({opacity: 0}, 150)
     				   .animate({  backgroundPosition: "0px bottom"}, 100)
     				   .animate({opacity: 1}, 150)
     				 	 navTimer3 = null;
        }, 300);
     });
     
});


$(document).ready(function(){
      var navTimer3 = null;
    $("div#varanty_uk").hover(function(){ 
    
    					
    					
       					 if ( navTimer3 ) {
       					   clearTimeout( navTimer3 );
       					   navTimer3 = null;
       					 } else

    	      			$("div#varanty_uk").animate({opacity: 0}, 150).animate({ backgroundPosition: "-221px bottom"}, 100) .animate({opacity: 1}, 150)
    	      			
    }, function(){ 
    					navTimer3 = setTimeout(function(){
    	      			$("div#varanty_uk").animate({opacity: 0}, 150)
     				   .animate({  backgroundPosition: "0px bottom"}, 100)
     				   .animate({opacity: 1}, 150)
     				 	 navTimer3 = null;
        }, 300);
     });
     
});

$(document).ready(function(){
      var navTimer3 = null;
    $("div#varanty_en").hover(function(){ 
    
    					
    					
       					 if ( navTimer3 ) {
       					   clearTimeout( navTimer3 );
       					   navTimer3 = null;
       					 } else

    	      			$("div#varanty_en").animate({opacity: 0}, 150).animate({ backgroundPosition: "-221px bottom"}, 100) .animate({opacity: 1}, 150)
    	      			
    }, function(){ 
    					navTimer3 = setTimeout(function(){
    	      			$("div#varanty_en").animate({opacity: 0}, 150)
     				   .animate({  backgroundPosition: "0px bottom"}, 100)
     				   .animate({opacity: 1}, 150)
     				 	 navTimer3 = null;
        }, 300);
     });
     
});


$(document).ready(function(){
      var navTimer4 = null;
    $("div#why").hover(function(){ 
    
    					
    				
       					 if ( navTimer4 ) {
       					   clearTimeout( navTimer4 );
       					   navTimer4 = null;
       					 } else

    	      			$("div#why").animate({opacity: 0}, 150).animate({ backgroundPosition: "-221px top"}, 100) .animate({opacity: 1}, 150)
    	      			
    }, function(){ 
    					navTimer4 = setTimeout(function(){
    	      			$("div#why").animate({opacity: 0}, 150)
     				   .animate({  backgroundPosition: "0px top"}, 100)
     				   .animate({opacity: 1}, 150)
     				 	 navTimer4 = null;
        }, 300);
     });
     
});


$(document).ready(function(){
      var navTimer4 = null;
    $("div#why_uk").hover(function(){ 
    
    					
    				
       					 if ( navTimer4 ) {
       					   clearTimeout( navTimer4 );
       					   navTimer4 = null;
       					 } else

    	      			$("div#why_uk").animate({opacity: 0}, 150).animate({ backgroundPosition: "-221px top"}, 100) .animate({opacity: 1}, 150)
    	      			
    }, function(){ 
    					navTimer4 = setTimeout(function(){
    	      			$("div#why_uk").animate({opacity: 0}, 150)
     				   .animate({  backgroundPosition: "0px top"}, 100)
     				   .animate({opacity: 1}, 150)
     				 	 navTimer4 = null;
        }, 300);
     });
     
});


$(document).ready(function(){
      var navTimer4 = null;
    $("div#why_en").hover(function(){ 
    
    					
    				
       					 if ( navTimer4 ) {
       					   clearTimeout( navTimer4 );
       					   navTimer4 = null;
       					 } else

    	      			$("div#why_en").animate({opacity: 0}, 150).animate({ backgroundPosition: "-221px top"}, 100) .animate({opacity: 1}, 150)
    	      			
    }, function(){ 
    					navTimer4 = setTimeout(function(){
    	      			$("div#why_en").animate({opacity: 0}, 150)
     				   .animate({  backgroundPosition: "0px top"}, 100)
     				   .animate({opacity: 1}, 150)
     				 	 navTimer4 = null;
        }, 300);
     });
     
});



$(document).ready(function(){
    $("#footersection a").hover(function(){ 
    
      $(this).animate({color: '#c64b46'}, 300) 
      		 .animate({borderBottomColor: 'black'}, 300)  
      return false;
      
    }, function(){ 
    
      $(this).animate({borderBottomColor: 'white'}, 300) 
      		 .animate({color: '#666'}, 300) 
      		 
    
      return false;
    });
});






$(document).ready(function(){
var navTimer = null;
		    $("#modelz").hover(function(){ 
		    if ( navTimer ) {
          	clearTimeout( navTimer );
         	 navTimer = null;
        	} else

		    
		      $("#spam").animate({top: "22px"}, 300);
		  
		      
		    }, function(){ 
		   	navTimer = setTimeout(function(){
		      $("#spam").animate({top: "-1000px"}, 300);
		      navTimer = null;
       			 }, 300);
		    });
		});	 
	
$(document).ready(function(){
var navTimer = null;
		    $("#thewar").hover(function(){ 
		    if ( navTimer ) {
          	clearTimeout( navTimer );
         	 navTimer = null;
        	} else

		    
		      $("#spam2").animate({top: "22px"}, 300);
		  
		      
		    }, function(){ 
		   	navTimer = setTimeout(function(){
		      $("#spam2").animate({top: "-1000px"}, 300);
		      navTimer = null;
       			 }, 300);
		    });
		});	 
		
$(document).ready(function(){
var navTimer = null;
		    $("#qual").hover(function(){ 
		    if ( navTimer ) {
          	clearTimeout( navTimer );
         	 navTimer = null;
        	} else

		    
		      $("#spam3").animate({top: "22px"}, 300);
		  
		      
		    }, function(){ 
		   	navTimer = setTimeout(function(){
		      $("#spam3").animate({top: "-1000px"}, 300);
		      navTimer = null;
       			 }, 300);
		    });
		});	 











$(document).ready(function(){
    $(".linker").hover(function(){ 
    
      $(this).animate({color: 'red'}, 300) 
      		 .animate({borderBottomColor: 'black'}, 300)  
      return false;
      
    }, function(){ 
    
      $(this).animate({borderBottomColor: '#ccc'}, 300) 
      		 .animate({color: '#666'}, 300) 
      		 
    
      return false;
    });
});



 
 
 
 
 
 
 
 

$(document).ready(function(){
    $(".more").hover(function(){ 
    
      $(this).animate({color: 'red'}, 300) 
      		 .animate({borderBottomColor: 'black'}, 300)  
      return false;
      
    }, function(){ 
    
      $(this).animate({borderBottomColor: 'white'}, 300) 
      		 .animate({color: 'black'}, 300) 
      		 
    
      return false;
    });
});


$(document).ready(function(){
    $("a.catimg").hover(function(){ 
    
      $(this).animate({color: 'red'}, 100)
      return false;
  
      
    }, function(){ 
    
      $(this).animate({color: 'black'}, 100)
      return false;
    });
});	 



$(document).ready(function(){



	$("span.nameofimages").append('')

	$("a.catimg").hover(function(){
	
		var largePath = $(this).attr("rel");
		var largeAlt = $(this).attr("title");
		var largeAltSub = $(this).attr("sub");
		
		
		$("#largeImg")	
		.attr({ src: largePath, alt: largeAlt });
		
		
		$("span.nameofimages").html(largeAlt);
		$("span.subnameofimages").html(largeAltSub);
		
		return false;
	});
	
});


$(document).ready(function(){

	
	$(".deallersexpand").click(function(){
	  $(".aboutdeallers").slideToggle("slow");
	});
	

});

$(document).ready(function(){

	
	$(".deallersexpand2").click(function(){
	  $(".aboutdeallers2").show("slow");
	  	
	});
	
	$(".deallersexpand3").click(function(){
	  $(".aboutdeallers2").hide("slow");
	});
	
	

});





$(document).ready(function(){


	$(".deallerz").click(function(){
		$(this).next(".aboutdeallers2").slideToggle("slow")
		
		return false;
	});


});

$(document).ready(function(){

	$(".whatforc").hide();
	$(".whatfor").click(function(){
	  $(".whatforc").slideToggle();	  	
	});

});

$(document).ready(function(){

	$(".dangerc").hide();
	$(".danger").click(function(){
	  $(".dangerc").slideToggle();	  	
	});

});



$(document).ready(function(){

	hidder = true;
	
	$(".map").hide();
	$(".smap").click(function(){
	
	if (hidder == true) {	
	  	$(".map").show("slow");
	  	$("a.smap").html('Скрыть карту &uarr;');
		hidder = false;
	} else {  
		$(".map").hide("slow");
	  	$("a.smap").html('Показать карту &darr;');	
	 	hidder = true;
	 }
	
	});
	
	

});

$(document).ready(function(){

	hidder2 = true;
	
	$("#2dmap").hide();
	$(".smap2").click(function(){
	
	if (hidder2 == true) {	
	  	$("#2dmap").show("slow");
	  	$("a.smap2").html('Скрыть карту &uarr;');
		hidder2 = false;
	} else {  
		$("#2dmap").hide("slow");
	  	$("a.smap2").html('Показать карту &darr;');	
	 	hidder2 = true;
	 }
	
	});
	
	

});

$(document).ready(function(){

	hidder3 = true;
	
	$("#3dmap").hide();
	$(".smap3").click(function(){
	
	if (hidder3 == true) {	
	  	$("#3dmap").show("slow");
	  	$("a.smap3").html('Скрыть карту &uarr;');
		hidder3 = false;
	} else {  
		$("#3dmap").hide("slow");
	  	$("a.smap3").html('Показать карту &darr;');	
	 	hidder3 = true;
	 }
	
	});
	
	

});







