//нихренаська

//===========================================================================================

//классы для всех inputов

//input-checkbox
$(document).ready(function() {													 
	$("input").each(function(){$(this).addClass("input-"+ $(this).attr("type"));});													 
  $("input[@type=checkbox]").each( function(){
	  $(this).after("<div class='check0'>&nbsp;</div>");			 
		$("input[@checked] ~ div.check0").addClass("check1");	 
	  $(this).css( "display", "none" );	 
	});	
	$("input[@type=checkbox] ~ div").click(function(){ //alert("Ты чё чувак");
		$(this).toggleClass("check1");
		if ($(this).hasClass("check1")) $(this).siblings("input").attr("checked", "checked");
		else $(this).siblings("input").removeAttr("checked");	
	});
	
	//input-radiobutton     радиобатон должен быть в спане!!!!
	$("input[@type=radio]").each( function(){
		$(this).after("<div class='radio0'>&nbsp;</div>");			 
		$("input[@checked] ~ div.radio0").addClass("radio1");
		$(this).css( "display", "none" );
	});
	$("input[@type=radio] ~ div").click(function(){ //alert("Ты чё чувак");																													
		$("div.radio1").removeClass("radio1");																										
		$(this).toggleClass("radio1");
		if ($(this).hasClass("radio1")) $(this).siblings("input").attr("checked", "checked");
		else $(this).siblings("input").removeAttr("checked");	
	});	
	
});

//===========================================================================================



//===========================================================================================

//классы для всех основных браузеров

$(document).ready(function() {
	
 if($.browser.msie)  $("body").addClass("ie");	
 if($.browser.msie && $.browser.version == 6) $("body").addClass("ie6");
 if($.browser.msie && $.browser.version == 7) $("body").addClass("ie7");
 if($.browser.opera ) $("body").addClass("opera");
 if($.browser.mozilla) $("body").addClass("ffox");
 if($.browser.safari) $("body").addClass("safari");   							 
													 
});

