

$(document).ready(function(){ 
	
  $("ul.sf-menu").superfish({ 
         pathClass:  'current' 
  }); 
		

	  $("ul#menu_with_hover li").hover(
	      function () {
	        $(this).addClass("selected_event");
	      }, 
	      function () {
	        $(this).removeClass("selected_event");
	
	   });

 
	  

	  $('#tab_container').tabs();
	  
	  $('#tab_container_noajax').tabs(
	    {
		    select: function(event, ui) {
		        var url = $.data(ui.tab, 'load.tabs');
		        if( url ) {
		            location.href = url;
		            return false;
		        }
		        return true;
		    }
		}
	  );


/*	  $("#teaser_slide_1").show();
	  $("#teaser_slide_2").hide();
	  $("#teaser_slide_3").hide();
*/
	
	
	//----------registration 
	/*
	jq_country_id
	jq_region_id
	jq_city_id
	jq_city_other
	 */

	  $(".jq_country_id").parent().hide();
	  $(".jq_city_other").parent().hide();
	  

	  $(".jq_region_id").change(function () {
		  
				  if( $(this).attr("value") == 9 )
				  {
					 $(this).parent().hide();  
					  $(".jq_city_id").parent().hide();
					  
					  $(".jq_country_id").parent().show();
					  $(".jq_city_other").parent().show();
				  }
		});
	  
	  $(".jq_country_id").change(function () {
		  
		  if( $(this).attr("value") == 703 )
		  {
			  
			  $(".jq_region_id").parent().show();
			  $(".jq_city_id").parent().show();
			  
			  $(".jq_country_id").parent().hide();
			  $(".jq_city_other").parent().hide();
		  }
		});

  
//--------------vehyce type	

	  $(".jq_vehicle_brand_id").live("change", function(){
		 // alert('ok');
		  $(".jq_vehicle_type_id").load("/homepage/getSelectsByBrand", { 'id': $(this).attr("value") } );
	
		});
 

//------------------------------  
	
	  $('.hover-star').rating({ 

	  });
	  
}); 
	