$(document).ready(function(){
  
  $("#competition_type_select").prepend("<div class=\"or\"></div>");
  $("fieldset.competition_form ol").each(function(){
    $(this).find("li:last").css('border-bottom','0');
  });
  $("fieldset.competition_form").hide();
  $("#please_select_competition").show();
  
  $("#competition_type_select a").click(function(){
    $("#please_select_competition").slideUp();
    $("fieldset.competition_form").slideUp();
    $($(this).attr("href")).slideDown();
    $("#competition_type_select a").removeClass("active");
    $("#competition_type_select .or").attr("id",$(this).attr("rel"));
    $(this).addClass("active");
    return false;
  });
  
  $("body.index #content .index_wrap h3.title").hover(function(){
    $(this).addClass("hover");
  },function(){
    $(this).removeClass("hover");
  });
  
  $("#whats_on_specials .whats_on_specials_content:last").hide();
  $("#whats_on_specials_select").show();
  $("#whats_on_specials_select li a").click(function(){
    $("#whats_on_specials_select li a").removeClass("active");
    $(this).addClass("active");
    $("#whats_on_specials .whats_on_specials_content").slideUp();
    $($(this).attr("href")).slideDown();
    return false;
  })
  
  $("#noticeboard .noticeboard_content:last").hide();
  $("#noticeboard_select").show();
  $("#noticeboard_select li a").click(function(){
    $("#noticeboard_select li a").removeClass("active");
    $(this).addClass("active");
    $("#noticeboard .noticeboard_content").slideUp();
    $($(this).attr("href")).slideDown();
    return false;
  })
  
  $("#content .column #noticeboard div.noticeboard_content h3.title").hover(function(){
    $(this).addClass("hover");
  },function(){
    $(this).removeClass("hover");
  });
  
  $("#content .column #whats_on_specials div#specials h3.title").hover(function(){
    $(this).addClass("hover");
  },function(){
    $(this).removeClass("hover");
  });
  
  
  $(".shop_listing").each(function(){
    $(this).find("li:first").css("border-top","0");
    $(this).find("li:last").css("border-bottom","0");
  });
  
})
Shadowbox.init();