// Image strip kiosk script
// iPressroom (c) 2009-2010
// v 1.7.0

// switch content for strip kiosks
function switchContent () {
 var kiosk = $(this).parents(".imageStrip");
 $(".newsBody-active", kiosk).empty()
  .append($(this).parents(".newsBody").clone(true));   
 
 $(".newsImageSmall a", kiosk).removeClass("active");
 $(this).addClass("active");
 return false;
};

// bind events for strip kiosks
function bindKioskStrip() {
 $(".imageStrip").each(function() {
  var links = $(".newsImageSmall a", this);
  links.click(switchContent);
  
  // activate first element
  if (links.length > 0) 
   switchContent.call(links[0]);
  
  // hide for single image
  if (links.length == 1)
   $("ul", this).hide();
   
  // colorbox option
  if ($(this).hasClass("imageStrip-colorbox"))
   $(".newsBody a", this).not(".newsImageSmall a").colorbox();
   
 });
};

$(function() {
 bindKioskStrip();
});


