$(document).ready(function() {

  // png fix
  var hack={ltie7:$.browser.msie&&/MSIE\s(5\.5|6\.)/.test(navigator.userAgent),pixel:'imgs/pixel.gif',filter:function(src){return"progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true,sizingMethod=crop,src='"+src+"')"}};
  $.fn.pngfix=hack.ltie7?function(){return this.each(function(){var $$=$(this);if($$.is('img')){$$.css({filter:hack.filter($$.attr('src')),width:$$.width(),height:$$.height()}).attr({src:hack.pixel}).positionFix()}else{var image=$$.css('backgroundImage');if(image.match(/^url\(["'](.*\.png)["']\)$/i)){image=RegExp.$1;$$.css({backgroundImage:'none',filter:hack.filter(image)}).positionFix()}}})}:function(){return this};
  $.fn.positionFix=function(){return this.each(function(){var $$=$(this);var position=$$.css('position');if(position!='absolute'&&position!='relative'){$$.css({position:'relative'})}})};

  $('img[@src$=.png]').pngfix();
  
  var msie6=$.browser.msie && /MSIE\s(5\.5|6\.)/.test(navigator.userAgent);
	if(msie6){
    $('.box').css('background-color', '#383838'); $('.box').css('background-image', 'none');
    $('#footer').css('background-color', '#383838'); $('#footer').css('background-image', 'none');
    $('#main-null').css('background-color', '#232323'); $('#main-null').css('background-image', 'none');
    $('#header').css('background-color', '#232323'); $('#header').css('background-image', 'none');
  }
  
  var msie67=$.browser.msie && /MSIE\s(5\.5|6\.|7\.)/.test(navigator.userAgent);
	if(msie67){
    $('br.clear').after('<div class="clear"></div>');
    $(".tooltip").remove(); 
  } else {
    $(".prod > *").removeAttr("title");
    $(".prod > *").removeAttr("alt");
  }
  
  Cufon.replace('.cufon');
  $("input.toggleval").toggleVal();
   
  /* tooltip */
  $(".show-tooltip").hover(function() {
	$(this).next(".tooltip").stop(true, true).animate({opacity: "show", top: "50"}, "middle");
	}, function() {
	$(this).next(".tooltip").animate({opacity: "hide", top: "50"}, "fast");
	});

  
});
