$(document).ready(function(){
	if(($.browser.msie) && ($.browser.version <= 6)) {
	//png fix
	$('img[@src$=png], ul#subMenu li.active a, body#inspector ul#subMenu li.active a, h2, .round').pngfix();
	}
	
	//main menu last item
	$("ul#mainMenu li:last a").hover(function(){
	  $(this).css({"background": "url(images/menu_left_hover.gif) right top no-repeat"});
	}, function(){
	  $(this).removeAttr("style");
	});
	
	//main menu inspector page last item
	$("body#inspector ul#mainMenu li:last a").css({"color":"#000"});
	$("body#inspector ul#mainMenu li:last a").hover(function(){
	  $(this).css({"background-image": "none"});
	}, function(){
	  $(this).removeAttr("style").css({"color":"#000"});
	});
	
	//search input
	if($('input#search')[0]){
		$('input#search').hint();
	}
	
	//qa`s
	/*$('.qanswer').click(function()
	  {
		$(this).parents().children('.qanswer').removeClass('green');
		$(this).parents().children().children('p').slideUp();
		$(this).parents().children('.qanswer').children('.qquestion').children('a.download').removeAttr("style");
		$(this).find('p').slideDown();
		$(this).find('a.download').css({"display":"block"});
		$(this).addClass("green")
		return false;
	  }
	);*/
	
	/*
	$('.qquestion').click(function()
	  {
	  	if($(this).parent('.qanswer').hasClass('green')) return false;
		$('.qanswer').removeClass('green');
		$('.qanswer p').slideUp();
		$('.qanswer a.download').removeAttr("style");
		$(this).parent().find('p').slideDown();
		$(this).parent().find('a.download').css({"display":"block"});
		$(this).parent('.qanswer').addClass("green")
		return false;
	  }
	);*/
	$(".qcategory > div.texts").hide();
	$(".qcategory").toggle(function () { $(this).next('div.texts').slideDown(); $(this).addClass('green'); }, 
						   function () { $(this).next('div.texts').slideUp(); $(this).removeClass('green');  });
	$(".qquestion").toggle(function () { $(this).next('div').slideDown(); $(this).addClass('green'); }, 
					   function () { $(this).next('div').slideUp(); $(this).removeClass('green');  });
	$("input[type=file]").not('.askUsForm input[type=file]').filestyle({ 
	    image: "fileadmin/images/filetype.gif",
	    imageheight : 22,
	    imagewidth : 82,
	    width : 186
	});
	
	$(".askUsForm input[type=file]").filestyle({ 
	    image: "fileadmin/images/filetype2.gif",
	    imageheight : 22,
	    imagewidth : 82,
	    width : 186
	});
	
	$(".tx-irfaq-pi1 .question").toggle(function () { $(this).next('div').slideDown()}, 
									   function () { $(this).next('div').slideUp(); });
	

});