<!-- Begin
function testcode(urlcode,reductioncode) {

mypop = window.open(urlcode,"testcode","width=360, height=200");

if( window.clipboardData && clipboardData.setData )
{
   clipboardData.setData("Text", reductioncode);
}
}

function showcode(url) {
{	
var i = 1;
if ( document.getElementById && document.form.pop.value == '0' )
	{
	while ( document.getElementById( 'code' + i) )
		{
			Divcode = document.getElementById( 'code' + i );
			Divbutton = document.getElementById( 'button' + i );
			if ( Divcode != '' )
				{
				Divbutton.innerHTML = Divcode.innerHTML;
				i++;
				}
		}
	window.open(url,'boutique','top=0,left=0,width=800,height=600,scrollbars=1,location=1,menubar=1,resizable=1');
	}	
	document.form.pop.value = '1';
}
}

function showonecode(url,jj) {
{	
var i = 1;
if ( document.getElementById )
	{
	while ( document.getElementById( 'code' + i) )
		{
			Divcode = document.getElementById( 'code' + i );
			Divbutton = document.getElementById( 'button' + i );
			if ( i == jj )
				{
				Divbutton.innerHTML = Divcode.innerHTML;
				}
			i++;
		}
	}	
}
window.open(url,'boutique','top=0,left=0,width=800,height=600,scrollbars=1,location=1,menubar=1,resizable=1');
}

function seewin(url) {
window.open(url,'boutique','top=0,left=0,width=800,height=600,scrollbars=1,location=1,menubar=1,resizable=1');
}
//  End -->

/*btoolbar*/

$(document).ready(function(){
 
	$(".rss-popup img").hover(function() {
	$(this).next("em").stop(true, true).animate({opacity: "show", top: "-90"}, "slow");
	}, function() {
	$(this).next("em").animate({opacity: "hide", top: "-110"}, "fast");
	});
 
});

function favoris() {
if ( navigator.appName != 'Microsoft Internet Explorer' )
{ window.sidebar.addPanel("code-reduction.info","http://www.code-reduction.info",""); }
else { window.external.AddFavorite("http://www.code-reduction.info","code-reduction.info"); } }


$(document).ready(function(){

	function adPostWidth() {
		
		var ovWid = $('#header').width();
		var postN = Math.floor(ovWid / 250);
		var widFix = Math.floor(ovWid / postN);
		
		$(".post_cont").css({ 'width' : widFix});

	}
  
  function WidthHead() {
		
		var ovWid = $('#header').width(); 
		var widFixHead = Math.floor(ovWid / 3);
		
		$(".head_info").css({ 'width' : widFixHead - 2});

	}
	
	adPostWidth();
  WidthHead();	

	$(window).resize(function () {
		adPostWidth();	
    WidthHead();	
	});
	
	$("span.downarr a").click(function() {
    $("#toolbar").slideToggle("fast");
    $("#toolbarbut").fadeIn("slow");    
  });
  
  $("span.showbar a").click(function() {
    $("#toolbar").slideToggle("fast");
    $("#toolbarbut").fadeOut();    
  });
  
  $("ul#social li").hover(function() {
		$(this).find("div").fadeIn("fast").show(); 
    $(this).mouseleave(function () { 
        $(this).find("div").hide();
    });
  });
  
  $(".accelerator, .facebook, .twitter, .delicious, .newsletter, .rss, .menutit, span.downarr a, span.showbar a").click(function() {
   return false;                                         
	});
	
});