$(document).ready(function(){
	// alert('1');
	$('input[type="text"], input[type="password"]').addClass('inp-txt');
	$('input[type="button"], input[type="submit"], input[type="reset"], button').addClass('inp-btn');
	$('input[type="button"], input[type="submit"], input[type="reset"], button, .button').wrap('<div class="button_wrap" />');
	$('header nav li').hover(function(){
		$(this).find('ul').stop(true,true).slideDown();
		$(this).addClass('hover');
	},function(){
		$(this).find('ul').stop(true,true).slideUp();
		$(this).removeClass('hover');
		Cufon('nav .siemens');
	});
	$('header nav li:last-child').css('background','none');
	$('header nav li:last-child ul').css({'left':'auto','right':'0','width':'123px'});
	$('.sb_brands article:last').css({'padding-bottom':'0','border':'0'});
	$('.index_col_1 article:last,.index_col_2 article:last').css('float','right');
	$('.index_col_2 article:first').css('position','relative').prepend('<span style="position:absolute;top:0;left:-10px;width:1px;height:150px;background:#e9e9e9;overflow:hidden" />');
	
	
	$('.sb_tabs a').click(function(){
		$('.sb_tabs a').removeClass('current');
		$('.sb_tabs_i article').hide();
		$(this).addClass('current');
		var sh_sbArticle = $(this).attr('href');
		$(sh_sbArticle).fadeIn();
		return false;
	});
	$('.sb_tabs_i a.parent').click(function(){
		$(this).parent().toggleClass('current');
		$(this).parent().find('ul').slideToggle();
		if($(this).parent('li').children('ul').html()){
			return false;
		}
		
		
	});

	$('.inner_tabs li:first').css('padding-left','0');
	$('.inner_tabs_menu li:first').css('padding-left','0');
	$('.inner_tabs li:last').css({'padding-right':'0','background':'none'});
	$('.inner_tabs_menu li:last').css({'padding-right':'0','background':'none'});
	
	
	
	$('.inner_tabs a:eq(0)').addClass('current');
	$('.inner_tab:eq(0)').show();
	
	var idAmedis = $('.inner_tabs li:first a').attr('href');


		$('.amedisdisplay').hide();
		$(idAmedis).show();
	
	$('.inner_tabs a').click(function(){
		$('.inner_tabs a').removeClass('current');
		$('.inner_tab').hide();
		$(this).addClass('current');
		var sh_innerArticle = $(this).attr('href');
		$(sh_innerArticle).fadeIn();
		return false;
	});

	$('ol li').wrapInner('<div class="innertext" />');

	$('.fileslist li:even,.articleslist article:even').css('margin-right','30px');

	// $('.podcast_i:first').show();
	$('.podcast .js_link').click(function(){
		$(this).parent().find('.podcast_i').slideToggle();
	});	
	// $('h3.cast').click(function(){
		// $(this).parent().find('.podcast_h3').slideToggle();
	// });

	$('table tr td:last-child').css('padding','0');
	$('table tr:last td').css('border','0');

	$('.partners_map area').hover(function(){
		var showArea = $(this).attr('href');
		$(showArea).show();
	},function(){
		var hideArea = $(this).attr('href');
		$(hideArea).hide();
	});

});


$(document).ready(function(){bind(this);});var bind = function(context){
$('.sitesearch input[type="text"], .spam input[type="text"], .ask_question input[type="text"], .ask_question textarea').each(function(){$(this).attr('default',$(this).val());});
$('.sitesearch input[type="text"], .spam input[type="text"], .ask_question input[type="text"], .ask_question textarea').focus(function(){if($(this).val()==$(this).attr('default')){$(this).val('');}});
$('.sitesearch input[type="text"], .spam input[type="text"], .ask_question input[type="text"], .ask_question textarea').blur(function(){if($(this).val()==''){$(this).val($(this).attr('default'));}});}
