$(document).ready(function() {
   
   Cufon.replace('h2'); // Works without a selector engine
   Cufon.replace('#mainmenu a'); // Requires a selector engine for IE 6-7, see above
   
   $("a[href*='http://utebutiken.e-butik.se']").click(function(){
      window.open(this.href,'swindow','width=960,height=715');
      return false;
      });
   
   //$("div.t10picture a").css("outline","0");
   $("div.t10picture #info").each(function() {
      $(this).click(function(){ $(this).siblings("a").eq(0).click();}).css("cursor","pointer");
   });
   $("div.t10picture").bind("mouseenter focusin",function(){$(this).children("#underline,#info").show();}
      ).bind("mouseleave focusout", function(){$(this).children("#underline,#info").fadeOut('fast');});

   $("div.t10text a").each(function(intIndex){
      var id = $(this).attr("p");
      $(this).bind("mouseover focus",
      function(){$("div#p"+id+".t10picture").trigger("focusin");}).bind("mouseout blur",
      function(){$("div#p"+id).trigger('mouseleave');});
   });

   
   //handle external links
   $("a[href*='http://']:not([href*='"+location.hostname+"']),[href*='https://']:not([href*='"+location.hostname+"'])").addClass("external")
   $("a.external").attr("target","_blank");
});
