{"version":3,"sources":["modernizr.js","isMobile.js","shareTools.js","owl.carousel.js","cnnmoney.video.special.originals.NEW.js","specials.videocontrols.js","site.js"],"names":[],"mappings":"AAAA;AACA;AACA;ACFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC5zEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AClsGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACl/HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC1IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"global.js","sourcesContent":["/*! modernizr 3.3.1 (Custom Build) | MIT *\n * https://modernizr.com/download/?-touchevents-setclasses !*/\n!function(e,n,t){function o(e,n){return typeof e===n}function s(){var e,n,t,s,a,i,r;for(var l in c)if(c.hasOwnProperty(l)){if(e=[],n=c[l],n.name&&(e.push(n.name.toLowerCase()),n.options&&n.options.aliases&&n.options.aliases.length))for(t=0;t 0) {\n if (typeof(business) == \"undefined\") {\n business = {\n mny: {\n bubble_quotes: 0\n }\n };\n }\n }\n },\n social_track: function(h, a) {\n var g = \"\";\n var c = this.trackvalues.social[h];\n var f = {\n type: \"social-click\"\n };\n if (typeof a === \"undefined\" || a == null) {\n g = window.location.href;\n } else {\n g = a;\n } if (c != null && g != \"\") {\n try {\n f.data = {\n clickObj: {\n socialType: c,\n pageName: g\n }\n };\n trackMetrics(f);\n } catch (d) {}\n }\n },\n incBubbleCount: function() {\n try {\n business.mny.bubble_quotes++;\n } catch (a) {}\n },\n log: function(c, a) {\n try {\n switch (c) {\n case \"quote\":\n if (this.quoteRegistered == false) {\n logMetrics({\n \"action\": c,\n \"data\": {\n \"component\": a\n }\n });\n this.quoteRegistered = true;\n }\n break;\n case \"navclick\":\n case \"navhover\":\n case \"quotehover\":\n logMetrics({\n \"action\": c,\n \"data\": {\n \"component\": a\n }\n });\n break;\n }\n } catch (d) {}\n }\n};\neventLogger.init();\n\nvar cnnm_sourcing = {\n sourceTypes: {\n cnnmoney: \"CNN\",\n fortune: \"FORT\",\n moneymag: \"MONEY\"\n },\n getURLSource: function(a) {\n source = this.sourceTypes.cnnmoney;\n var b = a.split(\"http://\");\n if (b.length > 1) {\n b = b[1].split(\"/\");\n b = b[0];\n }\n if (a.indexOf(\".fortune\") != -1 || a.indexOf(\"magazines/fortune\") != -1) {\n source = this.sourceTypes.fortune;\n }\n if (a.indexOf(\".moneymag\") != -1 || a.indexOf(\"magazines/moneymag\") != -1) {\n source = this.sourceTypes.moneymag;\n }\n switch (b) {\n case (\"features.blogs.fortune.cnn.com\"):\n case (\"finance.fortune.cnn.com\"):\n case (\"management.fortune.cnn.com\"):\n case (\"postcards.blogs.fortune.cnn.com\"):\n case (\"tech.fortune.cnn.com\"):\n case (\"techland.blogs.fortune.cnn.com\"):\n case (\"thewheeldeal.blogs.fortune.cnn.com\"):\n case (\"stanleybing.blogs.fortune.cnn.com\"):\n source = this.sourceTypes.fortune;\n break;\n case (\"moremoney.blogs.money.cnn.com\"):\n case (\"readerschoice.blogs.money.cnn.com\"):\n case (\"helpdesk.blogs.money.cnn.com\"):\n source = this.sourceTypes.moneymag;\n break;\n case (\"cnnmoneytest.wordpress.com\"):\n case (\"cnnmoneytalkback.blogs.cnnmoney.cnn.com\"):\n case (\"smallbusiness.blogs.cnnmoney.cnn.com\"):\n default:\n }\n return source;\n }\n};\n\n/**\n * Sharebar types\n * 1. Main - page level sharing\n * 2. Float - page level sharing\n * 3. Tout/summary - multiple on a page is possible\n *\n * [Meta] URL_____________________ Priority: OG:Url > meta url > location\n * Default - with index.htm Galleries - share first page (w/o index.htm)\n *\n * [Meta] Description_____________________ If sharing a feature list snapshot\n * use - Title Else - H1 tag Else - Meta description Else - Title\n *\n * [Brand] Facebook_____________________ [Brand] Twitter_____________________\n * [Brand] LinkedIn_____________________ [Brand] Google+_____________________\n * [Brand] Pinterest____________________ [Brand] Email &\n * Print_____________________ [Brand] Disqus identifiers_____________________\n *\n * [Brand] Bit.ly_____________________ Twitter - uses shortned URL CNNMoney\n * sourced stories only Postponed - Video, Galleries, Blogs , & other sources\n *\n * Special cases_____________________ Featured lists, snapshots\n *\n * Browser Compatibility_____________________ IE 6 FB - not rendered\n *\n * IE < 9 G+1 - not rendered\n *\n *\n */\nif (typeof CNNM === \"undefined\") {\n var CNNM = {};\n}\nif (typeof cnnmsocial === \"undefined\") {\n var cnnmsocial = {};\n}\n\n\ncnnmsocial.facebook = {\n shareURL: '', // share URL include index.html\n btn_class: 'js-share-fb',\n btnlike_class: 'js-share-fbrec',\n $btn_like: null,\n likereaction: null,\n verb: 'recommend',\n showcount_like: true,\n appID: '',\n killswitch: false,\n\n addbutton: function ($btnsbin, sharedata) {\n\n $btnsbin.append(this.getbutton(sharedata));\n\n var $button = $btnsbin.find('.'+this.btn_class);\n\n this.addshareonlick($button)\n\n /* set button element selector for page level share button */\n if(typeof sharedata === 'undefined') {\n this.$btn = $button;\n }\n },\n addlikebutton: function ($btnsbin) {\n if (CNNM.Social.browser.cnnIE6) {\n return;\n }\n\n //$btnsbin.append(''+this.getlikebutton()+'');\n //this.$btn_like = $btnsbin.parent().find('.'+this.btnlike_class);\n\n },\n addshareonlick: function ($button) {\n if (jQuery.isFunction(jQuery.fn.on)) {\n $button.on(\"click\", function (e) {\n e.preventDefault();\n jQuery('.popover').removeClass(\"active\");\n window.open(this.href, 'facebook', 'height=300,width=665');\n eventLogger.social_track('fb-share');\n return false;\n });\n } else {\n $button.live(\"click\", function (e) {\n e.preventDefault();\n jQuery('.popover').removeClass(\"active\");\n window.open(this.href, 'facebook', 'height=300,width=665');\n eventLogger.social_track('fb-share');\n return false;\n });\n }\n },\n refresh: function ($sharebar) {\n var $button;\n var $buttonlike;\n var newbuttonadded = false;\n if (typeof $sharebar === 'undefined' || $sharebar == null) {\n return;\n }\n\n $button = $sharebar.find('.'+this.btn_class);\n $buttonlike = $sharebar.find('.'+this.btnlike_class);\n\n if ($button.length) {\n $button.replaceWith(this.getbutton());\n newbuttonadded = true;\n \n var $button = $sharebar.find('.'+this.btn_class);\n this.addshareonlick($button);\n }\n\n if ($buttonlike.length) {\n $buttonlike.html(this.getlikebutton());\n newbuttonadded = true;\n }\n\n if(newbuttonadded) {\n this.loadscript(); \n }\n },\n /* getbutton can act as a global util function that returns a share button with using sharedata\n or it default to the metadata already defined\n */\n getbutton: function (sharedata) {\n sharedata = sharedata || {};\n var button = '';\n var shareurl = (typeof sharedata.url !== 'undefined')? sharedata.url : this.shareURL;\n var sharetitle = (typeof sharedata.title !== 'undefined')? sharedata.title : this.title;\n\n var encodedShareUrl = encodeURIComponent(shareurl);\n var encodedTitle = encodeURIComponent(sharetitle);\n\n button += '';\n\n return button;\n },\n getlikebutton: function () {\n var likebutton = '';\n if (CNNM.Social.browser.cnnIE6) {\n return;\n }\n likebutton = '
');\n\n var stag = document.createElement('script');\n stag.type = 'text/javascript';\n stag.src = '//connect.facebook.net/en_US/all.js#xfbml=1&appId='+cnnmsocial.facebook.appID;\n stag.async = true;\n document.getElementById('fb-root').appendChild(stag);\n } else {\n FB.XFBML.parse();\n }\n },\n\n setAppId: function (source) {\n switch (source) {\n case (cnnm_sourcing.sourceTypes.moneymag):\n cnnmsocial.facebook.appID = '459366314150755';\n break;\n case (cnnm_sourcing.sourceTypes.fortune):\n cnnmsocial.facebook.appID = '381685278607014';\n break;\n default:\n cnnmsocial.facebook.appID = '521848191196480';\n break;\n }\n },\n\n init: function () {\n this.shareURL = CNNM.Social.shareURL;\n this.title = CNNM.Social.shareTitle;\n }\n};\n\ncnnmsocial.twitter = {\n shareURL: '',\n btn_class: 'js-share-tw',\n getCountURL: '',\n bitlyURL: '',\n source: 'CNNMoney',\n related: '',\n description: '',\n count: 'horizontal',\n eventsbound: false, // twitter events are attached see bindevents() below\n killswitch: false,\n via: true,\n\n addbutton: function ($btnsbin, sharedata) {\n $btnsbin.append(this.getbutton(sharedata));\n\n\n var $selector = $btnsbin.find('.' + this.btn_class);\n\n if (jQuery.isFunction(jQuery.fn.on)) {\n $selector.on(\"click\", function (e) {\n e.preventDefault();\n jQuery('.popover').removeClass(\"active\");\n\n var href = $(this).attr(\"data-href\");\n window.open(href, 'twitter', 'height=300,width=665');\n eventLogger.social_track('twt-tweet');\n return false;\n });\n } else {\n $selector.live(\"click\", function (e) {\n e.preventDefault();\n // Commenting this out because of double-popup\n // jQuery('.popover').removeClass(\"active\");\n // window.open(this.href, 'twitter', 'height=300,width=665');\n // eventLogger.social_track('twt-tweet');\n return false;\n });\n }\n\n },\n refresh: function ($sharebar) {\n var $button;\n\n if (typeof $sharebar === 'undefined' || $sharebar == null) {\n return;\n }\n $button = $sharebar.find('.'+this.btn_class);\n\n if ($button.length) {\n $button.replaceWith(this.getbutton());\n this.loadscript();\n }\n },\n\n /* getbutton can act as a global util function that returns a share button using sharedata\n or it default to the metadata already defined\n */\n getbutton: function (sharedata) {\n sharedata = sharedata || {};\n var button = '';\n var description = (typeof sharedata.title !== 'undefined')? sharedata.title : this.description;\n var shareurl = (typeof sharedata.url !== 'undefined')? sharedata.url : this.shareURL;\n var text = '';\n var encodedText = '';\n var relatedText = '';\n\n description = $(\"meta[property='twitter:description']\").attr('content');\n text = description;\n\n /* Page level sharebuttons (sharedata isn't passed in for page lavel sharing.) */\n if (sharedata.url === undefined) {\n if (this.bitlyURL != '') {\n shareurl = this.bitlyURL;\n }\n relatedText = this.related;\n }\n else {\n relatedText = this.getRelated(null);\n }\n\n encodedText = encodeURIComponent(text);\n relatedText = encodeURIComponent(this.related);\n\n button = '' + '';\n\n return button;\n },\n setoverrides: function (overrides) {\n overrides = overrides || {};\n if (typeof overrides.url !== 'undefined') {\n this.shareURL = overrides.url;\n }\n if (typeof overrides.bitlyURL !== 'undefined') {\n this.bitlyURL = overrides.bitlyURL;\n }\n if (typeof overrides.related !== 'undefined') {\n this.related = overrides.related;\n }\n if (typeof overrides.source !== 'undefined') {\n this.source = overrides.source;\n }\n if (typeof overrides.title !== 'undefined') {\n this.description = overrides.title;\n }\n if (typeof overrides.hashes !== 'undefined') {\n this.description += ' ' + overrides.hashes;\n }\n\n if (typeof overrides.killswitch !== 'undefined') {\n this.killswitch = overrides.killswitch;\n }\n if (typeof overrides.via !== 'undefined') {\n this.via = overrides.via;\n }\n },\n\n // get default relateds\n getRelated: function (section) {\n var related = '';\n switch (section) {\n case 'Investing' :\n related = 'CNNMoneyInvest';\n break;\n case 'Small Business' :\n related = 'CNNMoneySmBiz';\n break;\n case 'Technology':\n case 'Mobile':\n case 'Enterprise':\n case 'Innovation':\n case 'Security':\n case 'Social':\n related = 'CNNTech:For news and features on the day\\'s hottest technology stories,CNNTechGadgets:For gadget-related news and reviews from our tech team';\n break;\n case 'Personal Finance':\n case 'Real Estate':\n case 'Retirement':\n case 'Autos':\n case 'College':\n case 'Insurance':\n case 'Jobs':\n case 'Taxes':\n related = 'CNNMoneyPF:For news and features on the most compelling personal finance stories';\n break;\n default:\n related = 'CNNMoney:Breaking news and in-depth looks at the most important business stories of the day.';\n break;\n }\n\n return related;\n },\n\n bindevents: function () {\n if (!this.eventsbound) {\n try {\n twttr.ready(function (twttr) {\n twttr.events.bind('click', function(event)\n {eventLogger.social_track('twt-tweet',\n CNNM.Social.socialtrack_URL);} );\n twttr.events.bind('tweet', function (event) {\n eventLogger.social_track('twt-tweet', CNNM.Social.socialtrack_URL);\n });\n twttr.events.bind('retweet', function (event) {\n eventLogger.social_track('twt-retweet', CNNM.Social.socialtrack_URL);\n });\n twttr.events.bind('favorite', function (event) {\n eventLogger.social_track('twt-favorite', CNNM.Social.socialtrack_URL);\n });\n twttr.events.bind('follow', function (event) {\n eventLogger.social_track('twt-follow', CNNM.Social.socialtrack_URL);\n });\n\n // reset track URL\n CNNM.Social.settrackURL();\n });\n this.eventsbound = true;\n } catch (e) {}\n }\n },\n loadscript: function () {\n try {\n if (typeof twttr !== 'undefined') {\n // check for all tweet button on page\n twttr.widgets.load();\n } else {\n // Note: Doesn't work if not on a live site.\n window.twttr = (function (d, s, id) {\n var t, js, fjs = d.getElementsByTagName(s)[0];\n if (d.getElementById(id)) return;\n js = d.createElement(s);\n js.id = id;\n js.src = \"//platform.twitter.com/widgets.js\";\n fjs.parentNode.insertBefore(js, fjs);\n return window.twttr || (t = {\n _e: [],\n ready: function (f) {\n t._e.push(f);\n }\n });\n }(document, \"script\", \"twitter-wjs\"));\n\n /* \n hack fix: popup was showing blank adding button back seems to fix this. \n This hack also had to work for Video playlist share button updates \n */\n var twitterBtns = document.querySelectorAll('.'+cnnmsocial.twitter.btn_class);\n for(i = 0; i < twitterBtns.length; i++) {\n var tempElem = document.createElement('span');\n tempElem.innerHTML = cnnmsocial.twitter.getbutton();\n tempElem.querySelector('a').href = twitterBtns[i].href;\n twitterBtns[i].parentNode.replaceChild(tempElem.childNodes[0], twitterBtns[i]);\n }\n\n // bind events - delay needed for window.twttr to be set\n binder = setTimeout(cnnmsocial.twitter.bindevents, 1500);\n }\n } catch (e) {}\n\n },\n\n customshare: function (shareobj) {\n\n url = encodeURIComponent(shareobj.url);\n desc = encodeURIComponent(shareobj.desc);\n via = '';\n if (typeof (shareobj.via) !== 'undefined') {\n via = '&via=' + shareobj.via;\n }\n\n window_href = 'http://twitter.com/share?count=vertical' + '&original_referer=' + url + '&text=' + desc + '&url=' + url + '&via=' + via;\n window_name = 'intent';\n window_conf = 'left=685, top=350, width=550px, height=380px, scrollbars=no, status=no';\n\n openWindow(window_href, window_name, window_conf);\n // track event\n eventLogger.social_track('twt-tweet', url);\n },\n\n init: function () {\n this.shareURL = CNNM.Social.shareURL;\n this.description = CNNM.Social.shareTitle;\n\n //this.setRelated();\n\n // [DEPRECATED] OVERRIDE - twitter\n if (typeof cnntweetDesc !== 'undefined') {\n this.description = cnntweetDesc;\n }\n\n\n }\n};\n\ncnnmsocial.linkedin = {\n shareURL: '',\n btn_class: 'js-share-linkedin',\n source: 'CNNMoney',\n description: '',\n linkedInLoaded : false,\n killswitch: true,\n\n addbutton: function ($btnsbin, sharedata) {\n $btnsbin.append(this.getbutton(sharedata));\n\n\n var $selector = $btnsbin.find(' .'+this.btn_class);\n\n /* set button element selector for page level share button */\n if(typeof sharedata === 'undefined') {\n this.$btn = $selector;\n }\n },\n refresh: function ($sharebar) {\n var $button;\n\n if (typeof $sharebar === 'undefined' || $sharebar == null) {\n return;\n }\n $button = $sharebar.find('.'+this.btn_class);\n\n if ($button.length) {\n $button.replaceWith(this.getbutton());\n cnnmsocial.linkedin.linkedInLoaded = false;\n }\n },\n\n getbutton: function (sharedata) {\n sharedata = sharedata || {};\n var button = '';\n var shareurl = (typeof sharedata.url !== 'undefined')? sharedata.url : this.shareURL;\n var sharetitle = (typeof sharedata.title !== 'undefined')? sharedata.title : this.description;\n\n var encodedShareUrl = encodeURIComponent(shareurl + '?source=linkedin');\n var encodedTitle = encodeURIComponent(sharetitle);\n\n var newwindowProperties = 'scrollbars=yes,resizable=yes,toolbar=no,location=yes,width=600,height=450,left=0,top=0';\n var linkedinURL = href='http://www.linkedin.com/shareArticle?mini=true&'\n + 'source=' + this.source + '&url=' + encodedShareUrl\n + '&title=' + encodedTitle;\n linkedinURL = linkedinURL.replace(/[\"']/g,'\\\\$&');\n\n button += '' + '';\n return button;\n },\n setoverrides: function (overrides) {\n overrides = overrides || {};\n if (typeof overrides.url !== 'undefined') {\n this.shareURL = overrides.url;\n }\n if (typeof overrides.title !== 'undefined') {\n this.description = overrides.title;\n }\n if (typeof overrides.source !== 'undefined') {\n this.setSource(overrides.source);\n }\n if (typeof overrides.killswitch !== 'undefined') {\n this.killswitch = overrides.killswitch;\n }\n\n },\n setSource: function (source) {\n // Set variables for each brand\n switch (source) {\n case (cnnm_sourcing.sourceTypes.moneymag):\n this.source = 'Money Magazine';\n break;\n case (cnnm_sourcing.sourceTypes.fortune):\n this.source = 'Fortune Magazine';\n break;\n default:\n this.source = 'CNNMoney';\n break;\n }\n },\n\n\n loadscript: function() {\n if( !jQuery(\"#linkedin_script\").length )\n {\n jQuery('head').append('
');\n }\n\n var stag = document.createElement('script');\n stag.type = 'text/javascript';\n stag.src = 'http://platform.linkedin.com/in.js';\n document.getElementById('linkedin_script').appendChild(stag);\n\n\n },\n\n init: function () {\n this.shareURL = CNNM.Social.shareURL;\n this.description = CNNM.Social.shareTitle;\n this.setSource(CNNM.Social.source);\n }\n};\n\ncnnmsocial.gplus = {\n shareURL: '',\n btn_class: 'js-share-gplus',\n annotation: 'bubble',\n killswitch: false,\n\n addbutton: function ($btnsbin, sharedata) {\n $btnsbin.append(this.getbutton(sharedata));\n\n var $selector = $btnsbin.find('.'+this.btn_class);\n\n if (jQuery.isFunction(jQuery.fn.on)) {\n $selector.on(\"click\", function (e) {\n e.preventDefault();\n jQuery('.popover').removeClass(\"active\");\n window.open(this.href, 'gplus', 'height=400,width=665');\n eventLogger.social_track('goog-plus');\n return false;\n });\n } else {\n $selector.live(\"click\", function (e) {\n e.preventDefault();\n jQuery('.popover').removeClass(\"active\");\n window.open(this.href, 'gplus', 'height=500,width=480');\n eventLogger.social_track('goog-plus');\n return false;\n });\n }\n\n /* set button element selector for page level share button */\n if(typeof sharedata === 'undefined') {\n this.$btn = $selector;\n }\n },\n refresh: function ($sharebar) {\n var $button;\n\n if (typeof $sharebar === 'undefined' || $sharebar == null) {\n return;\n }\n $button = $sharebar.find('.'+this.btn_class);\n\n if ($button.length) {\n $button.replaceWith(this.getbutton());\n }\n },\n\n getbutton: function (sharedata) {\n sharedata = sharedata || {};\n var shareurl = sharedata.url || this.shareURL;\n var encodedUrl = encodeURIComponent(shareurl);\n\n return '' + '' + '';\n },\n\n setoverrides: function (overrides) {\n overrides = overrides || {};\n if (typeof overrides.url !== 'undefined') {\n this.shareURL = overrides.url;\n }\n if (typeof overrides.annotation !== 'undefined') {\n this.annotation = overrides.annotation;\n }\n if (typeof overrides.killswitch !== 'undefined') {\n this.killswitch = overrides.killswitch;\n }\n },\n init: function () {\n this.shareURL = CNNM.Social.shareURL;\n }\n};\n\n/**\n * global namespace function defined by google specs\n */\ngplus_track = function (jvar) {\n eventLogger.social_track('goog-plus');\n};\n\n\ncnnmsocial.pinterest = {\n shareURL: '',\n btn_class: 'js-share-pinterest',\n imageURL: '',\n description: '',\n killswitch: false,\n\n addbutton: function ($btnsbin, sharedata) {\n $btnsbin.append(this.getbutton(sharedata));\n\n var $selector = $btnsbin.find(' .'+this.btn_class);\n\n if (jQuery.isFunction(jQuery.fn.on)) {\n $selector.on(\"click\", function (e) {\n e.preventDefault();\n jQuery('.popover').removeClass(\"active\");\n window.open(this.href, 'pinterest', 'height=300,width=665');\n eventLogger.social_track('pin-share');\n return false;\n });\n } else {\n $selector.live(\"click\", function (e) {\n e.preventDefault();\n jQuery('.popover').removeClass(\"active\");\n window.open(this.href, 'pinterest', 'height=300,width=665');\n eventLogger.social_track('pin-share');\n return false;\n });\n }\n\n /* set button element selector for page level share button */\n if(typeof sharedata === 'undefined') {\n this.$btn = $selector;\n }\n },\n refresh: function ($sharebar) {\n var $button;\n\n if (typeof $sharebar === 'undefined' || $sharebar == null) {\n return;\n }\n $button = $sharebar.find('.'+this.btn_class);\n\n if ($button.length) {\n $button.replaceWith(this.getbutton());\n }\n },\n getbutton: function (sharedata) {\n sharedata = sharedata || {};\n var button;\n var shareurl = sharedata.url || this.shareURL;\n var sharetitle = sharedata.title || this.description;\n var shareimage = sharedata.image || this.imageURL;\n var encodedUrl = encodeURIComponent(shareurl);\n var encodedImgUrl = encodeURIComponent(shareimage);\n var encodedDesc = encodeURIComponent(sharetitle);\n\n var is_video = \"false\";\n if (CNNM.Social.pagetype == CNNM.Social.pagetypes.video) {\n is_video = \"true\";\n }\n\n button = '' + '' + '';\n\n return button;\n },\n\n\n setoverrides: function (overrides) {\n overrides = overrides || {};\n if (typeof overrides.url !== 'undefined') {\n this.shareURL = overrides.url;\n }\n if (typeof overrides.image !== 'undefined') {\n this.imageURL = overrides.image;\n }\n if (typeof overrides.description !== 'undefined') {\n this.description = overrides.description;\n }\n if (typeof overrides.killswitch !== 'undefined') {\n this.killswitch = overrides.killswitch;\n }\n },\n loadscript: function () {},\n init: function () {\n this.shareURL = CNNM.Social.shareURL;\n this.imageURL = CNNM.Social.shareImage;\n this.description = CNNM.Social.shareTitle;\n }\n};\n\ncnnmsocial.reddit = {\n shareURL: '',\n btn_class : 'js-share-reddit',\n title: '',\n killswitch: false,\n\n addbutton: function ($btnsbin, sharedata) {\n $btnsbin.append(this.getbutton(sharedata));\n\n var $selector = $btnsbin.find('.'+this.btn_class);\n\n if (jQuery.isFunction(jQuery.fn.on)) {\n $selector.on(\"click\", function (e) {\n e.preventDefault();\n jQuery('.popover').removeClass(\"active\");\n window.open(this.href, 'reddit', 'height=600,width=850');\n eventLogger.social_track('reddit-share');\n return false;\n });\n } else {\n\n $selector.live(\"click\", function (e) {\n e.preventDefault();\n jQuery('.popover').removeClass(\"active\");\n window.open(this.href, 'reddit', 'height=600,width=850');\n eventLogger.social_track('reddit-share');\n return false;\n });\n }\n\n /* set button element selector for page level share button */\n if(typeof sharedata === 'undefined') {\n this.$btn = $selector;\n }\n },\n refresh: function ($sharebar) {\n var $button;\n\n if (typeof $sharebar === 'undefined' || $sharebar == null) {\n return;\n }\n $button = $sharebar.find('.'+this.btn_class);\n\n if ($button.length) {\n $button.replaceWith(this.getbutton());\n }\n },\n getbutton: function (sharedata) {\n sharedata = sharedata || {};\n var shareurl = sharedata.url || this.shareURL;\n var sharetitle = sharedata.title || this.title;\n var encodedUrl = encodeURIComponent(shareurl);\n var encodedTitle = encodeURIComponent(sharetitle);\n var href = 'http://www.reddit.com/submit?' + 'url=' + encodedUrl + '&title=' + encodedTitle;\n\n return '' + '';\n },\n\n setoverrides: function (overrides) {\n overrides = overrides || {};\n if (typeof overrides.url !== 'undefined') {\n this.shareURL = overrides.url;\n }\n if (typeof overrides.title !== 'undefined') {\n this.title = overrides.title;\n }\n if (typeof overrides.killswitch !== 'undefined') {\n this.killswitch = overrides.killswitch;\n }\n },\n init: function () {\n this.shareURL = CNNM.Social.shareURL;\n this.title = CNNM.Social.shareTitle;\n }\n};\n\ncnnmsocial.stumbleupon = {\n shareURL: '',\n btn_class : 'js-share-stumbleupon',\n title: '',\n killswitch: false,\n\n addbutton: function ($btnsbin, sharedata) {\n $btnsbin.append(this.getbutton(sharedata));\n\n var $selector = $btnsbin.find(' .'+this.btn_class);\n\n if (jQuery.isFunction(jQuery.fn.on)) {\n $selector.on(\"click\", function (e) {\n e.preventDefault();\n jQuery('.popover').removeClass(\"active\");\n window.open(this.href, 'stumbleupon', 'height=600,width=850');\n eventLogger.social_track('stumbleupon-share');\n return false;\n });\n } else {\n $selector.live(\"click\", function (e) {\n e.preventDefault();\n jQuery('.popover').removeClass(\"active\");\n window.open(this.href, 'stumbleupon', 'height=600,width=850');\n eventLogger.social_track('stumbleupon-share');\n return false;\n });\n }\n\n },\n refresh: function ($sharebar) {\n var $button;\n\n if (typeof $sharebar === 'undefined' || $sharebar == null) {\n return;\n }\n $button = $sharebar.find('.'+this.btn_class);\n\n if ($button.length) {\n $button.replaceWith(this.getbutton());\n }\n },\n getbutton: function (sharedata) {\n sharedata = sharedata || {};\n var shareurl = sharedata.url || this.shareURL;\n var sharetitle = sharedata.title || this.title;\n var encodedUrl = encodeURIComponent(shareurl);\n var encodedTitle = encodeURIComponent(sharetitle);\n var href = 'http://www.stumbleupon.com/submit?' + 'url=' + encodedUrl + '&title=' + encodedTitle;\n\n return '' + '';\n\n },\n\n setoverrides: function (overrides) {\n overrides = overrides || {};\n if (typeof overrides.url !== 'undefined') {\n this.shareURL = overrides.url;\n }\n if (typeof overrides.title !== 'undefined') {\n this.title = overrides.title;\n }\n if (typeof overrides.killswitch !== 'undefined') {\n this.killswitch = overrides.killswitch;\n }\n },\n init: function () {\n this.shareURL = CNNM.Social.shareURL;\n this.title = CNNM.Social.shareTitle;\n }\n};\n\ncnnmsocial.email = {\n shareURL: '',\n btn_class : 'js-share-mail',\n shareTitle: '',\n shareText: '',\n buttontag_contents: '', /* share icon */\n killswitch: true,\n\n addbutton: function ($btnsbin, sharedata) {\n $btnsbin.append(this.getbutton(sharedata));\n\n var $selector = $btnsbin.find('.'+this.btn_class);\n\n if (jQuery.isFunction(jQuery.fn.on)) {\n $selector.on(\"mousedown\", function (e) {\n e.preventDefault();\n jQuery('.popover').removeClass(\"active\");\n eventLogger.social_track('email');\n return false;\n });\n } else {\n $selector.live(\"mousedown\", function (e) {\n e.preventDefault();\n jQuery('.popover').removeClass(\"active\");\n eventLogger.social_track('email');\n return false;\n });\n }\n\n /* set button element selector for page level share button */\n if(typeof sharedata === 'undefined') {\n this.$btn = $selector;\n }\n },\n refresh: function ($sharebar) {\n var $button;\n\n if (typeof $sharebar === 'undefined' || $sharebar == null) {\n return;\n }\n $button = $sharebar.find('.'+this.btn_class);\n\n if ($button.length) {\n $button.replaceWith(this.getbutton());\n this.loadscript();\n }\n },\n getbutton: function (sharedata) {\n sharedata = sharedata || {};\n var shareurl = sharedata.url || this.shareURL;\n var sharetitle = sharedata.title || this.shareTitle;\n\n sharetitle = encodeURIComponent(sharetitle);\n this.shareText = 'Check out this story on CNNMoney: ' + shareurl;\n this.shareText = encodeURIComponent(this.shareText);\n\n return '';\n },\n setoverrides: function (overrides) {\n overrides = overrides || {};\n // overrides don't work, sharethis must get the properties from meta\n // data\n if (typeof overrides.url !== 'undefined') {\n this.shareURL = overrides.url;\n }\n if (typeof overrides.title !== 'undefined') {\n this.shareTitle = overrides.title;\n }\n\n if (typeof overrides.killswitch !== 'undefined') {\n this.killswitch = overrides.killswitch;\n }\n },\n loadscript: function () {\n try {\n if (jQuery('.st_email_custom').length) {\n\n // settings\n stLight.options({\n publisher: 'b8241a5c-6fa7-404a-9989-13f94cdfff16',\n url: this.shareURL,\n title: this.shareTitle,\n text : this.shareText,\n // offsetTop:'300',\n // offsetLeft:'0',\n onhover: false\n });\n stButtons.locateElements();\n }\n } catch (e) {}\n },\n\n init: function () {\n\n this.shareURL = CNNM.Social.shareURL;\n this.shareTitle = CNNM.Social.shareTitle;\n }\n};\n\ncnnmsocial.print = {\n btn_class : 'js-share-print',\n buttontag_contents: '', /* share icon */\n killswitch: false,\n\n\n addbutton: function ($btnsbin, sharedata) {\n $btnsbin.append('
  • '+this.getbutton()+'
  • ');\n\n var $selector = '.'+this.btn_class;\n\n if (jQuery.isFunction(jQuery.fn.on)) {\n $selector.on(\"click\", function (e) {\n e.preventDefault();\n jQuery('.popover').removeClass(\"active\");\n cnnmsocial.print.print();\n eventLogger.social_track('print');\n return false;\n });\n } else {\n $selector.live(\"click\", function (e) {\n e.preventDefault();\n jQuery('.popover').removeClass(\"active\");\n cnnmsocial.print.print();\n eventLogger.social_track('print');\n return false;\n });\n }\n\n /* set button element selector for page level share button */\n if(typeof sharedata === 'undefined') {\n this.$btn = $selector;\n }\n },\n refresh: function ($sharebar) {\n var $button;\n\n if (typeof $sharebar === 'undefined' || $sharebar == null) {\n return;\n }\n $button = $sharebar.find('.'+this.btn_class);\n\n if ($button.length) {\n $button.replaceWith(this.getbutton());\n }\n },\n getbutton: function (sharedata) {\n sharedata = sharedata || {};\n\n return '';\n\n },\n setoverrides: function (overrides) {\n overrides = overrides || {};\n if (typeof overrides.killswitch !== 'undefined') {\n this.killswitch = overrides.killswitch;\n }\n },\n print: function () {\n\n // FDCPUrl();\n // removing format dynamics issues is fixed\n window.print();\n return false;\n },\n init: function () {\n\n this.shareURL = CNNM.Social.shareURL;\n }\n};\n\ncnnmsocial.embed = {\n shareURL: '',\n btn_class : 'js-share-embed',\n shareTitle: '',\n buttontag_contents: '', /* share icon */\n embedscript: '',\n killswitch: true,\n\n addbutton: function ($btnsbin, sharedata) {\n this.setbutton();\n $btnsbin.append(this.buttontag_contents);\n\n var $selector = $btnsbin.find('.'+this.btn_class+'');\n\n $selector.on(\"click\", function (e) {\n var $self = jQuery(this);\n e.preventDefault();\n \n /* remove active class from popovers before adding it to this element */\n jQuery(\".popover, .popup-menu\").each(function () {\n if ( !jQuery(this).is($self.children()[0]) ) {\n jQuery(this).removeClass(\"active\");\n }\n });\n\n jQuery(this).find('.popover').toggleClass(\"active\");\n eventLogger.social_track('embed');\n jQuery('#embedCode')\n .val(cnnmsocial.embed.embedscript)\n .focus(\n function () {\n $(this).select();\n }\n )\n .mouseup(\n function (e) {\n e.preventDefault();\n }\n ).trigger('focus');\n return false;\n });\n\n jQuery('html').on('click', function (e) {\n if (jQuery(e.target).closest('.popover').get(0) == null) {\n jQuery('.popover').removeClass(\"active\");\n }\n });\n\n /* set button element selector for page level share button */\n if(typeof sharedata === 'undefined') {\n this.$btn = $selector;\n }\n },\n refresh: function ($sharebar) {\n var $button;\n\n if (typeof $sharebar === 'undefined' || $sharebar == null) {\n return;\n }\n $button = $sharebar.find('.'+this.btn_class);\n\n if ($button.length) {\n $button.replaceWith(this.buttontag_contents);\n }\n },\n setbutton: function () {\n\n this.buttontag_contents = '' + '
    ' + '
    Embed
    ' + '' + '
    ';\n this.setembedscript();\n\n },\n setoverrides: function (overrides) {\n overrides = overrides || {};\n if (typeof overrides.url !== 'undefined') {\n this.shareURL = overrides.url;\n }\n if (typeof overrides.killswitch !== 'undefined') {\n this.killswitch = overrides.killswitch;\n }\n },\n setembedscript: function () {\n\n var videoId = this.shareURL;\n var actualhost = location.host;\n var embedHost = 'cdn.cnn.com/money';\n // extract video id from URL ex:\n // /video/news/2012/04/19/f-bsg-cargill-food.fortune\n videoId = videoId.replace('http://money.cnn.com/', '');\n indexLoc = videoId.indexOf('index.htm');\n videoId = (indexLoc != -1) ? videoId.substring(0, indexLoc) : videoId;\n videoId = (videoId.charAt(videoId.length - 1) == '/') ? videoId.substring(0, videoId.length - 1) : videoId;\n\n /* Set embed script to Test environments to allow for testing where possible - REF, DEV, TRAIN */\n if ( (actualhost.indexOf('preview2.ref') > -1) ||\n (actualhost.indexOf('dev.money.cnn.com') > -1) ||\n (actualhost.indexOf('ref2.money.cnn.com') > -1) ||\n (actualhost.indexOf('train.money') > -1) ) {\n embedHost = actualhost;\n }\n\n\n this.embedscript = \"\";\n },\n\n init: function () {\n\n this.shareURL = CNNM.Social.shareURL;\n }\n};\n\ncnnmsocial.link = {\n shareURL: '',\n btn_class : 'js-share-link',\n buttontag_contents: '', /* share icon */\n killswitch: true,\n\n\n addbutton: function ($btnsbin, sharedata) {\n this.setbutton();\n $btnsbin.append(this.buttontag_contents);\n\n var $selector = $btnsbin.find('.'+this.btn_class);\n\n $selector.on(\"click\", function (e) {\n var $self = jQuery(this);\n e.preventDefault();\n \n /* remove active class from popovers before adding it to this element */\n jQuery(\".popover, .popup-menu\").each(function () {\n if ( !jQuery(this).is($self.children()[0]) ) {\n jQuery(this).removeClass(\"active\");\n }\n });\n\n jQuery(this).find('.popover').toggleClass(\"active\");\n eventLogger.social_track('link');\n jQuery('#linkValue')\n .val(cnnmsocial.link.shareURL)\n .focus(\n function () {\n $(this).select();\n }\n )\n .mouseup(\n function (e) {\n e.preventDefault();\n }\n ).trigger('focus');\n return false;\n });\n\n jQuery('html').on('click', function (e) {\n if (jQuery(e.target).closest('.popover').get(0) == null) {\n jQuery('.popover').removeClass(\"active\");\n }\n });\n\n /* set button element selector for page level share button */\n if(typeof sharedata === 'undefined') {\n this.$btn = $selector;\n }\n },\n refresh: function ($sharebar) {\n var $button;\n\n if (typeof $sharebar === 'undefined' || $sharebar == null) {\n return;\n }\n $button = $sharebar.find('.'+this.btn_class);\n\n if ($button.length) {\n $button.replaceWith(this.buttontag_contents);\n }\n },\n setbutton: function () {\n\n this.buttontag_contents = '' + '
    ' + '
    Link
    ' + '' + '
    ';\n\n },\n setoverrides: function (overrides) {\n overrides = overrides || {};\n if (typeof overrides.killswitch !== 'undefined') {\n this.killswitch = overrides.killswitch;\n }\n if (typeof overrides.url !== 'undefined') {\n this.shareURL = overrides.url;\n }\n },\n init: function () {\n\n this.shareURL = CNNM.Social.shareURL;\n }\n};\n\ncnnmsocial.bitly = {\n /**\n * post: updates bitly URL\n */\n getbitlyURL: function () {\n bitlyGrab = $('link[rel=shortlink]').eq(0).attr('href');\n\n bitlyurl = (typeof bitlyGrab !== 'undefined') ? bitlyGrab : '';\n\n if (bitlyurl != '') {\n CNNM.Social.bitlyupdate(bitlyurl);\n }\n }\n};\n\ncnnmsocial.morebutton = {\n shareURL: '',\n btn_class: 'js-share-more',\n popupclass: 'js-share-more-popup',\n sharelist : [], /* list of third partner objects defined above that we are adding to popup menu (ex: cnnm.social.reddit) */\n $popupmenu: null,\n killswitch: true,\n\n\n addbutton: function ($btnsbin, sharedata) {\n if(this.sharelist.length == 0) {\n return;\n }\n\n $btnsbin.append(this.getbutton(sharedata));\n\n var $selector = $btnsbin.find('.'+this.btn_class);\n if (jQuery.isFunction(jQuery.fn.on)) {\n $selector.on(\"click\", function (e) {\n var $self = jQuery(this);\n e.preventDefault();\n \n /* remove active class from popovers before adding it to this element */\n jQuery(\".popover, .popup-menu\").each(function () {\n if ( !jQuery(this).is($self.children()[0]) ) {\n jQuery(this).removeClass(\"active\");\n }\n });\n\n jQuery(this).find('.' + cnnmsocial.morebutton.popupclass).toggleClass(\"active\");\n return false;\n });\n\n jQuery('html').on('click', function (e) {\n if (jQuery(e.target).closest('.' + cnnmsocial.morebutton.popupclass).get(0) == null) {\n jQuery('.' + cnnmsocial.morebutton.popupclass).removeClass(\"active\");\n }\n });\n\n } else {\n $selector.live(\"click\", function (e) {\n var $self = jQuery(this);\n e.stopPropagation();\n e.preventDefault();\n \n /* remove active class from popovers before adding it to this element */\n jQuery(\".popover, .popup-menu\").each(function () {\n if ( !jQuery(this).is($self.children()[0]) ) {\n jQuery(this).removeClass(\"active\");\n }\n });\n\n jQuery(this).find('.' + cnnmsocial.morebutton.popupclass).toggleClass(\"active\");\n return false;\n });\n\n jQuery('html').live('click', function (e) {\n if (jQuery(e.target).closest('.' + cnnmsocial.morebutton.popupclass).get(0) == null) {\n jQuery('.' + cnnmsocial.morebutton.popupclass).removeClass(\"active\");\n }\n });\n }\n\n /* set button element selector for page level share button */\n if(typeof sharedata === 'undefined') {\n this.$btn = $selector;\n }\n this.addpopupmenu($btnsbin.find('.'+this.popupclass), sharedata);\n },\n /* $bin element where to add popup buttons */\n addpopupmenu: function ($popupmenu, sharedata) {\n sharedata = sharedata || {};\n var sharemenulist = this.sharelist;\n\n if(typeof sharedata !== 'undefined') {\n sharemenulist = (sharedata.morelist) || sharemenulist;\n }\n for(i = 0; i < sharemenulist.length; i++) {\n sharemenulist[i].addbutton($popupmenu);\n }\n },\n getbutton: function (sharedata) {\n sharedata = sharedata || {};\n return '
    ';\n },\n setsharelist: function(shareArray) {\n this.sharelist = shareArray;\n },\n setoverrides: function (overrides) {\n overrides = overrides || {};\n if (typeof overrides.killswitch !== 'undefined') {\n this.killswitch = overrides.killswitch;\n }\n },\n refresh: function ($sharebar, sharedata) {\n var $button;\n\n if (typeof $sharebar === 'undefined' || $sharebar == null) {\n return;\n }\n $popupmenu = $sharebar.find('.'+this.popupclass);\n $popupmenu.empty();\n this.addpopupmenu($popupmenu, sharedata);\n },\n init: function () {\n }\n};\n\nCNNM.Social = {\n\n sharebars: {\n $main: null,\n $main_btnsbins: null,\n $float: null,\n $float_btnsbins: null\n },\n\n buttonset_main : [],\n buttonset_more : [], /* share buttons that will appear in the more button popup list */\n\n enableRefresh: false,\n\n positions: {\n float_start_selector: '.js-social-anchor-start',\n float_end_selector: '.js-social-anchor-end',\n float_start: 0,\n float_end: 9999,\n is_floating: false,\n float_hidden: true,\n scroll_last_position: 0\n },\n\n pagetypes: {\n story: 1,\n video: 2,\n gallery: 3,\n quiz: 4,\n poll: 5,\n listspecial: 6,\n calc: 7\n },\n pagetype: 0,\n shareURL: 'http:\\/\\/' + location.host + location.pathname,\n sharePath: location.pathname, // include file name\n bitlyURL: '',\n\n shareTitle: document.title,\n shareImage: '',\n source: '',\n\n showcount: true,\n\n socialtrack_URL: null, // used by eventLogger.social_track() in\n // adbp.eventlogger.js for JSMD's social tracking.\n // Needed for FB and Twitter where tracking called\n // in callback function.\n\n\n // Browser Flags\n browser: {\n win: (navigator.platform.toLowerCase().indexOf('win32') == -1) ? \"\" : \" win\",\n mac: (navigator.platform.toLowerCase().indexOf('mac') == -1) ? false : true,\n cnnIE: (navigator.userAgent.toLowerCase().indexOf('msie') == -1) ? false : true,\n cnnIE6: (navigator.userAgent.toLowerCase().indexOf('msie 6') == -1) ? false : true,\n cnnIE7: (navigator.userAgent.toLowerCase().indexOf('msie 7') == -1) ? false : true,\n cnnIE8: (navigator.userAgent.toLowerCase().indexOf('msie 8') == -1) ? false : true,\n cnnFF: (navigator.userAgent.toLowerCase().indexOf('firefox') == -1) ? false : true,\n cnnChrome: (navigator.userAgent.toLowerCase().indexOf('chrome') == -1) ? false : true\n },\n\n // Helper function: determine page type\n setpagetype: function () {\n if (this.shareURL.match('/video/')) {\n this.pagetype = this.pagetypes.video;\n } else if (this.shareURL.match('/galleries/') || this.shareURL.match('/gallery/')) {\n this.pagetype = this.pagetypes.gallery;\n } else if (this.shareURL.match('/quizzes/')) {\n this.pagetype = this.pagetypes.quiz;\n } else if (this.shareURL.match('/poll/')) {\n this.pagetype = this.pagetypes.poll;\n } else if (this.shareURL.match('/tools/') || this.shareURL.match('/calculator/')) {\n this.pagetype = this.pagetypes.calc;\n } else {\n this.pagetype = this.pagetypes.story;\n }\n\n if ((typeof cnnmsoc_overrides !== 'undefined') && (typeof cnnmsoc_overrides.global !== 'undefined') && (typeof cnnmsoc_overrides.global.pagetype !== 'undefined')) {\n switch (cnnmsoc_overrides.global.pagetype) {\n case ('story'):\n case ('video'):\n case ('gallery'):\n case ('quiz'):\n case ('poll'):\n case ('listspecial'):\n case ('calculator'):\n this.pagetype = this.pagetypes[cnnmsoc_overrides.global.pagetype];\n break;\n default:\n break;\n }\n }\n },\n\n setbuttonsets: function () {\n /* set default list */\n switch (this.pagetype) {\n case (this.pagetypes.video):\n\n if(!cnnmsocial.link.killswitch) {\n this.buttonset_main.push(cnnmsocial.link);\n }\n if(!cnnmsocial.embed.killswitch) {\n this.buttonset_main.push(cnnmsocial.embed);\n }\n\n // case (this.pagetypes.story):\n // case (this.pagetypes.gallery):\n // case (this.pagetypes.quiz):\n // case (this.pagetypes.poll):\n // case (this.pagetypes.calc):\n // case (this.pagetypes.listspecial):\n default:\n /* Main set */\n if (!cnnmsocial.linkedin.killswitch) {\n this.buttonset_main.unshift(cnnmsocial.linkedin);\n }\n if (!cnnmsocial.twitter.killswitch) {\n this.buttonset_main.unshift(cnnmsocial.twitter);\n }\n if (!cnnmsocial.facebook.killswitch) {\n this.buttonset_main.unshift(cnnmsocial.facebook);\n }\n if (!cnnmsocial.email.killswitch) {\n this.buttonset_main.unshift(cnnmsocial.email);\n }\n\n break;\n }\n\n\n if (!cnnmsocial.morebutton.killswitch) {\n this.buttonset_main.push(cnnmsocial.morebutton);\n\n /* More set */\n if(!cnnmsocial.pinterest.killswitch) {\n this.buttonset_more.push(cnnmsocial.pinterest);\n }\n if(!cnnmsocial.stumbleupon.killswitch) {\n this.buttonset_more.push(cnnmsocial.stumbleupon);\n }\n if (!cnnmsocial.gplus.killswitch) {\n this.buttonset_more.push(cnnmsocial.gplus);\n }\n if(!cnnmsocial.reddit.killswitch) {\n this.buttonset_more.push(cnnmsocial.reddit);\n }\n\n /* set more list */\n cnnmsocial.morebutton.setsharelist(this.buttonset_more);\n\n }\n\n },\n\n setsharedata: function () {\n this.source = cnnm_sourcing.getURLSource(this.shareURL);\n\n var metaurl = jQuery('link[rel=\"canonical\"]').attr('href');\n var metaurl_og = jQuery('meta[property=\"og:url\"]').attr('content');\n var metatitle = jQuery('meta[name=\"title\"]').attr('content');\n var metatitle_og = jQuery('meta[property=\"og:title\"]').attr('content');\n var metaimage_og = jQuery('meta[property=\"og:image\"]').attr('content');\n\n if (typeof metaurl_og !== 'undefined' && metaurl_og != '') {\n this.shareURL = metaurl_og;\n } else if (typeof metaurl !== 'undefined' && metaurl != '') {\n this.shareURL = metaurl;\n }\n\n // Set test pages to share live URLs\n this.shareURL = this.shareURL.replace('moneypreview.turner.com:86', 'money.cnn.com');\n this.shareURL = this.shareURL.replace('jcmsprod.cnn.com:86', 'money.cnn.com');\n this.shareURL = this.shareURL.replace('money.qai.cnn.com', 'money.cnn.com');\n this.shareURL = this.shareURL.replace('localhost.cnn.com/money', 'money.cnn.com');\n\n // sharePath\n this.sharePath = this.sharePath.replace('//', '/');\n split = this.sharePath.split('.com/');\n if (split.length > 1) {\n this.sharePath = '/' + split[1];\n }\n\n if (typeof metaimage_og !== 'undefined' && metaimage_og != '') {\n this.shareImage = metaimage_og;\n }\n\n this.setpagetype();\n\n // Set share social title/description\n if (typeof metatitle_og !== 'undefined' && metatitle_og != '') {\n this.shareTitle = metatitle_og;\n } else if (typeof metatitle !== 'undefined' && metatitle != '') {\n this.shareTitle = metatitle;\n }\n\n var h1s = document.getElementsByTagName('h1');\n\n if (this.pagetype == this.pagetypes.listspecial) {\n this.shareTitle = document.title;\n } else if (h1s.length == 1) {\n this.shareTitle = jQuery.trim(h1s[0].innerHTML);\n }\n this.shareTitle = this.shareTitle.replace(/<(?:.|\\s)*?>/g, '');\n\n // Set Share URLs\n /*\n * Quizzes have multiple pages should default to first page for\n * linkedin, facebook, + twitter\n */\n switch (this.pagetype) {\n case (this.pagetypes.quiz):\n multipageURL = '';\n if (this.shareURL.indexOf('index.html') != -1) {\n var lastPos = this.shareURL.lastIndexOf('index.html');\n multipageURL = this.shareURL.substring(0, lastPos);\n // var lastPos2 = this.sharePath.lastIndexOf('index.html');\n // this.sharePath = this.sharePath.substring(0,lastPos2);\n } else if (this.shareURL.indexOf('.html') != -1) { // make sure it\n // ends in '/'\n var lastPos = this.shareURL.lastIndexOf('\\/');\n multipageURL = this.shareURL.substring(0, lastPos) + '/';\n // var lastPos2 = this.sharePath.lastIndexOf('\\/');\n // this.sharePath = this.sharePath.substring(0,lastPos2)+'/';\n } else {\n if (this.shareURL.charAt(this.shareURL.length - 1) == '/') {\n multipageURL = this.shareURL;\n } else {\n multipageURL = this.shareURL + '/';\n this.sharePath = this.sharePath + '/';\n }\n }\n\n // always set share URL for galleries to first page (w/o index.htm)\n // to share entire gallery\n this.shareURL = multipageURL;\n break;\n default:\n break;\n }\n\n cnnmsocial.facebook.init();\n cnnmsocial.twitter.init();\n cnnmsocial.linkedin.init();\n cnnmsocial.gplus.init();\n cnnmsocial.pinterest.init();\n cnnmsocial.reddit.init();\n cnnmsocial.stumbleupon.init();\n cnnmsocial.email.init();\n cnnmsocial.print.init();\n cnnmsocial.embed.init();\n cnnmsocial.link.init();\n\n },\n\n // Uses cnnmsoc_overrides if defined else input. input trumps\n // cnnmsoc_overrides is an older version how we used to set overrides\n setoverrides: function (input) {\n if (typeof input !== 'undefined') {\n cnnmsoc_overrides = input;\n }\n\n if (typeof cnnmsoc_overrides === 'undefined') {\n return;\n }\n\n if (typeof cnnmsoc_overrides.global !== 'undefined') {\n if (typeof cnnmsoc_overrides.global.floatstartselector !== 'undefined') {\n this.positions.float_start_selector = cnnmsoc_overrides.global.floatstartselector;\n }\n if (typeof cnnmsoc_overrides.global.floatendselector !== 'undefined') {\n this.positions.float_end_selector = cnnmsoc_overrides.global.floatendselector;\n }\n if (typeof cnnmsoc_overrides.global.url !== 'undefined') {\n this.shareURL = cnnmsoc_overrides.global.url;\n cnnmsocial.facebook.setoverrides({\n url: this.shareURL\n });\n cnnmsocial.twitter.setoverrides({\n url: this.shareURL\n });\n cnnmsocial.linkedin.setoverrides({\n url: this.shareURL\n });\n cnnmsocial.gplus.setoverrides({\n url: this.shareURL\n });\n cnnmsocial.pinterest.setoverrides({\n url: this.shareURL\n });\n cnnmsocial.reddit.setoverrides({\n url: this.shareURL\n });\n cnnmsocial.stumbleupon.setoverrides({\n url: this.shareURL\n });\n cnnmsocial.email.setoverrides({\n url: this.shareURL\n });\n cnnmsocial.link.setoverrides({\n url: this.shareURL\n });\n cnnmsocial.embed.setoverrides({\n url: this.shareURL\n });\n }\n if (typeof cnnmsoc_overrides.global.bitlyurl !== 'undefined') {\n // override all social items that use bitly\n this.bitlyURL = cnnmsoc_overrides.global.bitlyurl;\n\n cnnmsocial.twitter.setoverrides({\n bitlyURL: this.bitlyURL\n });\n }\n if (typeof cnnmsoc_overrides.global.title !== 'undefined') {\n this.shareTitle = cnnmsoc_overrides.global.title;\n\n cnnmsocial.twitter.setoverrides({\n title: this.shareTitle\n });\n cnnmsocial.linkedin.setoverrides({\n title: this.shareTitle\n });\n cnnmsocial.pinterest.setoverrides({\n description: this.shareTitle\n });\n cnnmsocial.reddit.setoverrides({\n title: this.shareTitle\n });\n cnnmsocial.stumbleupon.setoverrides({\n title: this.shareTitle\n });\n cnnmsocial.email.setoverrides({\n title: this.shareTitle\n });\n }\n if (typeof cnnmsoc_overrides.global.image !== 'undefined') {\n this.shareImage = cnnmsoc_overrides.global.image;\n\n cnnmsocial.pinterest.setoverrides({\n image: this.shareImage\n });\n }\n if (typeof cnnmsoc_overrides.global.source !== 'undefined') {\n this.source = cnnmsoc_overrides.global.source;\n\n cnnmsocial.twitter.setoverrides({\n source: this.source\n });\n cnnmsocial.linkedin.setoverrides({\n source: this.source\n });\n }\n if (typeof cnnmsoc_overrides.global.showcount !== 'undefined') {\n this.showcount = cnnmsoc_overrides.global.showcount;\n\n if (this.showcount) {\n cnnmsocial.facebook.setoverrides({\n showcount_like: true\n });\n cnnmsocial.twitter.setoverrides({\n count: 'vertical'\n });\n cnnmsocial.gplus.setoverrides({\n annotation: 'bubble'\n });\n } else {\n cnnmsocial.facebook.setoverrides({\n showcount_like: false\n });\n cnnmsocial.twitter.setoverrides({\n count: 'none'\n });\n cnnmsocial.gplus.setoverrides({\n annotation: 'none'\n });\n }\n }\n\n }\n // Brand specific overrides\n if (typeof cnnmsoc_overrides.facebook !== 'undefined') {\n cnnmsocial.facebook.setoverrides(cnnmsoc_overrides.facebook);\n }\n if (typeof cnnmsoc_overrides.twitter !== 'undefined') {\n cnnmsocial.twitter.setoverrides(cnnmsoc_overrides.twitter);\n }\n if (typeof cnnmsoc_overrides.linkedin !== 'undefined') {\n cnnmsocial.linkedin.setoverrides(cnnmsoc_overrides.linkedin);\n }\n if (typeof cnnmsoc_overrides.gplus !== 'undefined') {\n cnnmsocial.gplus.setoverrides(cnnmsoc_overrides.gplus);\n }\n if (typeof cnnmsoc_overrides.pinterest !== 'undefined') {\n cnnmsocial.pinterest.setoverrides(cnnmsoc_overrides.pinterest);\n }\n if (typeof cnnmsoc_overrides.reddit !== 'undefined') {\n cnnmsocial.reddit.setoverrides(cnnmsoc_overrides.reddit);\n }\n if (typeof cnnmsoc_overrides.stumbleupon !== 'undefined') {\n cnnmsocial.stumbleupon.setoverrides(cnnmsoc_overrides.stumbleupon);\n }\n if (typeof cnnmsoc_overrides.email !== 'undefined') {\n cnnmsocial.email.setoverrides(cnnmsoc_overrides.email);\n }\n if (typeof cnnmsoc_overrides.print !== 'undefined') {\n cnnmsocial.print.setoverrides(cnnmsoc_overrides.print);\n }\n if (typeof cnnmsoc_overrides.link !== 'undefined') {\n cnnmsocial.link.setoverrides(cnnmsoc_overrides.link);\n }\n if (typeof cnnmsoc_overrides.embed !== 'undefined') {\n cnnmsocial.embed.setoverrides(cnnmsoc_overrides.embed);\n }\n },\n\n addsharebar_main: function () {\n var topbar = '
    ';\n\n // check - Anchor already on page?\n $existingAnchor = jQuery('#js-sharebar-main');\n if ($existingAnchor.length) {\n $existingAnchor.html(topbar);\n }\n\n // set share containers of added sharebar\n this.sharebars.$main = $existingAnchor;\n this.sharebars.$main_btnsbins = this.sharebars.$main.find('#js-sharebar-main-bin');\n },\n\n addsharebar_float: function () {\n var topbar = '
    ';\n\n // check - Anchor already on page?\n var $existingAnchor = jQuery('#js-sharebar-floater');\n if ($existingAnchor.length) {\n $existingAnchor.html(topbar);\n }\n else {\n return;\n }\n\n // set share containers of added sharebar\n this.sharebars.$float = jQuery('#js-sharebar-floater');\n this.sharebars.$float_btnsbins = this.sharebars.$float.find('#js-sharebar-floater-bin');\n },\n\n addsocialbuttons: function () {\n /* main share bar */\n if (this.sharebars.$main_btnsbins.length) {\n /* clear share bar */\n this.sharebars.$main_btnsbins.html('');\n\n for (var i = 0; i < this.buttonset_main.length; i++) {\n this.buttonset_main[i].addbutton(this.sharebars.$main_btnsbins);\n }\n\n /* FB like/recommend button for content pages */\n switch (this.pagetype) {\n case (this.pagetypes.story):\n case (this.pagetypes.video):\n case (this.pagetypes.gallery):\n case (this.pagetypes.quiz):\n case (this.pagetypes.poll):\n case (this.pagetypes.calc):\n case (this.pagetypes.listspecial):\n if (!cnnmsocial.facebook.killswitch) {\n cnnmsocial.facebook.addlikebutton(this.sharebars.$main_btnsbins);\n }\n break;\n default:\n break;\n }\n\n }\n\n /* floating share bar */\n if (this.sharebars.$float_btnsbins !== null) {\n /* clear share bar */\n this.sharebars.$float_btnsbins.html('');\n\n for (var n = 0; n < this.buttonset_main.length; n++) {\n this.buttonset_main[n].addbutton(this.sharebars.$float_btnsbins);\n }\n }\n\n },\n\n /* Set sharebars for touts/summaries */\n addtoutshares : function () {\n var sharemenus = jQuery('.js-sharebar-tout');\n\n sharemenus.each(function(index, elem){\n var metadata = {};\n var mainset_str = '';\n var moreset_str = '';\n var mainsharelist = [];\n var moresharelist = [];\n var moresharelistObs = [];\n var $elem = jQuery(elem);\n\n /* get metadata */\n metadata = {url : $elem.attr('data-url'),\n title : $elem.attr('data-title')\n };\n mainset_str = $elem.attr('data-mainset') || mainset_str;\n moreset_str = $elem.attr('data-moreset') || moreset_str;\n mainsharelist = mainset_str.replace(/, /g, ',').split(',');\n moresharelist = moreset_str.replace(/, /g, ',').split(',');\n\n\n if ($elem.attr('data-image') !== undefined) {\n metadata.image = $elem.attr('data-image');\n }\n\n /* reset/clear sharebar */\n $elem.html('');\n\n for (var i = 0; i < moresharelist.length; i++) {\n /* add button */\n try{\n switch(moresharelist[i]) {\n case('fb'):\n moresharelistObs.unshift(cnnmsocial.facebook);\n break;\n case('email'):\n moresharelistObs.unshift(cnnmsocial.email.addbutton);\n break;\n case('tw'):\n moresharelistObs.unshift(cnnmsocial.twitter.addbutton);\n break;\n case('linkedin'):\n moresharelistObs.unshift(cnnmsocial.linkedin.addbutton);\n break;\n case('pinterest'):\n moresharelistObs.unshift(cnnmsocial.pinterest.addbutton);\n break;\n case('gplus'):\n moresharelistObs.unshift(cnnmsocial.gplus.addbutton);\n break;\n case('reddit'):\n moresharelistObs.unshift(cnnmsocial.reddit.addbutton);\n break;\n case('stumbleupon'):\n moresharelistObs.unshift(cnnmsocial.stumbleupon.addbutton);\n break;\n default:\n break;\n }\n }\n catch(e) {\n console.log('share [addtoutshares]: ' + e.message);\n }\n }\n\n metadata.morelist = moresharelistObs;\n\n for (var n = 0; n < mainsharelist.length; n++) {\n /* add button */\n try{\n switch(mainsharelist[n]) {\n case('fb'):\n cnnmsocial.facebook.addbutton($elem, metadata);\n break;\n case('email'):\n cnnmsocial.email.addbutton($elem, metadata);\n break;\n case('tw'):\n cnnmsocial.twitter.addbutton($elem, metadata);\n break;\n case('linkedin'):\n cnnmsocial.linkedin.addbutton($elem, metadata);\n break;\n case('pinterest'):\n cnnmsocial.pinterest.addbutton($elem, metadata);\n break;\n case('gplus'):\n cnnmsocial.gplus.addbutton($elem, metadata);\n break;\n case('reddit'):\n cnnmsocial.reddit.addbutton($elem, metadata);\n break;\n case('stumbleupon'):\n cnnmsocial.stumbleupon.addbutton($elem, metadata);\n break;\n case('more'):\n cnnmsocial.morebutton.addbutton($elem, metadata);\n break;\n default:\n break;\n }\n }\n catch(e) {\n console.log('share [addtoutshares]: ' + e.message);\n }\n }\n });\n },\n\n loadscripts: function () {\n if (!cnnmsocial.facebook.killswitch) {\n cnnmsocial.facebook.loadscript();\n }\n if (!cnnmsocial.twitter.killswitch) {\n cnnmsocial.twitter.loadscript();\n }\n if (!cnnmsocial.linkedin.killswitch) {\n console.log(\"loading\");\n cnnmsocial.linkedin.loadscript();\n }\n if (!cnnmsocial.email.killswitch) {\n cnnmsocial.email.loadscript();\n }\n\n\n },\n\n refresh: function (socialbrand) {\n if (typeof socialbrand === 'undefined') {\n socialbrand = '';\n }\n switch (socialbrand) {\n case ('facebook'):\n cnnmsocial.facebook.refresh(this.sharebars.$main);\n cnnmsocial.facebook.refresh(this.sharebars.$float);\n break;\n case ('twitter'):\n cnnmsocial.twitter.refresh(this.sharebars.$main);\n cnnmsocial.twitter.refresh(this.sharebars.$float);\n break;\n case ('linkedin'):\n cnnmsocial.linkedin.refresh(this.sharebars.$main);\n cnnmsocial.linkedin.refresh(this.sharebars.$float);\n break;\n case ('gplus'):\n cnnmsocial.gplus.refresh(this.sharebars.$main);\n cnnmsocial.gplus.refresh(this.sharebars.$float);\n break;\n case ('pinterest'):\n cnnmsocial.pinterest.refresh(this.sharebars.$main);\n cnnmsocial.pinterest.refresh(this.sharebars.$float);\n break;\n case ('reddit'):\n cnnmsocial.reddit.refresh(this.sharebars.$main);\n cnnmsocial.reddit.refresh(this.sharebars.$float);\n break;\n case ('stumbleupon'):\n cnnmsocial.stumbleupon.refresh(this.sharebars.$main);\n cnnmsocial.stumbleupon.refresh(this.sharebars.$float);\n break;\n case ('email'):\n cnnmsocial.email.refresh(this.sharebars.$main);\n cnnmsocial.email.refresh(this.sharebars.$float);\n break;\n case ('print'):\n cnnmsocial.print.refresh(this.sharebars.$main);\n cnnmsocial.print.refresh(this.sharebars.$float);\n break;\n case ('embed'):\n cnnmsocial.embed.refresh(this.sharebars.$main);\n cnnmsocial.embed.refresh(this.sharebars.$float);\n break;\n default:\n // update all\n cnnmsocial.facebook.refresh(this.sharebars.$main);\n cnnmsocial.facebook.refresh(this.sharebars.$float);\n cnnmsocial.twitter.refresh(this.sharebars.$main);\n cnnmsocial.twitter.refresh(this.sharebars.$float);\n cnnmsocial.linkedin.refresh(this.sharebars.$main);\n cnnmsocial.linkedin.refresh(this.sharebars.$float);\n cnnmsocial.stumbleupon.refresh(this.sharebars.$main);\n cnnmsocial.stumbleupon.refresh(this.sharebars.$float);\n cnnmsocial.email.refresh(this.sharebars.$main);\n cnnmsocial.email.refresh(this.sharebars.$float);\n cnnmsocial.gplus.refresh(this.sharebars.$main);\n cnnmsocial.gplus.refresh(this.sharebars.$float);\n cnnmsocial.pinterest.refresh(this.sharebars.$main);\n cnnmsocial.pinterest.refresh(this.sharebars.$float);\n cnnmsocial.reddit.refresh(this.sharebars.$main);\n cnnmsocial.reddit.refresh(this.sharebars.$float);\n cnnmsocial.print.refresh(this.sharebars.$main);\n cnnmsocial.print.refresh(this.sharebars.$float);\n cnnmsocial.embed.refresh(this.sharebars.$main);\n cnnmsocial.embed.refresh(this.sharebars.$float);\n\n cnnmsocial.morebutton.refresh(this.sharebars.$main);\n cnnmsocial.morebutton.refresh(this.sharebars.$float);\n break;\n }\n },\n\n bitlyupdate: function (bitlyURL) {\n // update twitter btn\n cnnmsocial.twitter.bitlyURL = bitlyURL;\n this.refresh('twitter');\n },\n\n settrackURL: function (URL) {\n if (typeof (URL) !== 'undefined') {\n this.socialtrack_URL = URL;\n } else {\n this.socialtrack_URL = null;\n }\n },\n\n debugit: function (text) {\n display = '';\n\n if (typeof text !== 'undefined') {\n display = '

    ' + text + '


    ';\n }\n display += \"shareURL : \" + this.shareURL + \"
    \";\n display += \"sharePath : \" + this.sharePath + \"
    \";\n // display += \"multipageURL : \" + multipageURL + \"
    \";\n display += \"shareTitle : \" + this.shareTitle + \"
    \";\n display = \"
  • \" + display + \"
  • \";\n\n display += \"FB-url: \" + cnnmsocial.facebook.shareURL + \"
    \";\n display += \"FB-showct: \" + cnnmsocial.facebook.showcount + \"
    \";\n\n display += \"Twt-url: \" + cnnmsocial.twitter.shareURL + \"
    \";\n display += \"Twt-bitly: \" + cnnmsocial.twitter.bitlyURL + \"
    \";\n display += \"Twt-desc: \" + cnnmsocial.twitter.description + \"
    \";\n display += \"Twt-source: \" + cnnmsocial.twitter.source + \"
    \";\n display += \"Twt-related: \" + cnnmsocial.twitter.related + \"
    \";\n display += \"Twt-count: \" + cnnmsocial.twitter.count + \"
    \";\n\n display += \"LI-url: \" + cnnmsocial.linkedin.shareURL + \"
    \";\n display += \"LI-desc: \" + cnnmsocial.linkedin.description + \"
    \";\n display += \"LI-source: \" + cnnmsocial.linkedin.source + \"
    \";\n display += \"LI-showct: \" + cnnmsocial.linkedin.showcount + \"
    \";\n\n display += \"G+-url: \" + cnnmsocial.gplus.shareURL + \"
    \";\n display += \"G+-annot: \" + cnnmsocial.gplus.annotation + \"
    \";\n\n\n $testbox = jQuery('#cnnmsocialLog');\n if ($testbox.length > 0) {\n $testbox.html(display);\n } else {\n display = '
      ' + display + \"
    \";\n jQuery('body').append(display);\n }\n },\n\n\n init: function () {\n /* set page sharebar */\n this.setsharedata();\n this.setbuttonsets();\n this.setoverrides();\n this.addsharebar_main();\n this.addsharebar_float();\n\n if (location.hostname.indexOf(\"moneypreview\") == -1) {\n cnnmsocial.bitly.getbitlyURL();\n }\n\n this.addsocialbuttons();\n\n /* check for summary/tout sharebars */\n this.addtoutshares();\n\n this.loadscripts();\n }\n};\n\n\nfunction cnnUpdateShareWidget(data) {\n var videoId = data.video_id;\n var videouri = 'http://money.cnn.com/' + videoId + '/index.html';\n var videotitle = (data.title === null) ? document.title : data.title;\n var videoimage = (data.image === null) ? document.image : data.image;\n\n var videoshareinfo = {\n global: {\n url: videouri,\n title: videotitle,\n image : videoimage\n }\n };\n CNNM.Social.setoverrides(videoshareinfo);\n if (CNNM.Social.enableRefresh){\n CNNM.Social.refresh();\n }\n CNNM.Social.enableRefresh = true;\n}","/**\r\n * Owl Carousel v2.1.4\r\n * Copyright 2013-2016 David Deutsch\r\n * Licensed under MIT (https://github.com/OwlCarousel2/OwlCarousel2/blob/master/LICENSE)\r\n */\r\n/**\r\n * Owl carousel\r\n * @version 2.1.0\r\n * @author Bartosz Wojciechowski\r\n * @author David Deutsch\r\n * @license The MIT License (MIT)\r\n * @todo Lazy Load Icon\r\n * @todo prevent animationend bubling\r\n * @todo itemsScaleUp\r\n * @todo Test Zepto\r\n * @todo stagePadding calculate wrong active classes\r\n */\r\n;(function($, window, document, undefined) {\r\n\r\n\t/**\r\n\t * Creates a carousel.\r\n\t * @class The Owl Carousel.\r\n\t * @public\r\n\t * @param {HTMLElement|jQuery} element - The element to create the carousel for.\r\n\t * @param {Object} [options] - The options\r\n\t */\r\n\tfunction Owl(element, options) {\r\n\r\n\t\t/**\r\n\t\t * Current settings for the carousel.\r\n\t\t * @public\r\n\t\t */\r\n\t\tthis.settings = null;\r\n\r\n\t\t/**\r\n\t\t * Current options set by the caller including defaults.\r\n\t\t * @public\r\n\t\t */\r\n\t\tthis.options = $.extend({}, Owl.Defaults, options);\r\n\r\n\t\t/**\r\n\t\t * Plugin element.\r\n\t\t * @public\r\n\t\t */\r\n\t\tthis.$element = $(element);\r\n\r\n\t\t/**\r\n\t\t * Proxied event handlers.\r\n\t\t * @protected\r\n\t\t */\r\n\t\tthis._handlers = {};\r\n\r\n\t\t/**\r\n\t\t * References to the running plugins of this carousel.\r\n\t\t * @protected\r\n\t\t */\r\n\t\tthis._plugins = {};\r\n\r\n\t\t/**\r\n\t\t * Currently suppressed events to prevent them from beeing retriggered.\r\n\t\t * @protected\r\n\t\t */\r\n\t\tthis._supress = {};\r\n\r\n\t\t/**\r\n\t\t * Absolute current position.\r\n\t\t * @protected\r\n\t\t */\r\n\t\tthis._current = null;\r\n\r\n\t\t/**\r\n\t\t * Animation speed in milliseconds.\r\n\t\t * @protected\r\n\t\t */\r\n\t\tthis._speed = null;\r\n\r\n\t\t/**\r\n\t\t * Coordinates of all items in pixel.\r\n\t\t * @todo The name of this member is missleading.\r\n\t\t * @protected\r\n\t\t */\r\n\t\tthis._coordinates = [];\r\n\r\n\t\t/**\r\n\t\t * Current breakpoint.\r\n\t\t * @todo Real media queries would be nice.\r\n\t\t * @protected\r\n\t\t */\r\n\t\tthis._breakpoint = null;\r\n\r\n\t\t/**\r\n\t\t * Current width of the plugin element.\r\n\t\t */\r\n\t\tthis._width = null;\r\n\r\n\t\t/**\r\n\t\t * All real items.\r\n\t\t * @protected\r\n\t\t */\r\n\t\tthis._items = [];\r\n\r\n\t\t/**\r\n\t\t * All cloned items.\r\n\t\t * @protected\r\n\t\t */\r\n\t\tthis._clones = [];\r\n\r\n\t\t/**\r\n\t\t * Merge values of all items.\r\n\t\t * @todo Maybe this could be part of a plugin.\r\n\t\t * @protected\r\n\t\t */\r\n\t\tthis._mergers = [];\r\n\r\n\t\t/**\r\n\t\t * Widths of all items.\r\n\t\t */\r\n\t\tthis._widths = [];\r\n\r\n\t\t/**\r\n\t\t * Invalidated parts within the update process.\r\n\t\t * @protected\r\n\t\t */\r\n\t\tthis._invalidated = {};\r\n\r\n\t\t/**\r\n\t\t * Ordered list of workers for the update process.\r\n\t\t * @protected\r\n\t\t */\r\n\t\tthis._pipe = [];\r\n\r\n\t\t/**\r\n\t\t * Current state information for the drag operation.\r\n\t\t * @todo #261\r\n\t\t * @protected\r\n\t\t */\r\n\t\tthis._drag = {\r\n\t\t\ttime: null,\r\n\t\t\ttarget: null,\r\n\t\t\tpointer: null,\r\n\t\t\tstage: {\r\n\t\t\t\tstart: null,\r\n\t\t\t\tcurrent: null\r\n\t\t\t},\r\n\t\t\tdirection: null\r\n\t\t};\r\n\r\n\t\t/**\r\n\t\t * Current state information and their tags.\r\n\t\t * @type {Object}\r\n\t\t * @protected\r\n\t\t */\r\n\t\tthis._states = {\r\n\t\t\tcurrent: {},\r\n\t\t\ttags: {\r\n\t\t\t\t'initializing': [ 'busy' ],\r\n\t\t\t\t'animating': [ 'busy' ],\r\n\t\t\t\t'dragging': [ 'interacting' ]\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\t$.each([ 'onResize', 'onThrottledResize' ], $.proxy(function(i, handler) {\r\n\t\t\tthis._handlers[handler] = $.proxy(this[handler], this);\r\n\t\t}, this));\r\n\r\n\t\t$.each(Owl.Plugins, $.proxy(function(key, plugin) {\r\n\t\t\tthis._plugins[key.charAt(0).toLowerCase() + key.slice(1)]\r\n\t\t\t\t= new plugin(this);\r\n\t\t}, this));\r\n\r\n\t\t$.each(Owl.Workers, $.proxy(function(priority, worker) {\r\n\t\t\tthis._pipe.push({\r\n\t\t\t\t'filter': worker.filter,\r\n\t\t\t\t'run': $.proxy(worker.run, this)\r\n\t\t\t});\r\n\t\t}, this));\r\n\r\n\t\tthis.setup();\r\n\t\tthis.initialize();\r\n\t}\r\n\r\n\t/**\r\n\t * Default options for the carousel.\r\n\t * @public\r\n\t */\r\n\tOwl.Defaults = {\r\n\t\titems: 3,\r\n\t\tloop: false,\r\n\t\tcenter: false,\r\n\t\trewind: false,\r\n\r\n\t\tmouseDrag: true,\r\n\t\ttouchDrag: true,\r\n\t\tpullDrag: true,\r\n\t\tfreeDrag: false,\r\n\r\n\t\tmargin: 0,\r\n\t\tstagePadding: 0,\r\n\r\n\t\tmerge: false,\r\n\t\tmergeFit: true,\r\n\t\tautoWidth: false,\r\n\r\n\t\tstartPosition: 0,\r\n\t\trtl: false,\r\n\r\n\t\tsmartSpeed: 250,\r\n\t\tfluidSpeed: false,\r\n\t\tdragEndSpeed: false,\r\n\r\n\t\tresponsive: {},\r\n\t\tresponsiveRefreshRate: 200,\r\n\t\tresponsiveBaseElement: window,\r\n\r\n\t\tfallbackEasing: 'swing',\r\n\r\n\t\tinfo: false,\r\n\r\n\t\tnestedItemSelector: false,\r\n\t\titemElement: 'div',\r\n\t\tstageElement: 'div',\r\n\r\n\t\trefreshClass: 'owl-refresh',\r\n\t\tloadedClass: 'owl-loaded',\r\n\t\tloadingClass: 'owl-loading',\r\n\t\trtlClass: 'owl-rtl',\r\n\t\tresponsiveClass: 'owl-responsive',\r\n\t\tdragClass: 'owl-drag',\r\n\t\titemClass: 'owl-item',\r\n\t\tstageClass: 'owl-stage',\r\n\t\tstageOuterClass: 'owl-stage-outer',\r\n\t\tgrabClass: 'owl-grab'\r\n\t};\r\n\r\n\t/**\r\n\t * Enumeration for width.\r\n\t * @public\r\n\t * @readonly\r\n\t * @enum {String}\r\n\t */\r\n\tOwl.Width = {\r\n\t\tDefault: 'default',\r\n\t\tInner: 'inner',\r\n\t\tOuter: 'outer'\r\n\t};\r\n\r\n\t/**\r\n\t * Enumeration for types.\r\n\t * @public\r\n\t * @readonly\r\n\t * @enum {String}\r\n\t */\r\n\tOwl.Type = {\r\n\t\tEvent: 'event',\r\n\t\tState: 'state'\r\n\t};\r\n\r\n\t/**\r\n\t * Contains all registered plugins.\r\n\t * @public\r\n\t */\r\n\tOwl.Plugins = {};\r\n\r\n\t/**\r\n\t * List of workers involved in the update process.\r\n\t */\r\n\tOwl.Workers = [ {\r\n\t\tfilter: [ 'width', 'settings' ],\r\n\t\trun: function() {\r\n\t\t\tthis._width = this.$element.width();\r\n\t\t}\r\n\t}, {\r\n\t\tfilter: [ 'width', 'items', 'settings' ],\r\n\t\trun: function(cache) {\r\n\t\t\tcache.current = this._items && this._items[this.relative(this._current)];\r\n\t\t}\r\n\t}, {\r\n\t\tfilter: [ 'items', 'settings' ],\r\n\t\trun: function() {\r\n\t\t\tthis.$stage.children('.cloned').remove();\r\n\t\t}\r\n\t}, {\r\n\t\tfilter: [ 'width', 'items', 'settings' ],\r\n\t\trun: function(cache) {\r\n\t\t\tvar margin = this.settings.margin || '',\r\n\t\t\t\tgrid = !this.settings.autoWidth,\r\n\t\t\t\trtl = this.settings.rtl,\r\n\t\t\t\tcss = {\r\n\t\t\t\t\t'width': 'auto',\r\n\t\t\t\t\t'margin-left': rtl ? margin : '',\r\n\t\t\t\t\t'margin-right': rtl ? '' : margin\r\n\t\t\t\t};\r\n\r\n\t\t\t!grid && this.$stage.children().css(css);\r\n\r\n\t\t\tcache.css = css;\r\n\t\t}\r\n\t}, {\r\n\t\tfilter: [ 'width', 'items', 'settings' ],\r\n\t\trun: function(cache) {\r\n\t\t\tvar width = (this.width() / this.settings.items).toFixed(3) - this.settings.margin,\r\n\t\t\t\tmerge = null,\r\n\t\t\t\titerator = this._items.length,\r\n\t\t\t\tgrid = !this.settings.autoWidth,\r\n\t\t\t\twidths = [];\r\n\r\n\t\t\tcache.items = {\r\n\t\t\t\tmerge: false,\r\n\t\t\t\twidth: width\r\n\t\t\t};\r\n\r\n\t\t\twhile (iterator--) {\r\n\t\t\t\tmerge = this._mergers[iterator];\r\n\t\t\t\tmerge = this.settings.mergeFit && Math.min(merge, this.settings.items) || merge;\r\n\r\n\t\t\t\tcache.items.merge = merge > 1 || cache.items.merge;\r\n\r\n\t\t\t\twidths[iterator] = !grid ? this._items[iterator].width() : width * merge;\r\n\t\t\t}\r\n\r\n\t\t\tthis._widths = widths;\r\n\t\t}\r\n\t}, {\r\n\t\tfilter: [ 'items', 'settings' ],\r\n\t\trun: function() {\r\n\t\t\tvar clones = [],\r\n\t\t\t\titems = this._items,\r\n\t\t\t\tsettings = this.settings,\r\n\t\t\t\tview = Math.max(settings.items * 2, 4),\r\n\t\t\t\tsize = Math.ceil(items.length / 2) * 2,\r\n\t\t\t\trepeat = settings.loop && items.length ? settings.rewind ? view : Math.max(view, size) : 0,\r\n\t\t\t\tappend = '',\r\n\t\t\t\tprepend = '';\r\n\r\n\t\t\trepeat /= 2;\r\n\r\n\t\t\twhile (repeat--) {\r\n\t\t\t\tclones.push(this.normalize(clones.length / 2, true));\r\n\t\t\t\tappend = append + items[clones[clones.length - 1]][0].outerHTML;\r\n\t\t\t\tclones.push(this.normalize(items.length - 1 - (clones.length - 1) / 2, true));\r\n\t\t\t\tprepend = items[clones[clones.length - 1]][0].outerHTML + prepend;\r\n\t\t\t}\r\n\r\n\t\t\tthis._clones = clones;\r\n\r\n\t\t\t$(append).addClass('cloned').appendTo(this.$stage);\r\n\t\t\t$(prepend).addClass('cloned').prependTo(this.$stage);\r\n\t\t}\r\n\t}, {\r\n\t\tfilter: [ 'width', 'items', 'settings' ],\r\n\t\trun: function() {\r\n\t\t\tvar rtl = this.settings.rtl ? 1 : -1,\r\n\t\t\t\tsize = this._clones.length + this._items.length,\r\n\t\t\t\titerator = -1,\r\n\t\t\t\tprevious = 0,\r\n\t\t\t\tcurrent = 0,\r\n\t\t\t\tcoordinates = [];\r\n\r\n\t\t\twhile (++iterator < size) {\r\n\t\t\t\tprevious = coordinates[iterator - 1] || 0;\r\n\t\t\t\tcurrent = this._widths[this.relative(iterator)] + this.settings.margin;\r\n\t\t\t\tcoordinates.push(previous + current * rtl);\r\n\t\t\t}\r\n\r\n\t\t\tthis._coordinates = coordinates;\r\n\t\t}\r\n\t}, {\r\n\t\tfilter: [ 'width', 'items', 'settings' ],\r\n\t\trun: function() {\r\n\t\t\tvar padding = this.settings.stagePadding,\r\n\t\t\t\tcoordinates = this._coordinates,\r\n\t\t\t\tcss = {\r\n\t\t\t\t\t'width': Math.ceil(Math.abs(coordinates[coordinates.length - 1])) + padding * 2,\r\n\t\t\t\t\t'padding-left': padding || '',\r\n\t\t\t\t\t'padding-right': padding || ''\r\n\t\t\t\t};\r\n\r\n\t\t\tthis.$stage.css(css);\r\n\t\t}\r\n\t}, {\r\n\t\tfilter: [ 'width', 'items', 'settings' ],\r\n\t\trun: function(cache) {\r\n\t\t\tvar iterator = this._coordinates.length,\r\n\t\t\t\tgrid = !this.settings.autoWidth,\r\n\t\t\t\titems = this.$stage.children();\r\n\r\n\t\t\tif (grid && cache.items.merge) {\r\n\t\t\t\twhile (iterator--) {\r\n\t\t\t\t\tcache.css.width = this._widths[this.relative(iterator)];\r\n\t\t\t\t\titems.eq(iterator).css(cache.css);\r\n\t\t\t\t}\r\n\t\t\t} else if (grid) {\r\n\t\t\t\tcache.css.width = cache.items.width;\r\n\t\t\t\titems.css(cache.css);\r\n\t\t\t}\r\n\t\t}\r\n\t}, {\r\n\t\tfilter: [ 'items' ],\r\n\t\trun: function() {\r\n\t\t\tthis._coordinates.length < 1 && this.$stage.removeAttr('style');\r\n\t\t}\r\n\t}, {\r\n\t\tfilter: [ 'width', 'items', 'settings' ],\r\n\t\trun: function(cache) {\r\n\t\t\tcache.current = cache.current ? this.$stage.children().index(cache.current) : 0;\r\n\t\t\tcache.current = Math.max(this.minimum(), Math.min(this.maximum(), cache.current));\r\n\t\t\tthis.reset(cache.current);\r\n\t\t}\r\n\t}, {\r\n\t\tfilter: [ 'position' ],\r\n\t\trun: function() {\r\n\t\t\tthis.animate(this.coordinates(this._current));\r\n\t\t}\r\n\t}, {\r\n\t\tfilter: [ 'width', 'position', 'items', 'settings' ],\r\n\t\trun: function() {\r\n\t\t\tvar rtl = this.settings.rtl ? 1 : -1,\r\n\t\t\t\tpadding = this.settings.stagePadding * 2,\r\n\t\t\t\tbegin = this.coordinates(this.current()) + padding,\r\n\t\t\t\tend = begin + this.width() * rtl,\r\n\t\t\t\tinner, outer, matches = [], i, n;\r\n\r\n\t\t\tfor (i = 0, n = this._coordinates.length; i < n; i++) {\r\n\t\t\t\tinner = this._coordinates[i - 1] || 0;\r\n\t\t\t\touter = Math.abs(this._coordinates[i]) + padding * rtl;\r\n\r\n\t\t\t\tif ((this.op(inner, '<=', begin) && (this.op(inner, '>', end)))\r\n\t\t\t\t\t|| (this.op(outer, '<', begin) && this.op(outer, '>', end))) {\r\n\t\t\t\t\tmatches.push(i);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tthis.$stage.children('.active').removeClass('active');\r\n\t\t\tthis.$stage.children(':eq(' + matches.join('), :eq(') + ')').addClass('active');\r\n\r\n\t\t\tif (this.settings.center) {\r\n\t\t\t\tthis.$stage.children('.center').removeClass('center');\r\n\t\t\t\tthis.$stage.children().eq(this.current()).addClass('center');\r\n\t\t\t}\r\n\t\t}\r\n\t} ];\r\n\r\n\t/**\r\n\t * Initializes the carousel.\r\n\t * @protected\r\n\t */\r\n\tOwl.prototype.initialize = function() {\r\n\t\tthis.enter('initializing');\r\n\t\tthis.trigger('initialize');\r\n\r\n\t\tthis.$element.toggleClass(this.settings.rtlClass, this.settings.rtl);\r\n\r\n\t\tif (this.settings.autoWidth && !this.is('pre-loading')) {\r\n\t\t\tvar imgs, nestedSelector, width;\r\n\t\t\timgs = this.$element.find('img');\r\n\t\t\tnestedSelector = this.settings.nestedItemSelector ? '.' + this.settings.nestedItemSelector : undefined;\r\n\t\t\twidth = this.$element.children(nestedSelector).width();\r\n\r\n\t\t\tif (imgs.length && width <= 0) {\r\n\t\t\t\tthis.preloadAutoWidthImages(imgs);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.$element.addClass(this.options.loadingClass);\r\n\r\n\t\t// create stage\r\n\t\tthis.$stage = $('<' + this.settings.stageElement + ' class=\"' + this.settings.stageClass + '\"/>')\r\n\t\t\t.wrap('
    ');\r\n\r\n\t\t// append stage\r\n\t\tthis.$element.append(this.$stage.parent());\r\n\r\n\t\t// append content\r\n\t\tthis.replace(this.$element.children().not(this.$stage.parent()));\r\n\r\n\t\t// check visibility\r\n\t\tif (this.$element.is(':visible')) {\r\n\t\t\t// update view\r\n\t\t\tthis.refresh();\r\n\t\t} else {\r\n\t\t\t// invalidate width\r\n\t\t\tthis.invalidate('width');\r\n\t\t}\r\n\r\n\t\tthis.$element\r\n\t\t\t.removeClass(this.options.loadingClass)\r\n\t\t\t.addClass(this.options.loadedClass);\r\n\r\n\t\t// register event handlers\r\n\t\tthis.registerEventHandlers();\r\n\r\n\t\tthis.leave('initializing');\r\n\t\tthis.trigger('initialized');\r\n\t};\r\n\r\n\t/**\r\n\t * Setups the current settings.\r\n\t * @todo Remove responsive classes. Why should adaptive designs be brought into IE8?\r\n\t * @todo Support for media queries by using `matchMedia` would be nice.\r\n\t * @public\r\n\t */\r\n\tOwl.prototype.setup = function() {\r\n\t\tvar viewport = this.viewport(),\r\n\t\t\toverwrites = this.options.responsive,\r\n\t\t\tmatch = -1,\r\n\t\t\tsettings = null;\r\n\r\n\t\tif (!overwrites) {\r\n\t\t\tsettings = $.extend({}, this.options);\r\n\t\t} else {\r\n\t\t\t$.each(overwrites, function(breakpoint) {\r\n\t\t\t\tif (breakpoint <= viewport && breakpoint > match) {\r\n\t\t\t\t\tmatch = Number(breakpoint);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tsettings = $.extend({}, this.options, overwrites[match]);\r\n\t\t\tdelete settings.responsive;\r\n\r\n\t\t\t// responsive class\r\n\t\t\tif (settings.responsiveClass) {\r\n\t\t\t\tthis.$element.attr('class',\r\n\t\t\t\t\tthis.$element.attr('class').replace(new RegExp('(' + this.options.responsiveClass + '-)\\\\S+\\\\s', 'g'), '$1' + match)\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (this.settings === null || this._breakpoint !== match) {\r\n\t\t\tthis.trigger('change', { property: { name: 'settings', value: settings } });\r\n\t\t\tthis._breakpoint = match;\r\n\t\t\tthis.settings = settings;\r\n\t\t\tthis.invalidate('settings');\r\n\t\t\tthis.trigger('changed', { property: { name: 'settings', value: this.settings } });\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * Updates option logic if necessery.\r\n\t * @protected\r\n\t */\r\n\tOwl.prototype.optionsLogic = function() {\r\n\t\tif (this.settings.autoWidth) {\r\n\t\t\tthis.settings.stagePadding = false;\r\n\t\t\tthis.settings.merge = false;\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * Prepares an item before add.\r\n\t * @todo Rename event parameter `content` to `item`.\r\n\t * @protected\r\n\t * @returns {jQuery|HTMLElement} - The item container.\r\n\t */\r\n\tOwl.prototype.prepare = function(item) {\r\n\t\tvar event = this.trigger('prepare', { content: item });\r\n\r\n\t\tif (!event.data) {\r\n\t\t\tevent.data = $('<' + this.settings.itemElement + '/>')\r\n\t\t\t\t.addClass(this.options.itemClass).append(item)\r\n\t\t}\r\n\r\n\t\tthis.trigger('prepared', { content: event.data });\r\n\r\n\t\treturn event.data;\r\n\t};\r\n\r\n\t/**\r\n\t * Updates the view.\r\n\t * @public\r\n\t */\r\n\tOwl.prototype.update = function() {\r\n\t\tvar i = 0,\r\n\t\t\tn = this._pipe.length,\r\n\t\t\tfilter = $.proxy(function(p) { return this[p] }, this._invalidated),\r\n\t\t\tcache = {};\r\n\r\n\t\twhile (i < n) {\r\n\t\t\tif (this._invalidated.all || $.grep(this._pipe[i].filter, filter).length > 0) {\r\n\t\t\t\tthis._pipe[i].run(cache);\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\r\n\t\tthis._invalidated = {};\r\n\r\n\t\t!this.is('valid') && this.enter('valid');\r\n\t};\r\n\r\n\t/**\r\n\t * Gets the width of the view.\r\n\t * @public\r\n\t * @param {Owl.Width} [dimension=Owl.Width.Default] - The dimension to return.\r\n\t * @returns {Number} - The width of the view in pixel.\r\n\t */\r\n\tOwl.prototype.width = function(dimension) {\r\n\t\tdimension = dimension || Owl.Width.Default;\r\n\t\tswitch (dimension) {\r\n\t\t\tcase Owl.Width.Inner:\r\n\t\t\tcase Owl.Width.Outer:\r\n\t\t\t\treturn this._width;\r\n\t\t\tdefault:\r\n\t\t\t\treturn this._width - this.settings.stagePadding * 2 + this.settings.margin;\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * Refreshes the carousel primarily for adaptive purposes.\r\n\t * @public\r\n\t */\r\n\tOwl.prototype.refresh = function() {\r\n\t\tthis.enter('refreshing');\r\n\t\tthis.trigger('refresh');\r\n\r\n\t\tthis.setup();\r\n\r\n\t\tthis.optionsLogic();\r\n\r\n\t\tthis.$element.addClass(this.options.refreshClass);\r\n\r\n\t\tthis.update();\r\n\r\n\t\tthis.$element.removeClass(this.options.refreshClass);\r\n\r\n\t\tthis.leave('refreshing');\r\n\t\tthis.trigger('refreshed');\r\n\t};\r\n\r\n\t/**\r\n\t * Checks window `resize` event.\r\n\t * @protected\r\n\t */\r\n\tOwl.prototype.onThrottledResize = function() {\r\n\t\twindow.clearTimeout(this.resizeTimer);\r\n\t\tthis.resizeTimer = window.setTimeout(this._handlers.onResize, this.settings.responsiveRefreshRate);\r\n\t};\r\n\r\n\t/**\r\n\t * Checks window `resize` event.\r\n\t * @protected\r\n\t */\r\n\tOwl.prototype.onResize = function() {\r\n\t\tif (!this._items.length) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif (this._width === this.$element.width()) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif (!this.$element.is(':visible')) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tthis.enter('resizing');\r\n\r\n\t\tif (this.trigger('resize').isDefaultPrevented()) {\r\n\t\t\tthis.leave('resizing');\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tthis.invalidate('width');\r\n\r\n\t\tthis.refresh();\r\n\r\n\t\tthis.leave('resizing');\r\n\t\tthis.trigger('resized');\r\n\t};\r\n\r\n\t/**\r\n\t * Registers event handlers.\r\n\t * @todo Check `msPointerEnabled`\r\n\t * @todo #261\r\n\t * @protected\r\n\t */\r\n\tOwl.prototype.registerEventHandlers = function() {\r\n\t\tif ($.support.transition) {\r\n\t\t\tthis.$stage.on($.support.transition.end + '.owl.core', $.proxy(this.onTransitionEnd, this));\r\n\t\t}\r\n\r\n\t\tif (this.settings.responsive !== false) {\r\n\t\t\tthis.on(window, 'resize', this._handlers.onThrottledResize);\r\n\t\t}\r\n\r\n\t\tif (this.settings.mouseDrag) {\r\n\t\t\tthis.$element.addClass(this.options.dragClass);\r\n\t\t\tthis.$stage.on('mousedown.owl.core', $.proxy(this.onDragStart, this));\r\n\t\t\tthis.$stage.on('dragstart.owl.core selectstart.owl.core', function() { return false });\r\n\t\t}\r\n\r\n\t\tif (this.settings.touchDrag){\r\n\t\t\tthis.$stage.on('touchstart.owl.core', $.proxy(this.onDragStart, this));\r\n\t\t\tthis.$stage.on('touchcancel.owl.core', $.proxy(this.onDragEnd, this));\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * Handles `touchstart` and `mousedown` events.\r\n\t * @todo Horizontal swipe threshold as option\r\n\t * @todo #261\r\n\t * @protected\r\n\t * @param {Event} event - The event arguments.\r\n\t */\r\n\tOwl.prototype.onDragStart = function(event) {\r\n\t\tvar stage = null;\r\n\r\n\t\tif (event.which === 3) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif ($.support.transform) {\r\n\t\t\tstage = this.$stage.css('transform').replace(/.*\\(|\\)| /g, '').split(',');\r\n\t\t\tstage = {\r\n\t\t\t\tx: stage[stage.length === 16 ? 12 : 4],\r\n\t\t\t\ty: stage[stage.length === 16 ? 13 : 5]\r\n\t\t\t};\r\n\t\t} else {\r\n\t\t\tstage = this.$stage.position();\r\n\t\t\tstage = {\r\n\t\t\t\tx: this.settings.rtl ?\r\n\t\t\t\t\tstage.left + this.$stage.width() - this.width() + this.settings.margin :\r\n\t\t\t\t\tstage.left,\r\n\t\t\t\ty: stage.top\r\n\t\t\t};\r\n\t\t}\r\n\r\n\t\tif (this.is('animating')) {\r\n\t\t\t$.support.transform ? this.animate(stage.x) : this.$stage.stop()\r\n\t\t\tthis.invalidate('position');\r\n\t\t}\r\n\r\n\t\tthis.$element.toggleClass(this.options.grabClass, event.type === 'mousedown');\r\n\r\n\t\tthis.speed(0);\r\n\r\n\t\tthis._drag.time = new Date().getTime();\r\n\t\tthis._drag.target = $(event.target);\r\n\t\tthis._drag.stage.start = stage;\r\n\t\tthis._drag.stage.current = stage;\r\n\t\tthis._drag.pointer = this.pointer(event);\r\n\r\n\t\t$(document).on('mouseup.owl.core touchend.owl.core', $.proxy(this.onDragEnd, this));\r\n\r\n\t\t$(document).one('mousemove.owl.core touchmove.owl.core', $.proxy(function(event) {\r\n\t\t\tvar delta = this.difference(this._drag.pointer, this.pointer(event));\r\n\r\n\t\t\t$(document).on('mousemove.owl.core touchmove.owl.core', $.proxy(this.onDragMove, this));\r\n\r\n\t\t\tif (Math.abs(delta.x) < Math.abs(delta.y) && this.is('valid')) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tevent.preventDefault();\r\n\r\n\t\t\tthis.enter('dragging');\r\n\t\t\tthis.trigger('drag');\r\n\t\t}, this));\r\n\t};\r\n\r\n\t/**\r\n\t * Handles the `touchmove` and `mousemove` events.\r\n\t * @todo #261\r\n\t * @protected\r\n\t * @param {Event} event - The event arguments.\r\n\t */\r\n\tOwl.prototype.onDragMove = function(event) {\r\n\t\tvar minimum = null,\r\n\t\t\tmaximum = null,\r\n\t\t\tpull = null,\r\n\t\t\tdelta = this.difference(this._drag.pointer, this.pointer(event)),\r\n\t\t\tstage = this.difference(this._drag.stage.start, delta);\r\n\r\n\t\tif (!this.is('dragging')) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tevent.preventDefault();\r\n\r\n\t\tif (this.settings.loop) {\r\n\t\t\tminimum = this.coordinates(this.minimum());\r\n\t\t\tmaximum = this.coordinates(this.maximum() + 1) - minimum;\r\n\t\t\tstage.x = (((stage.x - minimum) % maximum + maximum) % maximum) + minimum;\r\n\t\t} else {\r\n\t\t\tminimum = this.settings.rtl ? this.coordinates(this.maximum()) : this.coordinates(this.minimum());\r\n\t\t\tmaximum = this.settings.rtl ? this.coordinates(this.minimum()) : this.coordinates(this.maximum());\r\n\t\t\tpull = this.settings.pullDrag ? -1 * delta.x / 5 : 0;\r\n\t\t\tstage.x = Math.max(Math.min(stage.x, minimum + pull), maximum + pull);\r\n\t\t}\r\n\r\n\t\tthis._drag.stage.current = stage;\r\n\r\n\t\tthis.animate(stage.x);\r\n\t};\r\n\r\n\t/**\r\n\t * Handles the `touchend` and `mouseup` events.\r\n\t * @todo #261\r\n\t * @todo Threshold for click event\r\n\t * @protected\r\n\t * @param {Event} event - The event arguments.\r\n\t */\r\n\tOwl.prototype.onDragEnd = function(event) {\r\n\t\tvar delta = this.difference(this._drag.pointer, this.pointer(event)),\r\n\t\t\tstage = this._drag.stage.current,\r\n\t\t\tdirection = delta.x > 0 ^ this.settings.rtl ? 'left' : 'right';\r\n\r\n\t\t$(document).off('.owl.core');\r\n\r\n\t\tthis.$element.removeClass(this.options.grabClass);\r\n\r\n\t\tif (delta.x !== 0 && this.is('dragging') || !this.is('valid')) {\r\n\t\t\tthis.speed(this.settings.dragEndSpeed || this.settings.smartSpeed);\r\n\t\t\tthis.current(this.closest(stage.x, delta.x !== 0 ? direction : this._drag.direction));\r\n\t\t\tthis.invalidate('position');\r\n\t\t\tthis.update();\r\n\r\n\t\t\tthis._drag.direction = direction;\r\n\r\n\t\t\tif (Math.abs(delta.x) > 3 || new Date().getTime() - this._drag.time > 300) {\r\n\t\t\t\tthis._drag.target.one('click.owl.core', function() { return false; });\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (!this.is('dragging')) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis.leave('dragging');\r\n\t\tthis.trigger('dragged');\r\n\t};\r\n\r\n\t/**\r\n\t * Gets absolute position of the closest item for a coordinate.\r\n\t * @todo Setting `freeDrag` makes `closest` not reusable. See #165.\r\n\t * @protected\r\n\t * @param {Number} coordinate - The coordinate in pixel.\r\n\t * @param {String} direction - The direction to check for the closest item. Ether `left` or `right`.\r\n\t * @return {Number} - The absolute position of the closest item.\r\n\t */\r\n\tOwl.prototype.closest = function(coordinate, direction) {\r\n\t\tvar position = -1,\r\n\t\t\tpull = 30,\r\n\t\t\twidth = this.width(),\r\n\t\t\tcoordinates = this.coordinates();\r\n\r\n\t\tif (!this.settings.freeDrag) {\r\n\t\t\t// check closest item\r\n\t\t\t$.each(coordinates, $.proxy(function(index, value) {\r\n\t\t\t\t// on a left pull, check on current index\r\n\t\t\t\tif (direction === 'left' && coordinate > value - pull && coordinate < value + pull) {\r\n\t\t\t\t\tposition = index;\r\n\t\t\t\t// on a right pull, check on previous index\r\n\t\t\t\t// to do so, subtract width from value and set position = index + 1\r\n\t\t\t\t} else if (direction === 'right' && coordinate > value - width - pull && coordinate < value - width + pull) {\r\n\t\t\t\t\tposition = index + 1;\r\n\t\t\t\t} else if (this.op(coordinate, '<', value)\r\n\t\t\t\t\t&& this.op(coordinate, '>', coordinates[index + 1] || value - width)) {\r\n\t\t\t\t\tposition = direction === 'left' ? index + 1 : index;\r\n\t\t\t\t}\r\n\t\t\t\treturn position === -1;\r\n\t\t\t}, this));\r\n\t\t}\r\n\r\n\t\tif (!this.settings.loop) {\r\n\t\t\t// non loop boundries\r\n\t\t\tif (this.op(coordinate, '>', coordinates[this.minimum()])) {\r\n\t\t\t\tposition = coordinate = this.minimum();\r\n\t\t\t} else if (this.op(coordinate, '<', coordinates[this.maximum()])) {\r\n\t\t\t\tposition = coordinate = this.maximum();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn position;\r\n\t};\r\n\r\n\t/**\r\n\t * Animates the stage.\r\n\t * @todo #270\r\n\t * @public\r\n\t * @param {Number} coordinate - The coordinate in pixels.\r\n\t */\r\n\tOwl.prototype.animate = function(coordinate) {\r\n\t\tvar animate = this.speed() > 0;\r\n\r\n\t\tthis.is('animating') && this.onTransitionEnd();\r\n\r\n\t\tif (animate) {\r\n\t\t\tthis.enter('animating');\r\n\t\t\tthis.trigger('translate');\r\n\t\t}\r\n\r\n\t\tif ($.support.transform3d && $.support.transition) {\r\n\t\t\tthis.$stage.css({\r\n\t\t\t\ttransform: 'translate3d(' + coordinate + 'px,0px,0px)',\r\n\t\t\t\ttransition: (this.speed() / 1000) + 's'\r\n\t\t\t});\r\n\t\t} else if (animate) {\r\n\t\t\tthis.$stage.animate({\r\n\t\t\t\tleft: coordinate + 'px' \r\n\t\t\t}, this.speed(), this.settings.fallbackEasing, $.proxy(this.onTransitionEnd, this));\r\n\t\t} else {\r\n\t\t\tthis.$stage.css({\r\n\t\t\t\tleft: coordinate + 'px' \r\n\t\t\t});\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * Checks whether the carousel is in a specific state or not.\r\n\t * @param {String} state - The state to check.\r\n\t * @returns {Boolean} - The flag which indicates if the carousel is busy.\r\n\t */\r\n\tOwl.prototype.is = function(state) {\r\n\t\treturn this._states.current[state] && this._states.current[state] > 0;\r\n\t};\r\n\r\n\t/**\r\n\t * Sets the absolute position of the current item.\r\n\t * @public\r\n\t * @param {Number} [position] - The new absolute position or nothing to leave it unchanged.\r\n\t * @returns {Number} - The absolute position of the current item.\r\n\t */\r\n\tOwl.prototype.current = function(position) {\r\n\t\tif (position === undefined) {\r\n\t\t\treturn this._current;\r\n\t\t}\r\n\r\n\t\tif (this._items.length === 0) {\r\n\t\t\treturn undefined;\r\n\t\t}\r\n\r\n\t\tposition = this.normalize(position);\r\n\r\n\t\tif (this._current !== position) {\r\n\t\t\tvar event = this.trigger('change', { property: { name: 'position', value: position } });\r\n\r\n\t\t\tif (event.data !== undefined) {\r\n\t\t\t\tposition = this.normalize(event.data);\r\n\t\t\t}\r\n\r\n\t\t\tthis._current = position;\r\n\r\n\t\t\tthis.invalidate('position');\r\n\r\n\t\t\tthis.trigger('changed', { property: { name: 'position', value: this._current } });\r\n\t\t}\r\n\r\n\t\treturn this._current;\r\n\t};\r\n\r\n\t/**\r\n\t * Invalidates the given part of the update routine.\r\n\t * @param {String} [part] - The part to invalidate.\r\n\t * @returns {Array.} - The invalidated parts.\r\n\t */\r\n\tOwl.prototype.invalidate = function(part) {\r\n\t\tif ($.type(part) === 'string') {\r\n\t\t\tthis._invalidated[part] = true;\r\n\t\t\tthis.is('valid') && this.leave('valid');\r\n\t\t}\r\n\t\treturn $.map(this._invalidated, function(v, i) { return i });\r\n\t};\r\n\r\n\t/**\r\n\t * Resets the absolute position of the current item.\r\n\t * @public\r\n\t * @param {Number} position - The absolute position of the new item.\r\n\t */\r\n\tOwl.prototype.reset = function(position) {\r\n\t\tposition = this.normalize(position);\r\n\r\n\t\tif (position === undefined) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis._speed = 0;\r\n\t\tthis._current = position;\r\n\r\n\t\tthis.suppress([ 'translate', 'translated' ]);\r\n\r\n\t\tthis.animate(this.coordinates(position));\r\n\r\n\t\tthis.release([ 'translate', 'translated' ]);\r\n\t};\r\n\r\n\t/**\r\n\t * Normalizes an absolute or a relative position of an item.\r\n\t * @public\r\n\t * @param {Number} position - The absolute or relative position to normalize.\r\n\t * @param {Boolean} [relative=false] - Whether the given position is relative or not.\r\n\t * @returns {Number} - The normalized position.\r\n\t */\r\n\tOwl.prototype.normalize = function(position, relative) {\r\n\t\tvar n = this._items.length,\r\n\t\t\tm = relative ? 0 : this._clones.length;\r\n\r\n\t\tif (!this.isNumeric(position) || n < 1) {\r\n\t\t\tposition = undefined;\r\n\t\t} else if (position < 0 || position >= n + m) {\r\n\t\t\tposition = ((position - m / 2) % n + n) % n + m / 2;\r\n\t\t}\r\n\r\n\t\treturn position;\r\n\t};\r\n\r\n\t/**\r\n\t * Converts an absolute position of an item into a relative one.\r\n\t * @public\r\n\t * @param {Number} position - The absolute position to convert.\r\n\t * @returns {Number} - The converted position.\r\n\t */\r\n\tOwl.prototype.relative = function(position) {\r\n\t\tposition -= this._clones.length / 2;\r\n\t\treturn this.normalize(position, true);\r\n\t};\r\n\r\n\t/**\r\n\t * Gets the maximum position for the current item.\r\n\t * @public\r\n\t * @param {Boolean} [relative=false] - Whether to return an absolute position or a relative position.\r\n\t * @returns {Number}\r\n\t */\r\n\tOwl.prototype.maximum = function(relative) {\r\n\t\tvar settings = this.settings,\r\n\t\t\tmaximum = this._coordinates.length,\r\n\t\t\tboundary = Math.abs(this._coordinates[maximum - 1]) - this._width,\r\n\t\t\ti = -1, j;\r\n\r\n\t\tif (settings.loop) {\r\n\t\t\tmaximum = this._clones.length / 2 + this._items.length - 1;\r\n\t\t} else if (settings.autoWidth || settings.merge) {\r\n\t\t\t// binary search\r\n\t\t\twhile (maximum - i > 1) {\r\n\t\t\t\tMath.abs(this._coordinates[j = maximum + i >> 1]) < boundary\r\n\t\t\t\t\t? i = j : maximum = j;\r\n\t\t\t}\r\n\t\t} else if (settings.center) {\r\n\t\t\tmaximum = this._items.length - 1;\r\n\t\t} else {\r\n\t\t\tmaximum = this._items.length - settings.items;\r\n\t\t}\r\n\r\n\t\tif (relative) {\r\n\t\t\tmaximum -= this._clones.length / 2;\r\n\t\t}\r\n\r\n\t\treturn Math.max(maximum, 0);\r\n\t};\r\n\r\n\t/**\r\n\t * Gets the minimum position for the current item.\r\n\t * @public\r\n\t * @param {Boolean} [relative=false] - Whether to return an absolute position or a relative position.\r\n\t * @returns {Number}\r\n\t */\r\n\tOwl.prototype.minimum = function(relative) {\r\n\t\treturn relative ? 0 : this._clones.length / 2;\r\n\t};\r\n\r\n\t/**\r\n\t * Gets an item at the specified relative position.\r\n\t * @public\r\n\t * @param {Number} [position] - The relative position of the item.\r\n\t * @return {jQuery|Array.} - The item at the given position or all items if no position was given.\r\n\t */\r\n\tOwl.prototype.items = function(position) {\r\n\t\tif (position === undefined) {\r\n\t\t\treturn this._items.slice();\r\n\t\t}\r\n\r\n\t\tposition = this.normalize(position, true);\r\n\t\treturn this._items[position];\r\n\t};\r\n\r\n\t/**\r\n\t * Gets an item at the specified relative position.\r\n\t * @public\r\n\t * @param {Number} [position] - The relative position of the item.\r\n\t * @return {jQuery|Array.} - The item at the given position or all items if no position was given.\r\n\t */\r\n\tOwl.prototype.mergers = function(position) {\r\n\t\tif (position === undefined) {\r\n\t\t\treturn this._mergers.slice();\r\n\t\t}\r\n\r\n\t\tposition = this.normalize(position, true);\r\n\t\treturn this._mergers[position];\r\n\t};\r\n\r\n\t/**\r\n\t * Gets the absolute positions of clones for an item.\r\n\t * @public\r\n\t * @param {Number} [position] - The relative position of the item.\r\n\t * @returns {Array.} - The absolute positions of clones for the item or all if no position was given.\r\n\t */\r\n\tOwl.prototype.clones = function(position) {\r\n\t\tvar odd = this._clones.length / 2,\r\n\t\t\teven = odd + this._items.length,\r\n\t\t\tmap = function(index) { return index % 2 === 0 ? even + index / 2 : odd - (index + 1) / 2 };\r\n\r\n\t\tif (position === undefined) {\r\n\t\t\treturn $.map(this._clones, function(v, i) { return map(i) });\r\n\t\t}\r\n\r\n\t\treturn $.map(this._clones, function(v, i) { return v === position ? map(i) : null });\r\n\t};\r\n\r\n\t/**\r\n\t * Sets the current animation speed.\r\n\t * @public\r\n\t * @param {Number} [speed] - The animation speed in milliseconds or nothing to leave it unchanged.\r\n\t * @returns {Number} - The current animation speed in milliseconds.\r\n\t */\r\n\tOwl.prototype.speed = function(speed) {\r\n\t\tif (speed !== undefined) {\r\n\t\t\tthis._speed = speed;\r\n\t\t}\r\n\r\n\t\treturn this._speed;\r\n\t};\r\n\r\n\t/**\r\n\t * Gets the coordinate of an item.\r\n\t * @todo The name of this method is missleanding.\r\n\t * @public\r\n\t * @param {Number} position - The absolute position of the item within `minimum()` and `maximum()`.\r\n\t * @returns {Number|Array.} - The coordinate of the item in pixel or all coordinates.\r\n\t */\r\n\tOwl.prototype.coordinates = function(position) {\r\n\t\tvar multiplier = 1,\r\n\t\t\tnewPosition = position - 1,\r\n\t\t\tcoordinate;\r\n\r\n\t\tif (position === undefined) {\r\n\t\t\treturn $.map(this._coordinates, $.proxy(function(coordinate, index) {\r\n\t\t\t\treturn this.coordinates(index);\r\n\t\t\t}, this));\r\n\t\t}\r\n\r\n\t\tif (this.settings.center) {\r\n\t\t\tif (this.settings.rtl) {\r\n\t\t\t\tmultiplier = -1;\r\n\t\t\t\tnewPosition = position + 1;\r\n\t\t\t}\r\n\r\n\t\t\tcoordinate = this._coordinates[position];\r\n\t\t\tcoordinate += (this.width() - coordinate + (this._coordinates[newPosition] || 0)) / 2 * multiplier;\r\n\t\t} else {\r\n\t\t\tcoordinate = this._coordinates[newPosition] || 0;\r\n\t\t}\r\n\r\n\t\tcoordinate = Math.ceil(coordinate);\r\n\r\n\t\treturn coordinate;\r\n\t};\r\n\r\n\t/**\r\n\t * Calculates the speed for a translation.\r\n\t * @protected\r\n\t * @param {Number} from - The absolute position of the start item.\r\n\t * @param {Number} to - The absolute position of the target item.\r\n\t * @param {Number} [factor=undefined] - The time factor in milliseconds.\r\n\t * @returns {Number} - The time in milliseconds for the translation.\r\n\t */\r\n\tOwl.prototype.duration = function(from, to, factor) {\r\n\t\tif (factor === 0) {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\r\n\t\treturn Math.min(Math.max(Math.abs(to - from), 1), 6) * Math.abs((factor || this.settings.smartSpeed));\r\n\t};\r\n\r\n\t/**\r\n\t * Slides to the specified item.\r\n\t * @public\r\n\t * @param {Number} position - The position of the item.\r\n\t * @param {Number} [speed] - The time in milliseconds for the transition.\r\n\t */\r\n\tOwl.prototype.to = function(position, speed) {\r\n\t\tvar current = this.current(),\r\n\t\t\trevert = null,\r\n\t\t\tdistance = position - this.relative(current),\r\n\t\t\tdirection = (distance > 0) - (distance < 0),\r\n\t\t\titems = this._items.length,\r\n\t\t\tminimum = this.minimum(),\r\n\t\t\tmaximum = this.maximum();\r\n\r\n\t\tif (this.settings.loop) {\r\n\t\t\tif (!this.settings.rewind && Math.abs(distance) > items / 2) {\r\n\t\t\t\tdistance += direction * -1 * items;\r\n\t\t\t}\r\n\r\n\t\t\tposition = current + distance;\r\n\t\t\trevert = ((position - minimum) % items + items) % items + minimum;\r\n\r\n\t\t\tif (revert !== position && revert - distance <= maximum && revert - distance > 0) {\r\n\t\t\t\tcurrent = revert - distance;\r\n\t\t\t\tposition = revert;\r\n\t\t\t\tthis.reset(current);\r\n\t\t\t}\r\n\t\t} else if (this.settings.rewind) {\r\n\t\t\tmaximum += 1;\r\n\t\t\tposition = (position % maximum + maximum) % maximum;\r\n\t\t} else {\r\n\t\t\tposition = Math.max(minimum, Math.min(maximum, position));\r\n\t\t}\r\n\r\n\t\tthis.speed(this.duration(current, position, speed));\r\n\t\tthis.current(position);\r\n\r\n\t\tif (this.$element.is(':visible')) {\r\n\t\t\tthis.update();\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * Slides to the next item.\r\n\t * @public\r\n\t * @param {Number} [speed] - The time in milliseconds for the transition.\r\n\t */\r\n\tOwl.prototype.next = function(speed) {\r\n\t\tspeed = speed || false;\r\n\t\tthis.to(this.relative(this.current()) + 1, speed);\r\n\t};\r\n\r\n\t/**\r\n\t * Slides to the previous item.\r\n\t * @public\r\n\t * @param {Number} [speed] - The time in milliseconds for the transition.\r\n\t */\r\n\tOwl.prototype.prev = function(speed) {\r\n\t\tspeed = speed || false;\r\n\t\tthis.to(this.relative(this.current()) - 1, speed);\r\n\t};\r\n\r\n\t/**\r\n\t * Handles the end of an animation.\r\n\t * @protected\r\n\t * @param {Event} event - The event arguments.\r\n\t */\r\n\tOwl.prototype.onTransitionEnd = function(event) {\r\n\r\n\t\t// if css2 animation then event object is undefined\r\n\t\tif (event !== undefined) {\r\n\t\t\tevent.stopPropagation();\r\n\r\n\t\t\t// Catch only owl-stage transitionEnd event\r\n\t\t\tif ((event.target || event.srcElement || event.originalTarget) !== this.$stage.get(0)) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.leave('animating');\r\n\t\tthis.trigger('translated');\r\n\t};\r\n\r\n\t/**\r\n\t * Gets viewport width.\r\n\t * @protected\r\n\t * @return {Number} - The width in pixel.\r\n\t */\r\n\tOwl.prototype.viewport = function() {\r\n\t\tvar width;\r\n\t\tif (this.options.responsiveBaseElement !== window) {\r\n\t\t\twidth = $(this.options.responsiveBaseElement).width();\r\n\t\t} else if (window.innerWidth) {\r\n\t\t\twidth = window.innerWidth;\r\n\t\t} else if (document.documentElement && document.documentElement.clientWidth) {\r\n\t\t\twidth = document.documentElement.clientWidth;\r\n\t\t} else {\r\n\t\t\tthrow 'Can not detect viewport width.';\r\n\t\t}\r\n\t\treturn width;\r\n\t};\r\n\r\n\t/**\r\n\t * Replaces the current content.\r\n\t * @public\r\n\t * @param {HTMLElement|jQuery|String} content - The new content.\r\n\t */\r\n\tOwl.prototype.replace = function(content) {\r\n\t\tthis.$stage.empty();\r\n\t\tthis._items = [];\r\n\r\n\t\tif (content) {\r\n\t\t\tcontent = (content instanceof jQuery) ? content : $(content);\r\n\t\t}\r\n\r\n\t\tif (this.settings.nestedItemSelector) {\r\n\t\t\tcontent = content.find('.' + this.settings.nestedItemSelector);\r\n\t\t}\r\n\r\n\t\tcontent.filter(function() {\r\n\t\t\treturn this.nodeType === 1;\r\n\t\t}).each($.proxy(function(index, item) {\r\n\t\t\titem = this.prepare(item);\r\n\t\t\tthis.$stage.append(item);\r\n\t\t\tthis._items.push(item);\r\n\t\t\tthis._mergers.push(item.find('[data-merge]').andSelf('[data-merge]').attr('data-merge') * 1 || 1);\r\n\t\t}, this));\r\n\r\n\t\tthis.reset(this.isNumeric(this.settings.startPosition) ? this.settings.startPosition : 0);\r\n\r\n\t\tthis.invalidate('items');\r\n\t};\r\n\r\n\t/**\r\n\t * Adds an item.\r\n\t * @todo Use `item` instead of `content` for the event arguments.\r\n\t * @public\r\n\t * @param {HTMLElement|jQuery|String} content - The item content to add.\r\n\t * @param {Number} [position] - The relative position at which to insert the item otherwise the item will be added to the end.\r\n\t */\r\n\tOwl.prototype.add = function(content, position) {\r\n\t\tvar current = this.relative(this._current);\r\n\r\n\t\tposition = position === undefined ? this._items.length : this.normalize(position, true);\r\n\t\tcontent = content instanceof jQuery ? content : $(content);\r\n\r\n\t\tthis.trigger('add', { content: content, position: position });\r\n\r\n\t\tcontent = this.prepare(content);\r\n\r\n\t\tif (this._items.length === 0 || position === this._items.length) {\r\n\t\t\tthis._items.length === 0 && this.$stage.append(content);\r\n\t\t\tthis._items.length !== 0 && this._items[position - 1].after(content);\r\n\t\t\tthis._items.push(content);\r\n\t\t\tthis._mergers.push(content.find('[data-merge]').andSelf('[data-merge]').attr('data-merge') * 1 || 1);\r\n\t\t} else {\r\n\t\t\tthis._items[position].before(content);\r\n\t\t\tthis._items.splice(position, 0, content);\r\n\t\t\tthis._mergers.splice(position, 0, content.find('[data-merge]').andSelf('[data-merge]').attr('data-merge') * 1 || 1);\r\n\t\t}\r\n\r\n\t\tthis._items[current] && this.reset(this._items[current].index());\r\n\r\n\t\tthis.invalidate('items');\r\n\r\n\t\tthis.trigger('added', { content: content, position: position });\r\n\t};\r\n\r\n\t/**\r\n\t * Removes an item by its position.\r\n\t * @todo Use `item` instead of `content` for the event arguments.\r\n\t * @public\r\n\t * @param {Number} position - The relative position of the item to remove.\r\n\t */\r\n\tOwl.prototype.remove = function(position) {\r\n\t\tposition = this.normalize(position, true);\r\n\r\n\t\tif (position === undefined) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis.trigger('remove', { content: this._items[position], position: position });\r\n\r\n\t\tthis._items[position].remove();\r\n\t\tthis._items.splice(position, 1);\r\n\t\tthis._mergers.splice(position, 1);\r\n\r\n\t\tthis.invalidate('items');\r\n\r\n\t\tthis.trigger('removed', { content: null, position: position });\r\n\t};\r\n\r\n\t/**\r\n\t * Preloads images with auto width.\r\n\t * @todo Replace by a more generic approach\r\n\t * @protected\r\n\t */\r\n\tOwl.prototype.preloadAutoWidthImages = function(images) {\r\n\t\timages.each($.proxy(function(i, element) {\r\n\t\t\tthis.enter('pre-loading');\r\n\t\t\telement = $(element);\r\n\t\t\t$(new Image()).one('load', $.proxy(function(e) {\r\n\t\t\t\telement.attr('src', e.target.src);\r\n\t\t\t\telement.css('opacity', 1);\r\n\t\t\t\tthis.leave('pre-loading');\r\n\t\t\t\t!this.is('pre-loading') && !this.is('initializing') && this.refresh();\r\n\t\t\t}, this)).attr('src', element.attr('src') || element.attr('data-src') || element.attr('data-src-retina'));\r\n\t\t}, this));\r\n\t};\r\n\r\n\t/**\r\n\t * Destroys the carousel.\r\n\t * @public\r\n\t */\r\n\tOwl.prototype.destroy = function() {\r\n\r\n\t\tthis.$element.off('.owl.core');\r\n\t\tthis.$stage.off('.owl.core');\r\n\t\t$(document).off('.owl.core');\r\n\r\n\t\tif (this.settings.responsive !== false) {\r\n\t\t\twindow.clearTimeout(this.resizeTimer);\r\n\t\t\tthis.off(window, 'resize', this._handlers.onThrottledResize);\r\n\t\t}\r\n\r\n\t\tfor (var i in this._plugins) {\r\n\t\t\tthis._plugins[i].destroy();\r\n\t\t}\r\n\r\n\t\tthis.$stage.children('.cloned').remove();\r\n\r\n\t\tthis.$stage.unwrap();\r\n\t\tthis.$stage.children().contents().unwrap();\r\n\t\tthis.$stage.children().unwrap();\r\n\r\n\t\tthis.$element\r\n\t\t\t.removeClass(this.options.refreshClass)\r\n\t\t\t.removeClass(this.options.loadingClass)\r\n\t\t\t.removeClass(this.options.loadedClass)\r\n\t\t\t.removeClass(this.options.rtlClass)\r\n\t\t\t.removeClass(this.options.dragClass)\r\n\t\t\t.removeClass(this.options.grabClass)\r\n\t\t\t.attr('class', this.$element.attr('class').replace(new RegExp(this.options.responsiveClass + '-\\\\S+\\\\s', 'g'), ''))\r\n\t\t\t.removeData('owl.carousel');\r\n\t};\r\n\r\n\t/**\r\n\t * Operators to calculate right-to-left and left-to-right.\r\n\t * @protected\r\n\t * @param {Number} [a] - The left side operand.\r\n\t * @param {String} [o] - The operator.\r\n\t * @param {Number} [b] - The right side operand.\r\n\t */\r\n\tOwl.prototype.op = function(a, o, b) {\r\n\t\tvar rtl = this.settings.rtl;\r\n\t\tswitch (o) {\r\n\t\t\tcase '<':\r\n\t\t\t\treturn rtl ? a > b : a < b;\r\n\t\t\tcase '>':\r\n\t\t\t\treturn rtl ? a < b : a > b;\r\n\t\t\tcase '>=':\r\n\t\t\t\treturn rtl ? a <= b : a >= b;\r\n\t\t\tcase '<=':\r\n\t\t\t\treturn rtl ? a >= b : a <= b;\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * Attaches to an internal event.\r\n\t * @protected\r\n\t * @param {HTMLElement} element - The event source.\r\n\t * @param {String} event - The event name.\r\n\t * @param {Function} listener - The event handler to attach.\r\n\t * @param {Boolean} capture - Wether the event should be handled at the capturing phase or not.\r\n\t */\r\n\tOwl.prototype.on = function(element, event, listener, capture) {\r\n\t\tif (element.addEventListener) {\r\n\t\t\telement.addEventListener(event, listener, capture);\r\n\t\t} else if (element.attachEvent) {\r\n\t\t\telement.attachEvent('on' + event, listener);\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * Detaches from an internal event.\r\n\t * @protected\r\n\t * @param {HTMLElement} element - The event source.\r\n\t * @param {String} event - The event name.\r\n\t * @param {Function} listener - The attached event handler to detach.\r\n\t * @param {Boolean} capture - Wether the attached event handler was registered as a capturing listener or not.\r\n\t */\r\n\tOwl.prototype.off = function(element, event, listener, capture) {\r\n\t\tif (element.removeEventListener) {\r\n\t\t\telement.removeEventListener(event, listener, capture);\r\n\t\t} else if (element.detachEvent) {\r\n\t\t\telement.detachEvent('on' + event, listener);\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * Triggers a public event.\r\n\t * @todo Remove `status`, `relatedTarget` should be used instead.\r\n\t * @protected\r\n\t * @param {String} name - The event name.\r\n\t * @param {*} [data=null] - The event data.\r\n\t * @param {String} [namespace=carousel] - The event namespace.\r\n\t * @param {String} [state] - The state which is associated with the event.\r\n\t * @param {Boolean} [enter=false] - Indicates if the call enters the specified state or not.\r\n\t * @returns {Event} - The event arguments.\r\n\t */\r\n\tOwl.prototype.trigger = function(name, data, namespace, state, enter) {\r\n\t\tvar status = {\r\n\t\t\titem: { count: this._items.length, index: this.current() }\r\n\t\t}, handler = $.camelCase(\r\n\t\t\t$.grep([ 'on', name, namespace ], function(v) { return v })\r\n\t\t\t\t.join('-').toLowerCase()\r\n\t\t), event = $.Event(\r\n\t\t\t[ name, 'owl', namespace || 'carousel' ].join('.').toLowerCase(),\r\n\t\t\t$.extend({ relatedTarget: this }, status, data)\r\n\t\t);\r\n\r\n\t\tif (!this._supress[name]) {\r\n\t\t\t$.each(this._plugins, function(name, plugin) {\r\n\t\t\t\tif (plugin.onTrigger) {\r\n\t\t\t\t\tplugin.onTrigger(event);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tthis.register({ type: Owl.Type.Event, name: name });\r\n\t\t\tthis.$element.trigger(event);\r\n\r\n\t\t\tif (this.settings && typeof this.settings[handler] === 'function') {\r\n\t\t\t\tthis.settings[handler].call(this, event);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn event;\r\n\t};\r\n\r\n\t/**\r\n\t * Enters a state.\r\n\t * @param name - The state name.\r\n\t */\r\n\tOwl.prototype.enter = function(name) {\r\n\t\t$.each([ name ].concat(this._states.tags[name] || []), $.proxy(function(i, name) {\r\n\t\t\tif (this._states.current[name] === undefined) {\r\n\t\t\t\tthis._states.current[name] = 0;\r\n\t\t\t}\r\n\r\n\t\t\tthis._states.current[name]++;\r\n\t\t}, this));\r\n\t};\r\n\r\n\t/**\r\n\t * Leaves a state.\r\n\t * @param name - The state name.\r\n\t */\r\n\tOwl.prototype.leave = function(name) {\r\n\t\t$.each([ name ].concat(this._states.tags[name] || []), $.proxy(function(i, name) {\r\n\t\t\tthis._states.current[name]--;\r\n\t\t}, this));\r\n\t};\r\n\r\n\t/**\r\n\t * Registers an event or state.\r\n\t * @public\r\n\t * @param {Object} object - The event or state to register.\r\n\t */\r\n\tOwl.prototype.register = function(object) {\r\n\t\tif (object.type === Owl.Type.Event) {\r\n\t\t\tif (!$.event.special[object.name]) {\r\n\t\t\t\t$.event.special[object.name] = {};\r\n\t\t\t}\r\n\r\n\t\t\tif (!$.event.special[object.name].owl) {\r\n\t\t\t\tvar _default = $.event.special[object.name]._default;\r\n\t\t\t\t$.event.special[object.name]._default = function(e) {\r\n\t\t\t\t\tif (_default && _default.apply && (!e.namespace || e.namespace.indexOf('owl') === -1)) {\r\n\t\t\t\t\t\treturn _default.apply(this, arguments);\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn e.namespace && e.namespace.indexOf('owl') > -1;\r\n\t\t\t\t};\r\n\t\t\t\t$.event.special[object.name].owl = true;\r\n\t\t\t}\r\n\t\t} else if (object.type === Owl.Type.State) {\r\n\t\t\tif (!this._states.tags[object.name]) {\r\n\t\t\t\tthis._states.tags[object.name] = object.tags;\r\n\t\t\t} else {\r\n\t\t\t\tthis._states.tags[object.name] = this._states.tags[object.name].concat(object.tags);\r\n\t\t\t}\r\n\r\n\t\t\tthis._states.tags[object.name] = $.grep(this._states.tags[object.name], $.proxy(function(tag, i) {\r\n\t\t\t\treturn $.inArray(tag, this._states.tags[object.name]) === i;\r\n\t\t\t}, this));\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * Suppresses events.\r\n\t * @protected\r\n\t * @param {Array.} events - The events to suppress.\r\n\t */\r\n\tOwl.prototype.suppress = function(events) {\r\n\t\t$.each(events, $.proxy(function(index, event) {\r\n\t\t\tthis._supress[event] = true;\r\n\t\t}, this));\r\n\t};\r\n\r\n\t/**\r\n\t * Releases suppressed events.\r\n\t * @protected\r\n\t * @param {Array.} events - The events to release.\r\n\t */\r\n\tOwl.prototype.release = function(events) {\r\n\t\t$.each(events, $.proxy(function(index, event) {\r\n\t\t\tdelete this._supress[event];\r\n\t\t}, this));\r\n\t};\r\n\r\n\t/**\r\n\t * Gets unified pointer coordinates from event.\r\n\t * @todo #261\r\n\t * @protected\r\n\t * @param {Event} - The `mousedown` or `touchstart` event.\r\n\t * @returns {Object} - Contains `x` and `y` coordinates of current pointer position.\r\n\t */\r\n\tOwl.prototype.pointer = function(event) {\r\n\t\tvar result = { x: null, y: null };\r\n\r\n\t\tevent = event.originalEvent || event || window.event;\r\n\r\n\t\tevent = event.touches && event.touches.length ?\r\n\t\t\tevent.touches[0] : event.changedTouches && event.changedTouches.length ?\r\n\t\t\t\tevent.changedTouches[0] : event;\r\n\r\n\t\tif (event.pageX) {\r\n\t\t\tresult.x = event.pageX;\r\n\t\t\tresult.y = event.pageY;\r\n\t\t} else {\r\n\t\t\tresult.x = event.clientX;\r\n\t\t\tresult.y = event.clientY;\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\t};\r\n\r\n\t/**\r\n\t * Determines if the input is a Number or something that can be coerced to a Number\r\n\t * @protected\r\n\t * @param {Number|String|Object|Array|Boolean|RegExp|Function|Symbol} - The input to be tested\r\n\t * @returns {Boolean} - An indication if the input is a Number or can be coerced to a Number\r\n\t */\r\n\tOwl.prototype.isNumeric = function(number) {\r\n\t\treturn !isNaN(parseFloat(number));\r\n\t};\r\n\r\n\t/**\r\n\t * Gets the difference of two vectors.\r\n\t * @todo #261\r\n\t * @protected\r\n\t * @param {Object} - The first vector.\r\n\t * @param {Object} - The second vector.\r\n\t * @returns {Object} - The difference.\r\n\t */\r\n\tOwl.prototype.difference = function(first, second) {\r\n\t\treturn {\r\n\t\t\tx: first.x - second.x,\r\n\t\t\ty: first.y - second.y\r\n\t\t};\r\n\t};\r\n\r\n\t/**\r\n\t * The jQuery Plugin for the Owl Carousel\r\n\t * @todo Navigation plugin `next` and `prev`\r\n\t * @public\r\n\t */\r\n\t$.fn.owlCarousel = function(option) {\r\n\t\tvar args = Array.prototype.slice.call(arguments, 1);\r\n\r\n\t\treturn this.each(function() {\r\n\t\t\tvar $this = $(this),\r\n\t\t\t\tdata = $this.data('owl.carousel');\r\n\r\n\t\t\tif (!data) {\r\n\t\t\t\tdata = new Owl(this, typeof option == 'object' && option);\r\n\t\t\t\t$this.data('owl.carousel', data);\r\n\r\n\t\t\t\t$.each([\r\n\t\t\t\t\t'next', 'prev', 'to', 'destroy', 'refresh', 'replace', 'add', 'remove'\r\n\t\t\t\t], function(i, event) {\r\n\t\t\t\t\tdata.register({ type: Owl.Type.Event, name: event });\r\n\t\t\t\t\tdata.$element.on(event + '.owl.carousel.core', $.proxy(function(e) {\r\n\t\t\t\t\t\tif (e.namespace && e.relatedTarget !== this) {\r\n\t\t\t\t\t\t\tthis.suppress([ event ]);\r\n\t\t\t\t\t\t\tdata[event].apply(this, [].slice.call(arguments, 1));\r\n\t\t\t\t\t\t\tthis.release([ event ]);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}, data));\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\tif (typeof option == 'string' && option.charAt(0) !== '_') {\r\n\t\t\t\tdata[option].apply(data, args);\r\n\t\t\t}\r\n\t\t});\r\n\t};\r\n\r\n\t/**\r\n\t * The constructor for the jQuery Plugin\r\n\t * @public\r\n\t */\r\n\t$.fn.owlCarousel.Constructor = Owl;\r\n\r\n})(window.Zepto || window.jQuery, window, document);\r\n\r\n/**\r\n * AutoRefresh Plugin\r\n * @version 2.1.0\r\n * @author Artus Kolanowski\r\n * @author David Deutsch\r\n * @license The MIT License (MIT)\r\n */\r\n;(function($, window, document, undefined) {\r\n\r\n\t/**\r\n\t * Creates the auto refresh plugin.\r\n\t * @class The Auto Refresh Plugin\r\n\t * @param {Owl} carousel - The Owl Carousel\r\n\t */\r\n\tvar AutoRefresh = function(carousel) {\r\n\t\t/**\r\n\t\t * Reference to the core.\r\n\t\t * @protected\r\n\t\t * @type {Owl}\r\n\t\t */\r\n\t\tthis._core = carousel;\r\n\r\n\t\t/**\r\n\t\t * Refresh interval.\r\n\t\t * @protected\r\n\t\t * @type {number}\r\n\t\t */\r\n\t\tthis._interval = null;\r\n\r\n\t\t/**\r\n\t\t * Whether the element is currently visible or not.\r\n\t\t * @protected\r\n\t\t * @type {Boolean}\r\n\t\t */\r\n\t\tthis._visible = null;\r\n\r\n\t\t/**\r\n\t\t * All event handlers.\r\n\t\t * @protected\r\n\t\t * @type {Object}\r\n\t\t */\r\n\t\tthis._handlers = {\r\n\t\t\t'initialized.owl.carousel': $.proxy(function(e) {\r\n\t\t\t\tif (e.namespace && this._core.settings.autoRefresh) {\r\n\t\t\t\t\tthis.watch();\r\n\t\t\t\t}\r\n\t\t\t}, this)\r\n\t\t};\r\n\r\n\t\t// set default options\r\n\t\tthis._core.options = $.extend({}, AutoRefresh.Defaults, this._core.options);\r\n\r\n\t\t// register event handlers\r\n\t\tthis._core.$element.on(this._handlers);\r\n\t};\r\n\r\n\t/**\r\n\t * Default options.\r\n\t * @public\r\n\t */\r\n\tAutoRefresh.Defaults = {\r\n\t\tautoRefresh: true,\r\n\t\tautoRefreshInterval: 500\r\n\t};\r\n\r\n\t/**\r\n\t * Watches the element.\r\n\t */\r\n\tAutoRefresh.prototype.watch = function() {\r\n\t\tif (this._interval) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis._visible = this._core.$element.is(':visible');\r\n\t\tthis._interval = window.setInterval($.proxy(this.refresh, this), this._core.settings.autoRefreshInterval);\r\n\t};\r\n\r\n\t/**\r\n\t * Refreshes the element.\r\n\t */\r\n\tAutoRefresh.prototype.refresh = function() {\r\n\t\tif (this._core.$element.is(':visible') === this._visible) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis._visible = !this._visible;\r\n\r\n\t\tthis._core.$element.toggleClass('owl-hidden', !this._visible);\r\n\r\n\t\tthis._visible && (this._core.invalidate('width') && this._core.refresh());\r\n\t};\r\n\r\n\t/**\r\n\t * Destroys the plugin.\r\n\t */\r\n\tAutoRefresh.prototype.destroy = function() {\r\n\t\tvar handler, property;\r\n\r\n\t\twindow.clearInterval(this._interval);\r\n\r\n\t\tfor (handler in this._handlers) {\r\n\t\t\tthis._core.$element.off(handler, this._handlers[handler]);\r\n\t\t}\r\n\t\tfor (property in Object.getOwnPropertyNames(this)) {\r\n\t\t\ttypeof this[property] != 'function' && (this[property] = null);\r\n\t\t}\r\n\t};\r\n\r\n\t$.fn.owlCarousel.Constructor.Plugins.AutoRefresh = AutoRefresh;\r\n\r\n})(window.Zepto || window.jQuery, window, document);\r\n\r\n/**\r\n * Lazy Plugin\r\n * @version 2.1.0\r\n * @author Bartosz Wojciechowski\r\n * @author David Deutsch\r\n * @license The MIT License (MIT)\r\n */\r\n;(function($, window, document, undefined) {\r\n\r\n\t/**\r\n\t * Creates the lazy plugin.\r\n\t * @class The Lazy Plugin\r\n\t * @param {Owl} carousel - The Owl Carousel\r\n\t */\r\n\tvar Lazy = function(carousel) {\r\n\r\n\t\t/**\r\n\t\t * Reference to the core.\r\n\t\t * @protected\r\n\t\t * @type {Owl}\r\n\t\t */\r\n\t\tthis._core = carousel;\r\n\r\n\t\t/**\r\n\t\t * Already loaded items.\r\n\t\t * @protected\r\n\t\t * @type {Array.}\r\n\t\t */\r\n\t\tthis._loaded = [];\r\n\r\n\t\t/**\r\n\t\t * Event handlers.\r\n\t\t * @protected\r\n\t\t * @type {Object}\r\n\t\t */\r\n\t\tthis._handlers = {\r\n\t\t\t'initialized.owl.carousel change.owl.carousel resized.owl.carousel': $.proxy(function(e) {\r\n\t\t\t\tif (!e.namespace) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (!this._core.settings || !this._core.settings.lazyLoad) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif ((e.property && e.property.name == 'position') || e.type == 'initialized') {\r\n\t\t\t\t\tvar settings = this._core.settings,\r\n\t\t\t\t\t\tn = (settings.center && Math.ceil(settings.items / 2) || settings.items),\r\n\t\t\t\t\t\ti = ((settings.center && n * -1) || 0),\r\n\t\t\t\t\t\tposition = (e.property && e.property.value !== undefined ? e.property.value : this._core.current()) + i,\r\n\t\t\t\t\t\tclones = this._core.clones().length,\r\n\t\t\t\t\t\tload = $.proxy(function(i, v) { this.load(v) }, this);\r\n\r\n\t\t\t\t\twhile (i++ < n) {\r\n\t\t\t\t\t\tthis.load(clones / 2 + this._core.relative(position));\r\n\t\t\t\t\t\tclones && $.each(this._core.clones(this._core.relative(position)), load);\r\n\t\t\t\t\t\tposition++;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}, this)\r\n\t\t};\r\n\r\n\t\t// set the default options\r\n\t\tthis._core.options = $.extend({}, Lazy.Defaults, this._core.options);\r\n\r\n\t\t// register event handler\r\n\t\tthis._core.$element.on(this._handlers);\r\n\t};\r\n\r\n\t/**\r\n\t * Default options.\r\n\t * @public\r\n\t */\r\n\tLazy.Defaults = {\r\n\t\tlazyLoad: false\r\n\t};\r\n\r\n\t/**\r\n\t * Loads all resources of an item at the specified position.\r\n\t * @param {Number} position - The absolute position of the item.\r\n\t * @protected\r\n\t */\r\n\tLazy.prototype.load = function(position) {\r\n\t\tvar $item = this._core.$stage.children().eq(position),\r\n\t\t\t$elements = $item && $item.find('.owl-lazy');\r\n\r\n\t\tif (!$elements || $.inArray($item.get(0), this._loaded) > -1) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t$elements.each($.proxy(function(index, element) {\r\n\t\t\tvar $element = $(element), image,\r\n\t\t\t\turl = (window.devicePixelRatio > 1 && $element.attr('data-src-retina')) || $element.attr('data-src');\r\n\r\n\t\t\tthis._core.trigger('load', { element: $element, url: url }, 'lazy');\r\n\r\n\t\t\tif ($element.is('img')) {\r\n\t\t\t\t$element.one('load.owl.lazy', $.proxy(function() {\r\n\t\t\t\t\t$element.css('opacity', 1);\r\n\t\t\t\t\tthis._core.trigger('loaded', { element: $element, url: url }, 'lazy');\r\n\t\t\t\t}, this)).attr('src', url);\r\n\t\t\t} else {\r\n\t\t\t\timage = new Image();\r\n\t\t\t\timage.onload = $.proxy(function() {\r\n\t\t\t\t\t$element.css({\r\n\t\t\t\t\t\t'background-image': 'url(' + url + ')',\r\n\t\t\t\t\t\t'opacity': '1'\r\n\t\t\t\t\t});\r\n\t\t\t\t\tthis._core.trigger('loaded', { element: $element, url: url }, 'lazy');\r\n\t\t\t\t}, this);\r\n\t\t\t\timage.src = url;\r\n\t\t\t}\r\n\t\t}, this));\r\n\r\n\t\tthis._loaded.push($item.get(0));\r\n\t};\r\n\r\n\t/**\r\n\t * Destroys the plugin.\r\n\t * @public\r\n\t */\r\n\tLazy.prototype.destroy = function() {\r\n\t\tvar handler, property;\r\n\r\n\t\tfor (handler in this.handlers) {\r\n\t\t\tthis._core.$element.off(handler, this.handlers[handler]);\r\n\t\t}\r\n\t\tfor (property in Object.getOwnPropertyNames(this)) {\r\n\t\t\ttypeof this[property] != 'function' && (this[property] = null);\r\n\t\t}\r\n\t};\r\n\r\n\t$.fn.owlCarousel.Constructor.Plugins.Lazy = Lazy;\r\n\r\n})(window.Zepto || window.jQuery, window, document);\r\n\r\n/**\r\n * AutoHeight Plugin\r\n * @version 2.1.0\r\n * @author Bartosz Wojciechowski\r\n * @author David Deutsch\r\n * @license The MIT License (MIT)\r\n */\r\n;(function($, window, document, undefined) {\r\n\r\n\t/**\r\n\t * Creates the auto height plugin.\r\n\t * @class The Auto Height Plugin\r\n\t * @param {Owl} carousel - The Owl Carousel\r\n\t */\r\n\tvar AutoHeight = function(carousel) {\r\n\t\t/**\r\n\t\t * Reference to the core.\r\n\t\t * @protected\r\n\t\t * @type {Owl}\r\n\t\t */\r\n\t\tthis._core = carousel;\r\n\r\n\t\t/**\r\n\t\t * All event handlers.\r\n\t\t * @protected\r\n\t\t * @type {Object}\r\n\t\t */\r\n\t\tthis._handlers = {\r\n\t\t\t'initialized.owl.carousel refreshed.owl.carousel': $.proxy(function(e) {\r\n\t\t\t\tif (e.namespace && this._core.settings.autoHeight) {\r\n\t\t\t\t\tthis.update();\r\n\t\t\t\t}\r\n\t\t\t}, this),\r\n\t\t\t'changed.owl.carousel': $.proxy(function(e) {\r\n\t\t\t\tif (e.namespace && this._core.settings.autoHeight && e.property.name == 'position'){\r\n\t\t\t\t\tthis.update();\r\n\t\t\t\t}\r\n\t\t\t}, this),\r\n\t\t\t'loaded.owl.lazy': $.proxy(function(e) {\r\n\t\t\t\tif (e.namespace && this._core.settings.autoHeight\r\n\t\t\t\t\t&& e.element.closest('.' + this._core.settings.itemClass).index() === this._core.current()) {\r\n\t\t\t\t\tthis.update();\r\n\t\t\t\t}\r\n\t\t\t}, this)\r\n\t\t};\r\n\r\n\t\t// set default options\r\n\t\tthis._core.options = $.extend({}, AutoHeight.Defaults, this._core.options);\r\n\r\n\t\t// register event handlers\r\n\t\tthis._core.$element.on(this._handlers);\r\n\t};\r\n\r\n\t/**\r\n\t * Default options.\r\n\t * @public\r\n\t */\r\n\tAutoHeight.Defaults = {\r\n\t\tautoHeight: false,\r\n\t\tautoHeightClass: 'owl-height'\r\n\t};\r\n\r\n\t/**\r\n\t * Updates the view.\r\n\t */\r\n\tAutoHeight.prototype.update = function() {\r\n\t\tvar start = this._core._current,\r\n\t\t\tend = start + this._core.settings.items,\r\n\t\t\tvisible = this._core.$stage.children().toArray().slice(start, end),\r\n\t\t\theights = [],\r\n\t\t\tmaxheight = 0;\r\n\r\n\t\t$.each(visible, function(index, item) {\r\n\t\t\theights.push($(item).height());\r\n\t\t});\r\n\r\n\t\tmaxheight = Math.max.apply(null, heights);\r\n\r\n\t\tthis._core.$stage.parent()\r\n\t\t\t.height(maxheight)\r\n\t\t\t.addClass(this._core.settings.autoHeightClass);\r\n\t};\r\n\r\n\tAutoHeight.prototype.destroy = function() {\r\n\t\tvar handler, property;\r\n\r\n\t\tfor (handler in this._handlers) {\r\n\t\t\tthis._core.$element.off(handler, this._handlers[handler]);\r\n\t\t}\r\n\t\tfor (property in Object.getOwnPropertyNames(this)) {\r\n\t\t\ttypeof this[property] != 'function' && (this[property] = null);\r\n\t\t}\r\n\t};\r\n\r\n\t$.fn.owlCarousel.Constructor.Plugins.AutoHeight = AutoHeight;\r\n\r\n})(window.Zepto || window.jQuery, window, document);\r\n\r\n/**\r\n * Video Plugin\r\n * @version 2.1.0\r\n * @author Bartosz Wojciechowski\r\n * @author David Deutsch\r\n * @license The MIT License (MIT)\r\n */\r\n;(function($, window, document, undefined) {\r\n\r\n\t/**\r\n\t * Creates the video plugin.\r\n\t * @class The Video Plugin\r\n\t * @param {Owl} carousel - The Owl Carousel\r\n\t */\r\n\tvar Video = function(carousel) {\r\n\t\t/**\r\n\t\t * Reference to the core.\r\n\t\t * @protected\r\n\t\t * @type {Owl}\r\n\t\t */\r\n\t\tthis._core = carousel;\r\n\r\n\t\t/**\r\n\t\t * Cache all video URLs.\r\n\t\t * @protected\r\n\t\t * @type {Object}\r\n\t\t */\r\n\t\tthis._videos = {};\r\n\r\n\t\t/**\r\n\t\t * Current playing item.\r\n\t\t * @protected\r\n\t\t * @type {jQuery}\r\n\t\t */\r\n\t\tthis._playing = null;\r\n\r\n\t\t/**\r\n\t\t * All event handlers.\r\n\t\t * @todo The cloned content removale is too late\r\n\t\t * @protected\r\n\t\t * @type {Object}\r\n\t\t */\r\n\t\tthis._handlers = {\r\n\t\t\t'initialized.owl.carousel': $.proxy(function(e) {\r\n\t\t\t\tif (e.namespace) {\r\n\t\t\t\t\tthis._core.register({ type: 'state', name: 'playing', tags: [ 'interacting' ] });\r\n\t\t\t\t}\r\n\t\t\t}, this),\r\n\t\t\t'resize.owl.carousel': $.proxy(function(e) {\r\n\t\t\t\tif (e.namespace && this._core.settings.video && this.isInFullScreen()) {\r\n\t\t\t\t\te.preventDefault();\r\n\t\t\t\t}\r\n\t\t\t}, this),\r\n\t\t\t'refreshed.owl.carousel': $.proxy(function(e) {\r\n\t\t\t\tif (e.namespace && this._core.is('resizing')) {\r\n\t\t\t\t\tthis._core.$stage.find('.cloned .owl-video-frame').remove();\r\n\t\t\t\t}\r\n\t\t\t}, this),\r\n\t\t\t'changed.owl.carousel': $.proxy(function(e) {\r\n\t\t\t\tif (e.namespace && e.property.name === 'position' && this._playing) {\r\n\t\t\t\t\tthis.stop();\r\n\t\t\t\t}\r\n\t\t\t}, this),\r\n\t\t\t'prepared.owl.carousel': $.proxy(function(e) {\r\n\t\t\t\tif (!e.namespace) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar $element = $(e.content).find('.owl-video');\r\n\r\n\t\t\t\tif ($element.length) {\r\n\t\t\t\t\t$element.css('display', 'none');\r\n\t\t\t\t\tthis.fetch($element, $(e.content));\r\n\t\t\t\t}\r\n\t\t\t}, this)\r\n\t\t};\r\n\r\n\t\t// set default options\r\n\t\tthis._core.options = $.extend({}, Video.Defaults, this._core.options);\r\n\r\n\t\t// register event handlers\r\n\t\tthis._core.$element.on(this._handlers);\r\n\r\n\t\tthis._core.$element.on('click.owl.video', '.owl-video-play-icon', $.proxy(function(e) {\r\n\t\t\tthis.play(e);\r\n\t\t}, this));\r\n\t};\r\n\r\n\t/**\r\n\t * Default options.\r\n\t * @public\r\n\t */\r\n\tVideo.Defaults = {\r\n\t\tvideo: false,\r\n\t\tvideoHeight: false,\r\n\t\tvideoWidth: false\r\n\t};\r\n\r\n\t/**\r\n\t * Gets the video ID and the type (YouTube/Vimeo/vzaar only).\r\n\t * @protected\r\n\t * @param {jQuery} target - The target containing the video data.\r\n\t * @param {jQuery} item - The item containing the video.\r\n\t */\r\n\tVideo.prototype.fetch = function(target, item) {\r\n\t\t\tvar type = (function() {\r\n\t\t\t\t\tif (target.attr('data-vimeo-id')) {\r\n\t\t\t\t\t\treturn 'vimeo';\r\n\t\t\t\t\t} else if (target.attr('data-vzaar-id')) {\r\n\t\t\t\t\t\treturn 'vzaar'\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\treturn 'youtube';\r\n\t\t\t\t\t}\r\n\t\t\t\t})(),\r\n\t\t\t\tid = target.attr('data-vimeo-id') || target.attr('data-youtube-id') || target.attr('data-vzaar-id'),\r\n\t\t\t\twidth = target.attr('data-width') || this._core.settings.videoWidth,\r\n\t\t\t\theight = target.attr('data-height') || this._core.settings.videoHeight,\r\n\t\t\t\turl = target.attr('href');\r\n\r\n\t\tif (url) {\r\n\r\n\t\t\t/*\r\n\t\t\t\t\tParses the id's out of the following urls (and probably more):\r\n\t\t\t\t\thttps://www.youtube.com/watch?v=:id\r\n\t\t\t\t\thttps://youtu.be/:id\r\n\t\t\t\t\thttps://vimeo.com/:id\r\n\t\t\t\t\thttps://vimeo.com/channels/:channel/:id\r\n\t\t\t\t\thttps://vimeo.com/groups/:group/videos/:id\r\n\t\t\t\t\thttps://app.vzaar.com/videos/:id\r\n\r\n\t\t\t\t\tVisual example: https://regexper.com/#(http%3A%7Chttps%3A%7C)%5C%2F%5C%2F(player.%7Cwww.%7Capp.)%3F(vimeo%5C.com%7Cyoutu(be%5C.com%7C%5C.be%7Cbe%5C.googleapis%5C.com)%7Cvzaar%5C.com)%5C%2F(video%5C%2F%7Cvideos%5C%2F%7Cembed%5C%2F%7Cchannels%5C%2F.%2B%5C%2F%7Cgroups%5C%2F.%2B%5C%2F%7Cwatch%5C%3Fv%3D%7Cv%5C%2F)%3F(%5BA-Za-z0-9._%25-%5D*)(%5C%26%5CS%2B)%3F\r\n\t\t\t*/\r\n\r\n\t\t\tid = url.match(/(http:|https:|)\\/\\/(player.|www.|app.)?(vimeo\\.com|youtu(be\\.com|\\.be|be\\.googleapis\\.com)|vzaar\\.com)\\/(video\\/|videos\\/|embed\\/|channels\\/.+\\/|groups\\/.+\\/|watch\\?v=|v\\/)?([A-Za-z0-9._%-]*)(\\&\\S+)?/);\r\n\r\n\t\t\tif (id[3].indexOf('youtu') > -1) {\r\n\t\t\t\ttype = 'youtube';\r\n\t\t\t} else if (id[3].indexOf('vimeo') > -1) {\r\n\t\t\t\ttype = 'vimeo';\r\n\t\t\t} else if (id[3].indexOf('vzaar') > -1) {\r\n\t\t\t\ttype = 'vzaar';\r\n\t\t\t} else {\r\n\t\t\t\tthrow new Error('Video URL not supported.');\r\n\t\t\t}\r\n\t\t\tid = id[6];\r\n\t\t} else {\r\n\t\t\tthrow new Error('Missing video URL.');\r\n\t\t}\r\n\r\n\t\tthis._videos[url] = {\r\n\t\t\ttype: type,\r\n\t\t\tid: id,\r\n\t\t\twidth: width,\r\n\t\t\theight: height\r\n\t\t};\r\n\r\n\t\titem.attr('data-video', url);\r\n\r\n\t\tthis.thumbnail(target, this._videos[url]);\r\n\t};\r\n\r\n\t/**\r\n\t * Creates video thumbnail.\r\n\t * @protected\r\n\t * @param {jQuery} target - The target containing the video data.\r\n\t * @param {Object} info - The video info object.\r\n\t * @see `fetch`\r\n\t */\r\n\tVideo.prototype.thumbnail = function(target, video) {\r\n\t\tvar tnLink,\r\n\t\t\ticon,\r\n\t\t\tpath,\r\n\t\t\tdimensions = video.width && video.height ? 'style=\"width:' + video.width + 'px;height:' + video.height + 'px;\"' : '',\r\n\t\t\tcustomTn = target.find('img'),\r\n\t\t\tsrcType = 'src',\r\n\t\t\tlazyClass = '',\r\n\t\t\tsettings = this._core.settings,\r\n\t\t\tcreate = function(path) {\r\n\t\t\t\ticon = '
    ';\r\n\r\n\t\t\t\tif (settings.lazyLoad) {\r\n\t\t\t\t\ttnLink = '
    ';\r\n\t\t\t\t} else {\r\n\t\t\t\t\ttnLink = '
    ';\r\n\t\t\t\t}\r\n\t\t\t\ttarget.after(tnLink);\r\n\t\t\t\ttarget.after(icon);\r\n\t\t\t};\r\n\r\n\t\t// wrap video content into owl-video-wrapper div\r\n\t\ttarget.wrap('
    ');\r\n\r\n\t\tif (this._core.settings.lazyLoad) {\r\n\t\t\tsrcType = 'data-src';\r\n\t\t\tlazyClass = 'owl-lazy';\r\n\t\t}\r\n\r\n\t\t// custom thumbnail\r\n\t\tif (customTn.length) {\r\n\t\t\tcreate(customTn.attr(srcType));\r\n\t\t\tcustomTn.remove();\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif (video.type === 'youtube') {\r\n\t\t\tpath = \"//img.youtube.com/vi/\" + video.id + \"/hqdefault.jpg\";\r\n\t\t\tcreate(path);\r\n\t\t} else if (video.type === 'vimeo') {\r\n\t\t\t$.ajax({\r\n\t\t\t\ttype: 'GET',\r\n\t\t\t\turl: '//vimeo.com/api/v2/video/' + video.id + '.json',\r\n\t\t\t\tjsonp: 'callback',\r\n\t\t\t\tdataType: 'jsonp',\r\n\t\t\t\tsuccess: function(data) {\r\n\t\t\t\t\tpath = data[0].thumbnail_large;\r\n\t\t\t\t\tcreate(path);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t} else if (video.type === 'vzaar') {\r\n\t\t\t$.ajax({\r\n\t\t\t\ttype: 'GET',\r\n\t\t\t\turl: '//vzaar.com/api/videos/' + video.id + '.json',\r\n\t\t\t\tjsonp: 'callback',\r\n\t\t\t\tdataType: 'jsonp',\r\n\t\t\t\tsuccess: function(data) {\r\n\t\t\t\t\tpath = data.framegrab_url;\r\n\t\t\t\t\tcreate(path);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * Stops the current video.\r\n\t * @public\r\n\t */\r\n\tVideo.prototype.stop = function() {\r\n\t\tthis._core.trigger('stop', null, 'video');\r\n\t\tthis._playing.find('.owl-video-frame').remove();\r\n\t\tthis._playing.removeClass('owl-video-playing');\r\n\t\tthis._playing = null;\r\n\t\tthis._core.leave('playing');\r\n\t\tthis._core.trigger('stopped', null, 'video');\r\n\t};\r\n\r\n\t/**\r\n\t * Starts the current video.\r\n\t * @public\r\n\t * @param {Event} event - The event arguments.\r\n\t */\r\n\tVideo.prototype.play = function(event) {\r\n\t\tvar target = $(event.target),\r\n\t\t\titem = target.closest('.' + this._core.settings.itemClass),\r\n\t\t\tvideo = this._videos[item.attr('data-video')],\r\n\t\t\twidth = video.width || '100%',\r\n\t\t\theight = video.height || this._core.$stage.height(),\r\n\t\t\thtml;\r\n\r\n\t\tif (this._playing) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis._core.enter('playing');\r\n\t\tthis._core.trigger('play', null, 'video');\r\n\r\n\t\titem = this._core.items(this._core.relative(item.index()));\r\n\r\n\t\tthis._core.reset(item.index());\r\n\r\n\t\tif (video.type === 'youtube') {\r\n\t\t\thtml = '';\r\n\t\t} else if (video.type === 'vimeo') {\r\n\t\t\thtml = '';\r\n\t\t} else if (video.type === 'vzaar') {\r\n\t\t\thtml = '';\r\n\t\t}\r\n\r\n\t\t$('
    ' + html + '
    ').insertAfter(item.find('.owl-video'));\r\n\r\n\t\tthis._playing = item.addClass('owl-video-playing');\r\n\t};\r\n\r\n\t/**\r\n\t * Checks whether an video is currently in full screen mode or not.\r\n\t * @todo Bad style because looks like a readonly method but changes members.\r\n\t * @protected\r\n\t * @returns {Boolean}\r\n\t */\r\n\tVideo.prototype.isInFullScreen = function() {\r\n\t\tvar element = document.fullscreenElement || document.mozFullScreenElement ||\r\n\t\t\t\tdocument.webkitFullscreenElement;\r\n\r\n\t\treturn element && $(element).parent().hasClass('owl-video-frame');\r\n\t};\r\n\r\n\t/**\r\n\t * Destroys the plugin.\r\n\t */\r\n\tVideo.prototype.destroy = function() {\r\n\t\tvar handler, property;\r\n\r\n\t\tthis._core.$element.off('click.owl.video');\r\n\r\n\t\tfor (handler in this._handlers) {\r\n\t\t\tthis._core.$element.off(handler, this._handlers[handler]);\r\n\t\t}\r\n\t\tfor (property in Object.getOwnPropertyNames(this)) {\r\n\t\t\ttypeof this[property] != 'function' && (this[property] = null);\r\n\t\t}\r\n\t};\r\n\r\n\t$.fn.owlCarousel.Constructor.Plugins.Video = Video;\r\n\r\n})(window.Zepto || window.jQuery, window, document);\r\n\r\n/**\r\n * Animate Plugin\r\n * @version 2.1.0\r\n * @author Bartosz Wojciechowski\r\n * @author David Deutsch\r\n * @license The MIT License (MIT)\r\n */\r\n;(function($, window, document, undefined) {\r\n\r\n\t/**\r\n\t * Creates the animate plugin.\r\n\t * @class The Navigation Plugin\r\n\t * @param {Owl} scope - The Owl Carousel\r\n\t */\r\n\tvar Animate = function(scope) {\r\n\t\tthis.core = scope;\r\n\t\tthis.core.options = $.extend({}, Animate.Defaults, this.core.options);\r\n\t\tthis.swapping = true;\r\n\t\tthis.previous = undefined;\r\n\t\tthis.next = undefined;\r\n\r\n\t\tthis.handlers = {\r\n\t\t\t'change.owl.carousel': $.proxy(function(e) {\r\n\t\t\t\tif (e.namespace && e.property.name == 'position') {\r\n\t\t\t\t\tthis.previous = this.core.current();\r\n\t\t\t\t\tthis.next = e.property.value;\r\n\t\t\t\t}\r\n\t\t\t}, this),\r\n\t\t\t'drag.owl.carousel dragged.owl.carousel translated.owl.carousel': $.proxy(function(e) {\r\n\t\t\t\tif (e.namespace) {\r\n\t\t\t\t\tthis.swapping = e.type == 'translated';\r\n\t\t\t\t}\r\n\t\t\t}, this),\r\n\t\t\t'translate.owl.carousel': $.proxy(function(e) {\r\n\t\t\t\tif (e.namespace && this.swapping && (this.core.options.animateOut || this.core.options.animateIn)) {\r\n\t\t\t\t\tthis.swap();\r\n\t\t\t\t}\r\n\t\t\t}, this)\r\n\t\t};\r\n\r\n\t\tthis.core.$element.on(this.handlers);\r\n\t};\r\n\r\n\t/**\r\n\t * Default options.\r\n\t * @public\r\n\t */\r\n\tAnimate.Defaults = {\r\n\t\tanimateOut: false,\r\n\t\tanimateIn: false\r\n\t};\r\n\r\n\t/**\r\n\t * Toggles the animation classes whenever an translations starts.\r\n\t * @protected\r\n\t * @returns {Boolean|undefined}\r\n\t */\r\n\tAnimate.prototype.swap = function() {\r\n\r\n\t\tif (this.core.settings.items !== 1) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (!$.support.animation || !$.support.transition) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis.core.speed(0);\r\n\r\n\t\tvar left,\r\n\t\t\tclear = $.proxy(this.clear, this),\r\n\t\t\tprevious = this.core.$stage.children().eq(this.previous),\r\n\t\t\tnext = this.core.$stage.children().eq(this.next),\r\n\t\t\tincoming = this.core.settings.animateIn,\r\n\t\t\toutgoing = this.core.settings.animateOut;\r\n\r\n\t\tif (this.core.current() === this.previous) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (outgoing) {\r\n\t\t\tleft = this.core.coordinates(this.previous) - this.core.coordinates(this.next);\r\n\t\t\tprevious.one($.support.animation.end, clear)\r\n\t\t\t\t.css( { 'left': left + 'px' } )\r\n\t\t\t\t.addClass('animated owl-animated-out')\r\n\t\t\t\t.addClass(outgoing);\r\n\t\t}\r\n\r\n\t\tif (incoming) {\r\n\t\t\tnext.one($.support.animation.end, clear)\r\n\t\t\t\t.addClass('animated owl-animated-in')\r\n\t\t\t\t.addClass(incoming);\r\n\t\t}\r\n\t};\r\n\r\n\tAnimate.prototype.clear = function(e) {\r\n\t\t$(e.target).css( { 'left': '' } )\r\n\t\t\t.removeClass('animated owl-animated-out owl-animated-in')\r\n\t\t\t.removeClass(this.core.settings.animateIn)\r\n\t\t\t.removeClass(this.core.settings.animateOut);\r\n\t\tthis.core.onTransitionEnd();\r\n\t};\r\n\r\n\t/**\r\n\t * Destroys the plugin.\r\n\t * @public\r\n\t */\r\n\tAnimate.prototype.destroy = function() {\r\n\t\tvar handler, property;\r\n\r\n\t\tfor (handler in this.handlers) {\r\n\t\t\tthis.core.$element.off(handler, this.handlers[handler]);\r\n\t\t}\r\n\t\tfor (property in Object.getOwnPropertyNames(this)) {\r\n\t\t\ttypeof this[property] != 'function' && (this[property] = null);\r\n\t\t}\r\n\t};\r\n\r\n\t$.fn.owlCarousel.Constructor.Plugins.Animate = Animate;\r\n\r\n})(window.Zepto || window.jQuery, window, document);\r\n\r\n/**\r\n * Autoplay Plugin\r\n * @version 2.1.0\r\n * @author Bartosz Wojciechowski\r\n * @author Artus Kolanowski\r\n * @author David Deutsch\r\n * @license The MIT License (MIT)\r\n */\r\n;(function($, window, document, undefined) {\r\n\r\n\t/**\r\n\t * Creates the autoplay plugin.\r\n\t * @class The Autoplay Plugin\r\n\t * @param {Owl} scope - The Owl Carousel\r\n\t */\r\n\tvar Autoplay = function(carousel) {\r\n\t\t/**\r\n\t\t * Reference to the core.\r\n\t\t * @protected\r\n\t\t * @type {Owl}\r\n\t\t */\r\n\t\tthis._core = carousel;\r\n\r\n\t\t/**\r\n\t\t * The autoplay timeout.\r\n\t\t * @type {Timeout}\r\n\t\t */\r\n\t\tthis._timeout = null;\r\n\r\n\t\t/**\r\n\t\t * Indicates whenever the autoplay is paused.\r\n\t\t * @type {Boolean}\r\n\t\t */\r\n\t\tthis._paused = false;\r\n\r\n\t\t/**\r\n\t\t * All event handlers.\r\n\t\t * @protected\r\n\t\t * @type {Object}\r\n\t\t */\r\n\t\tthis._handlers = {\r\n\t\t\t'changed.owl.carousel': $.proxy(function(e) {\r\n\t\t\t\tif (e.namespace && e.property.name === 'settings') {\r\n\t\t\t\t\tif (this._core.settings.autoplay) {\r\n\t\t\t\t\t\tthis.play();\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tthis.stop();\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if (e.namespace && e.property.name === 'position') {\r\n\t\t\t\t\t//console.log('play?', e);\r\n\t\t\t\t\tif (this._core.settings.autoplay) {\r\n\t\t\t\t\t\tthis._setAutoPlayInterval();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}, this),\r\n\t\t\t'initialized.owl.carousel': $.proxy(function(e) {\r\n\t\t\t\tif (e.namespace && this._core.settings.autoplay) {\r\n\t\t\t\t\tthis.play();\r\n\t\t\t\t}\r\n\t\t\t}, this),\r\n\t\t\t'play.owl.autoplay': $.proxy(function(e, t, s) {\r\n\t\t\t\tif (e.namespace) {\r\n\t\t\t\t\tthis.play(t, s);\r\n\t\t\t\t}\r\n\t\t\t}, this),\r\n\t\t\t'stop.owl.autoplay': $.proxy(function(e) {\r\n\t\t\t\tif (e.namespace) {\r\n\t\t\t\t\tthis.stop();\r\n\t\t\t\t}\r\n\t\t\t}, this),\r\n\t\t\t'mouseover.owl.autoplay': $.proxy(function() {\r\n\t\t\t\tif (this._core.settings.autoplayHoverPause && this._core.is('rotating')) {\r\n\t\t\t\t\tthis.pause();\r\n\t\t\t\t}\r\n\t\t\t}, this),\r\n\t\t\t'mouseleave.owl.autoplay': $.proxy(function() {\r\n\t\t\t\tif (this._core.settings.autoplayHoverPause && this._core.is('rotating')) {\r\n\t\t\t\t\tthis.play();\r\n\t\t\t\t}\r\n\t\t\t}, this),\r\n\t\t\t'touchstart.owl.core': $.proxy(function() {\r\n\t\t\t\tif (this._core.settings.autoplayHoverPause && this._core.is('rotating')) {\r\n\t\t\t\t\tthis.pause();\r\n\t\t\t\t}\r\n\t\t\t}, this),\r\n\t\t\t'touchend.owl.core': $.proxy(function() {\r\n\t\t\t\tif (this._core.settings.autoplayHoverPause) {\r\n\t\t\t\t\tthis.play();\r\n\t\t\t\t}\r\n\t\t\t}, this)\r\n\t\t};\r\n\r\n\t\t// register event handlers\r\n\t\tthis._core.$element.on(this._handlers);\r\n\r\n\t\t// set default options\r\n\t\tthis._core.options = $.extend({}, Autoplay.Defaults, this._core.options);\r\n\t};\r\n\r\n\t/**\r\n\t * Default options.\r\n\t * @public\r\n\t */\r\n\tAutoplay.Defaults = {\r\n\t\tautoplay: false,\r\n\t\tautoplayTimeout: 5000,\r\n\t\tautoplayHoverPause: false,\r\n\t\tautoplaySpeed: false\r\n\t};\r\n\r\n\t/**\r\n\t * Starts the autoplay.\r\n\t * @public\r\n\t * @param {Number} [timeout] - The interval before the next animation starts.\r\n\t * @param {Number} [speed] - The animation speed for the animations.\r\n\t */\r\n\tAutoplay.prototype.play = function(timeout, speed) {\r\n\t\tthis._paused = false;\r\n\r\n\t\tif (this._core.is('rotating')) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis._core.enter('rotating');\r\n\r\n\t\tthis._setAutoPlayInterval();\r\n\t};\r\n\r\n\t/**\r\n\t * Gets a new timeout\r\n\t * @private\r\n\t * @param {Number} [timeout] - The interval before the next animation starts.\r\n\t * @param {Number} [speed] - The animation speed for the animations.\r\n\t * @return {Timeout}\r\n\t */\r\n\tAutoplay.prototype._getNextTimeout = function(timeout, speed) {\r\n\t\tif ( this._timeout ) {\r\n\t\t\twindow.clearTimeout(this._timeout);\r\n\t\t}\r\n\t\treturn window.setTimeout($.proxy(function() {\r\n\t\t\tif (this._paused || this._core.is('busy') || this._core.is('interacting') || document.hidden) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tthis._core.next(speed || this._core.settings.autoplaySpeed);\r\n\t\t}, this), timeout || this._core.settings.autoplayTimeout);\r\n\t};\r\n\r\n\t/**\r\n\t * Sets autoplay in motion.\r\n\t * @private\r\n\t */\r\n\tAutoplay.prototype._setAutoPlayInterval = function() {\r\n\t\tthis._timeout = this._getNextTimeout();\r\n\t};\r\n\r\n\t/**\r\n\t * Stops the autoplay.\r\n\t * @public\r\n\t */\r\n\tAutoplay.prototype.stop = function() {\r\n\t\tif (!this._core.is('rotating')) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\twindow.clearTimeout(this._timeout);\r\n\t\tthis._core.leave('rotating');\r\n\t};\r\n\r\n\t/**\r\n\t * Stops the autoplay.\r\n\t * @public\r\n\t */\r\n\tAutoplay.prototype.pause = function() {\r\n\t\tif (!this._core.is('rotating')) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis._paused = true;\r\n\t};\r\n\r\n\t/**\r\n\t * Destroys the plugin.\r\n\t */\r\n\tAutoplay.prototype.destroy = function() {\r\n\t\tvar handler, property;\r\n\r\n\t\tthis.stop();\r\n\r\n\t\tfor (handler in this._handlers) {\r\n\t\t\tthis._core.$element.off(handler, this._handlers[handler]);\r\n\t\t}\r\n\t\tfor (property in Object.getOwnPropertyNames(this)) {\r\n\t\t\ttypeof this[property] != 'function' && (this[property] = null);\r\n\t\t}\r\n\t};\r\n\r\n\t$.fn.owlCarousel.Constructor.Plugins.autoplay = Autoplay;\r\n\r\n})(window.Zepto || window.jQuery, window, document);\r\n\r\n/**\r\n * Navigation Plugin\r\n * @version 2.1.0\r\n * @author Artus Kolanowski\r\n * @author David Deutsch\r\n * @license The MIT License (MIT)\r\n */\r\n;(function($, window, document, undefined) {\r\n\t'use strict';\r\n\r\n\t/**\r\n\t * Creates the navigation plugin.\r\n\t * @class The Navigation Plugin\r\n\t * @param {Owl} carousel - The Owl Carousel.\r\n\t */\r\n\tvar Navigation = function(carousel) {\r\n\t\t/**\r\n\t\t * Reference to the core.\r\n\t\t * @protected\r\n\t\t * @type {Owl}\r\n\t\t */\r\n\t\tthis._core = carousel;\r\n\r\n\t\t/**\r\n\t\t * Indicates whether the plugin is initialized or not.\r\n\t\t * @protected\r\n\t\t * @type {Boolean}\r\n\t\t */\r\n\t\tthis._initialized = false;\r\n\r\n\t\t/**\r\n\t\t * The current paging indexes.\r\n\t\t * @protected\r\n\t\t * @type {Array}\r\n\t\t */\r\n\t\tthis._pages = [];\r\n\r\n\t\t/**\r\n\t\t * All DOM elements of the user interface.\r\n\t\t * @protected\r\n\t\t * @type {Object}\r\n\t\t */\r\n\t\tthis._controls = {};\r\n\r\n\t\t/**\r\n\t\t * Markup for an indicator.\r\n\t\t * @protected\r\n\t\t * @type {Array.}\r\n\t\t */\r\n\t\tthis._templates = [];\r\n\r\n\t\t/**\r\n\t\t * The carousel element.\r\n\t\t * @type {jQuery}\r\n\t\t */\r\n\t\tthis.$element = this._core.$element;\r\n\r\n\t\t/**\r\n\t\t * Overridden methods of the carousel.\r\n\t\t * @protected\r\n\t\t * @type {Object}\r\n\t\t */\r\n\t\tthis._overrides = {\r\n\t\t\tnext: this._core.next,\r\n\t\t\tprev: this._core.prev,\r\n\t\t\tto: this._core.to\r\n\t\t};\r\n\r\n\t\t/**\r\n\t\t * All event handlers.\r\n\t\t * @protected\r\n\t\t * @type {Object}\r\n\t\t */\r\n\t\tthis._handlers = {\r\n\t\t\t'prepared.owl.carousel': $.proxy(function(e) {\r\n\t\t\t\tif (e.namespace && this._core.settings.dotsData) {\r\n\t\t\t\t\tthis._templates.push('
    ' +\r\n\t\t\t\t\t\t$(e.content).find('[data-dot]').addBack('[data-dot]').attr('data-dot') + '
    ');\r\n\t\t\t\t}\r\n\t\t\t}, this),\r\n\t\t\t'added.owl.carousel': $.proxy(function(e) {\r\n\t\t\t\tif (e.namespace && this._core.settings.dotsData) {\r\n\t\t\t\t\tthis._templates.splice(e.position, 0, this._templates.pop());\r\n\t\t\t\t}\r\n\t\t\t}, this),\r\n\t\t\t'remove.owl.carousel': $.proxy(function(e) {\r\n\t\t\t\tif (e.namespace && this._core.settings.dotsData) {\r\n\t\t\t\t\tthis._templates.splice(e.position, 1);\r\n\t\t\t\t}\r\n\t\t\t}, this),\r\n\t\t\t'changed.owl.carousel': $.proxy(function(e) {\r\n\t\t\t\tif (e.namespace && e.property.name == 'position') {\r\n\t\t\t\t\tthis.draw();\r\n\t\t\t\t}\r\n\t\t\t}, this),\r\n\t\t\t'initialized.owl.carousel': $.proxy(function(e) {\r\n\t\t\t\tif (e.namespace && !this._initialized) {\r\n\t\t\t\t\tthis._core.trigger('initialize', null, 'navigation');\r\n\t\t\t\t\tthis.initialize();\r\n\t\t\t\t\tthis.update();\r\n\t\t\t\t\tthis.draw();\r\n\t\t\t\t\tthis._initialized = true;\r\n\t\t\t\t\tthis._core.trigger('initialized', null, 'navigation');\r\n\t\t\t\t}\r\n\t\t\t}, this),\r\n\t\t\t'refreshed.owl.carousel': $.proxy(function(e) {\r\n\t\t\t\tif (e.namespace && this._initialized) {\r\n\t\t\t\t\tthis._core.trigger('refresh', null, 'navigation');\r\n\t\t\t\t\tthis.update();\r\n\t\t\t\t\tthis.draw();\r\n\t\t\t\t\tthis._core.trigger('refreshed', null, 'navigation');\r\n\t\t\t\t}\r\n\t\t\t}, this)\r\n\t\t};\r\n\r\n\t\t// set default options\r\n\t\tthis._core.options = $.extend({}, Navigation.Defaults, this._core.options);\r\n\r\n\t\t// register event handlers\r\n\t\tthis.$element.on(this._handlers);\r\n\t};\r\n\r\n\t/**\r\n\t * Default options.\r\n\t * @public\r\n\t * @todo Rename `slideBy` to `navBy`\r\n\t */\r\n\tNavigation.Defaults = {\r\n\t\tnav: false,\r\n\t\tnavText: [ 'prev', 'next' ],\r\n\t\tnavSpeed: false,\r\n\t\tnavElement: 'div',\r\n\t\tnavContainer: false,\r\n\t\tnavContainerClass: 'owl-nav',\r\n\t\tnavClass: [ 'owl-prev', 'owl-next' ],\r\n\t\tslideBy: 1,\r\n\t\tdotClass: 'owl-dot',\r\n\t\tdotsClass: 'owl-dots',\r\n\t\tdots: true,\r\n\t\tdotsEach: false,\r\n\t\tdotsData: false,\r\n\t\tdotsSpeed: false,\r\n\t\tdotsContainer: false\r\n\t};\r\n\r\n\t/**\r\n\t * Initializes the layout of the plugin and extends the carousel.\r\n\t * @protected\r\n\t */\r\n\tNavigation.prototype.initialize = function() {\r\n\t\tvar override,\r\n\t\t\tsettings = this._core.settings;\r\n\r\n\t\t// create DOM structure for relative navigation\r\n\t\tthis._controls.$relative = (settings.navContainer ? $(settings.navContainer)\r\n\t\t\t: $('
    ').addClass(settings.navContainerClass).appendTo(this.$element)).addClass('disabled');\r\n\r\n\t\tthis._controls.$previous = $('<' + settings.navElement + '>')\r\n\t\t\t.addClass(settings.navClass[0])\r\n\t\t\t.html(settings.navText[0])\r\n\t\t\t.prependTo(this._controls.$relative)\r\n\t\t\t.on('click', $.proxy(function(e) {\r\n\t\t\t\tthis.prev(settings.navSpeed);\r\n\t\t\t}, this));\r\n\t\tthis._controls.$next = $('<' + settings.navElement + '>')\r\n\t\t\t.addClass(settings.navClass[1])\r\n\t\t\t.html(settings.navText[1])\r\n\t\t\t.appendTo(this._controls.$relative)\r\n\t\t\t.on('click', $.proxy(function(e) {\r\n\t\t\t\tthis.next(settings.navSpeed);\r\n\t\t\t}, this));\r\n\r\n\t\t// create DOM structure for absolute navigation\r\n\t\tif (!settings.dotsData) {\r\n\t\t\tthis._templates = [ $('
    ')\r\n\t\t\t\t.addClass(settings.dotClass)\r\n\t\t\t\t.append($(''))\r\n\t\t\t\t.prop('outerHTML') ];\r\n\t\t}\r\n\r\n\t\tthis._controls.$absolute = (settings.dotsContainer ? $(settings.dotsContainer)\r\n\t\t\t: $('
    ').addClass(settings.dotsClass).appendTo(this.$element)).addClass('disabled');\r\n\r\n\t\tthis._controls.$absolute.on('click', 'div', $.proxy(function(e) {\r\n\t\t\tvar index = $(e.target).parent().is(this._controls.$absolute)\r\n\t\t\t\t? $(e.target).index() : $(e.target).parent().index();\r\n\r\n\t\t\te.preventDefault();\r\n\r\n\t\t\tthis.to(index, settings.dotsSpeed);\r\n\t\t}, this));\r\n\r\n\t\t// override public methods of the carousel\r\n\t\tfor (override in this._overrides) {\r\n\t\t\tthis._core[override] = $.proxy(this[override], this);\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * Destroys the plugin.\r\n\t * @protected\r\n\t */\r\n\tNavigation.prototype.destroy = function() {\r\n\t\tvar handler, control, property, override;\r\n\r\n\t\tfor (handler in this._handlers) {\r\n\t\t\tthis.$element.off(handler, this._handlers[handler]);\r\n\t\t}\r\n\t\tfor (control in this._controls) {\r\n\t\t\tthis._controls[control].remove();\r\n\t\t}\r\n\t\tfor (override in this.overides) {\r\n\t\t\tthis._core[override] = this._overrides[override];\r\n\t\t}\r\n\t\tfor (property in Object.getOwnPropertyNames(this)) {\r\n\t\t\ttypeof this[property] != 'function' && (this[property] = null);\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * Updates the internal state.\r\n\t * @protected\r\n\t */\r\n\tNavigation.prototype.update = function() {\r\n\t\tvar i, j, k,\r\n\t\t\tlower = this._core.clones().length / 2,\r\n\t\t\tupper = lower + this._core.items().length,\r\n\t\t\tmaximum = this._core.maximum(true),\r\n\t\t\tsettings = this._core.settings,\r\n\t\t\tsize = settings.center || settings.autoWidth || settings.dotsData\r\n\t\t\t\t? 1 : settings.dotsEach || settings.items;\r\n\r\n\t\tif (settings.slideBy !== 'page') {\r\n\t\t\tsettings.slideBy = Math.min(settings.slideBy, settings.items);\r\n\t\t}\r\n\r\n\t\tif (settings.dots || settings.slideBy == 'page') {\r\n\t\t\tthis._pages = [];\r\n\r\n\t\t\tfor (i = lower, j = 0, k = 0; i < upper; i++) {\r\n\t\t\t\tif (j >= size || j === 0) {\r\n\t\t\t\t\tthis._pages.push({\r\n\t\t\t\t\t\tstart: Math.min(maximum, i - lower),\r\n\t\t\t\t\t\tend: i - lower + size - 1\r\n\t\t\t\t\t});\r\n\t\t\t\t\tif (Math.min(maximum, i - lower) === maximum) {\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tj = 0, ++k;\r\n\t\t\t\t}\r\n\t\t\t\tj += this._core.mergers(this._core.relative(i));\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * Draws the user interface.\r\n\t * @todo The option `dotsData` wont work.\r\n\t * @protected\r\n\t */\r\n\tNavigation.prototype.draw = function() {\r\n\t\tvar difference,\r\n\t\t\tsettings = this._core.settings,\r\n\t\t\tdisabled = this._core.items().length <= settings.items,\r\n\t\t\tindex = this._core.relative(this._core.current()),\r\n\t\t\tloop = settings.loop || settings.rewind;\r\n\r\n\t\tthis._controls.$relative.toggleClass('disabled', !settings.nav || disabled);\r\n\r\n\t\tif (settings.nav) {\r\n\t\t\tthis._controls.$previous.toggleClass('disabled', !loop && index <= this._core.minimum(true));\r\n\t\t\tthis._controls.$next.toggleClass('disabled', !loop && index >= this._core.maximum(true));\r\n\t\t}\r\n\r\n\t\tthis._controls.$absolute.toggleClass('disabled', !settings.dots || disabled);\r\n\r\n\t\tif (settings.dots) {\r\n\t\t\tdifference = this._pages.length - this._controls.$absolute.children().length;\r\n\r\n\t\t\tif (settings.dotsData && difference !== 0) {\r\n\t\t\t\tthis._controls.$absolute.html(this._templates.join(''));\r\n\t\t\t} else if (difference > 0) {\r\n\t\t\t\tthis._controls.$absolute.append(new Array(difference + 1).join(this._templates[0]));\r\n\t\t\t} else if (difference < 0) {\r\n\t\t\t\tthis._controls.$absolute.children().slice(difference).remove();\r\n\t\t\t}\r\n\r\n\t\t\tthis._controls.$absolute.find('.active').removeClass('active');\r\n\t\t\tthis._controls.$absolute.children().eq($.inArray(this.current(), this._pages)).addClass('active');\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * Extends event data.\r\n\t * @protected\r\n\t * @param {Event} event - The event object which gets thrown.\r\n\t */\r\n\tNavigation.prototype.onTrigger = function(event) {\r\n\t\tvar settings = this._core.settings;\r\n\r\n\t\tevent.page = {\r\n\t\t\tindex: $.inArray(this.current(), this._pages),\r\n\t\t\tcount: this._pages.length,\r\n\t\t\tsize: settings && (settings.center || settings.autoWidth || settings.dotsData\r\n\t\t\t\t? 1 : settings.dotsEach || settings.items)\r\n\t\t};\r\n\t};\r\n\r\n\t/**\r\n\t * Gets the current page position of the carousel.\r\n\t * @protected\r\n\t * @returns {Number}\r\n\t */\r\n\tNavigation.prototype.current = function() {\r\n\t\tvar current = this._core.relative(this._core.current());\r\n\t\treturn $.grep(this._pages, $.proxy(function(page, index) {\r\n\t\t\treturn page.start <= current && page.end >= current;\r\n\t\t}, this)).pop();\r\n\t};\r\n\r\n\t/**\r\n\t * Gets the current succesor/predecessor position.\r\n\t * @protected\r\n\t * @returns {Number}\r\n\t */\r\n\tNavigation.prototype.getPosition = function(successor) {\r\n\t\tvar position, length,\r\n\t\t\tsettings = this._core.settings;\r\n\r\n\t\tif (settings.slideBy == 'page') {\r\n\t\t\tposition = $.inArray(this.current(), this._pages);\r\n\t\t\tlength = this._pages.length;\r\n\t\t\tsuccessor ? ++position : --position;\r\n\t\t\tposition = this._pages[((position % length) + length) % length].start;\r\n\t\t} else {\r\n\t\t\tposition = this._core.relative(this._core.current());\r\n\t\t\tlength = this._core.items().length;\r\n\t\t\tsuccessor ? position += settings.slideBy : position -= settings.slideBy;\r\n\t\t}\r\n\r\n\t\treturn position;\r\n\t};\r\n\r\n\t/**\r\n\t * Slides to the next item or page.\r\n\t * @public\r\n\t * @param {Number} [speed=false] - The time in milliseconds for the transition.\r\n\t */\r\n\tNavigation.prototype.next = function(speed) {\r\n\t\t$.proxy(this._overrides.to, this._core)(this.getPosition(true), speed);\r\n\t};\r\n\r\n\t/**\r\n\t * Slides to the previous item or page.\r\n\t * @public\r\n\t * @param {Number} [speed=false] - The time in milliseconds for the transition.\r\n\t */\r\n\tNavigation.prototype.prev = function(speed) {\r\n\t\t$.proxy(this._overrides.to, this._core)(this.getPosition(false), speed);\r\n\t};\r\n\r\n\t/**\r\n\t * Slides to the specified item or page.\r\n\t * @public\r\n\t * @param {Number} position - The position of the item or page.\r\n\t * @param {Number} [speed] - The time in milliseconds for the transition.\r\n\t * @param {Boolean} [standard=false] - Whether to use the standard behaviour or not.\r\n\t */\r\n\tNavigation.prototype.to = function(position, speed, standard) {\r\n\t\tvar length;\r\n\r\n\t\tif (!standard && this._pages.length) {\r\n\t\t\tlength = this._pages.length;\r\n\t\t\t$.proxy(this._overrides.to, this._core)(this._pages[((position % length) + length) % length].start, speed);\r\n\t\t} else {\r\n\t\t\t$.proxy(this._overrides.to, this._core)(position, speed);\r\n\t\t}\r\n\t};\r\n\r\n\t$.fn.owlCarousel.Constructor.Plugins.Navigation = Navigation;\r\n\r\n})(window.Zepto || window.jQuery, window, document);\r\n\r\n/**\r\n * Hash Plugin\r\n * @version 2.1.0\r\n * @author Artus Kolanowski\r\n * @author David Deutsch\r\n * @license The MIT License (MIT)\r\n */\r\n;(function($, window, document, undefined) {\r\n\t'use strict';\r\n\r\n\t/**\r\n\t * Creates the hash plugin.\r\n\t * @class The Hash Plugin\r\n\t * @param {Owl} carousel - The Owl Carousel\r\n\t */\r\n\tvar Hash = function(carousel) {\r\n\t\t/**\r\n\t\t * Reference to the core.\r\n\t\t * @protected\r\n\t\t * @type {Owl}\r\n\t\t */\r\n\t\tthis._core = carousel;\r\n\r\n\t\t/**\r\n\t\t * Hash index for the items.\r\n\t\t * @protected\r\n\t\t * @type {Object}\r\n\t\t */\r\n\t\tthis._hashes = {};\r\n\r\n\t\t/**\r\n\t\t * The carousel element.\r\n\t\t * @type {jQuery}\r\n\t\t */\r\n\t\tthis.$element = this._core.$element;\r\n\r\n\t\t/**\r\n\t\t * All event handlers.\r\n\t\t * @protected\r\n\t\t * @type {Object}\r\n\t\t */\r\n\t\tthis._handlers = {\r\n\t\t\t'initialized.owl.carousel': $.proxy(function(e) {\r\n\t\t\t\tif (e.namespace && this._core.settings.startPosition === 'URLHash') {\r\n\t\t\t\t\t$(window).trigger('hashchange.owl.navigation');\r\n\t\t\t\t}\r\n\t\t\t}, this),\r\n\t\t\t'prepared.owl.carousel': $.proxy(function(e) {\r\n\t\t\t\tif (e.namespace) {\r\n\t\t\t\t\tvar hash = $(e.content).find('[data-hash]').addBack('[data-hash]').attr('data-hash');\r\n\r\n\t\t\t\t\tif (!hash) {\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tthis._hashes[hash] = e.content;\r\n\t\t\t\t}\r\n\t\t\t}, this),\r\n\t\t\t'changed.owl.carousel': $.proxy(function(e) {\r\n\t\t\t\tif (e.namespace && e.property.name === 'position') {\r\n\t\t\t\t\tvar current = this._core.items(this._core.relative(this._core.current())),\r\n\t\t\t\t\t\thash = $.map(this._hashes, function(item, hash) {\r\n\t\t\t\t\t\t\treturn item === current ? hash : null;\r\n\t\t\t\t\t\t}).join();\r\n\r\n\t\t\t\t\tif (!hash || window.location.hash.slice(1) === hash) {\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\twindow.location.hash = hash;\r\n\t\t\t\t}\r\n\t\t\t}, this)\r\n\t\t};\r\n\r\n\t\t// set default options\r\n\t\tthis._core.options = $.extend({}, Hash.Defaults, this._core.options);\r\n\r\n\t\t// register the event handlers\r\n\t\tthis.$element.on(this._handlers);\r\n\r\n\t\t// register event listener for hash navigation\r\n\t\t$(window).on('hashchange.owl.navigation', $.proxy(function(e) {\r\n\t\t\tvar hash = window.location.hash.substring(1),\r\n\t\t\t\titems = this._core.$stage.children(),\r\n\t\t\t\tposition = this._hashes[hash] && items.index(this._hashes[hash]);\r\n\r\n\t\t\tif (position === undefined || position === this._core.current()) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tthis._core.to(this._core.relative(position), false, true);\r\n\t\t}, this));\r\n\t};\r\n\r\n\t/**\r\n\t * Default options.\r\n\t * @public\r\n\t */\r\n\tHash.Defaults = {\r\n\t\tURLhashListener: false\r\n\t};\r\n\r\n\t/**\r\n\t * Destroys the plugin.\r\n\t * @public\r\n\t */\r\n\tHash.prototype.destroy = function() {\r\n\t\tvar handler, property;\r\n\r\n\t\t$(window).off('hashchange.owl.navigation');\r\n\r\n\t\tfor (handler in this._handlers) {\r\n\t\t\tthis._core.$element.off(handler, this._handlers[handler]);\r\n\t\t}\r\n\t\tfor (property in Object.getOwnPropertyNames(this)) {\r\n\t\t\ttypeof this[property] != 'function' && (this[property] = null);\r\n\t\t}\r\n\t};\r\n\r\n\t$.fn.owlCarousel.Constructor.Plugins.Hash = Hash;\r\n\r\n})(window.Zepto || window.jQuery, window, document);\r\n\r\n/**\r\n * Support Plugin\r\n *\r\n * @version 2.1.0\r\n * @author Vivid Planet Software GmbH\r\n * @author Artus Kolanowski\r\n * @author David Deutsch\r\n * @license The MIT License (MIT)\r\n */\r\n;(function($, window, document, undefined) {\r\n\r\n\tvar style = $('').get(0).style,\r\n\t\tprefixes = 'Webkit Moz O ms'.split(' '),\r\n\t\tevents = {\r\n\t\t\ttransition: {\r\n\t\t\t\tend: {\r\n\t\t\t\t\tWebkitTransition: 'webkitTransitionEnd',\r\n\t\t\t\t\tMozTransition: 'transitionend',\r\n\t\t\t\t\tOTransition: 'oTransitionEnd',\r\n\t\t\t\t\ttransition: 'transitionend'\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tanimation: {\r\n\t\t\t\tend: {\r\n\t\t\t\t\tWebkitAnimation: 'webkitAnimationEnd',\r\n\t\t\t\t\tMozAnimation: 'animationend',\r\n\t\t\t\t\tOAnimation: 'oAnimationEnd',\r\n\t\t\t\t\tanimation: 'animationend'\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t\ttests = {\r\n\t\t\tcsstransforms: function() {\r\n\t\t\t\treturn !!test('transform');\r\n\t\t\t},\r\n\t\t\tcsstransforms3d: function() {\r\n\t\t\t\treturn !!test('perspective');\r\n\t\t\t},\r\n\t\t\tcsstransitions: function() {\r\n\t\t\t\treturn !!test('transition');\r\n\t\t\t},\r\n\t\t\tcssanimations: function() {\r\n\t\t\t\treturn !!test('animation');\r\n\t\t\t}\r\n\t\t};\r\n\r\n\tfunction test(property, prefixed) {\r\n\t\tvar result = false,\r\n\t\t\tupper = property.charAt(0).toUpperCase() + property.slice(1);\r\n\r\n\t\t$.each((property + ' ' + prefixes.join(upper + ' ') + upper).split(' '), function(i, property) {\r\n\t\t\tif (style[property] !== undefined) {\r\n\t\t\t\tresult = prefixed ? property : true;\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn result;\r\n\t}\r\n\r\n\tfunction prefixed(property) {\r\n\t\treturn test(property, true);\r\n\t}\r\n\r\n\tif (tests.csstransitions()) {\r\n\t\t/* jshint -W053 */\r\n\t\t$.support.transition = new String(prefixed('transition'))\r\n\t\t$.support.transition.end = events.transition.end[ $.support.transition ];\r\n\t}\r\n\r\n\tif (tests.cssanimations()) {\r\n\t\t/* jshint -W053 */\r\n\t\t$.support.animation = new String(prefixed('animation'))\r\n\t\t$.support.animation.end = events.animation.end[ $.support.animation ];\r\n\t}\r\n\r\n\tif (tests.csstransforms()) {\r\n\t\t/* jshint -W053 */\r\n\t\t$.support.transform = new String(prefixed('transform'));\r\n\t\t$.support.transform3d = tests.csstransforms3d();\r\n\t}\r\n\r\n})(window.Zepto || window.jQuery, window, document);\r\n","\t/* requires js/5.0/video/common/fw_mappings.js */\n\tvar cnnBVPAdSections = {\n\t//sections\n\t\"news\"\t\t\t\t\t: \"cnnmoney.com_businessnews_archive\",\n\t\"economy\"\t\t\t\t: \"cnnmoney.com_businessnews_jobsandeconomy_archive\",\n\t\"business\"\t\t\t\t: \"cnnmoney.com_businessnews_archive\",\n\t\"business2\"\t\t\t\t: \"cnnmoney.com_businessnews_archive\",\n\t\"markets\"\t\t\t\t: \"cnnmoney.com_marketsandstocks_archive\",\n\t\"media\"\t\t\t\t : \"cnnmoney.com_media_archive\",\n\t\"luxury\"\t\t\t\t: \"cnnmoney.com_luxury_archive\",\n\t\"pf\"\t\t\t\t\t: \"cnnmoney.com_personalfinance_archive\",\n\t\"moneymag\"\t\t\t\t: \"cnnmoney.com_personalfinance_archive\",\n\t\"fsb\"\t\t\t\t\t: \"cnnmoney.com_smallbusiness_archive\",\n\t\"smallbusiness\"\t\t\t: \"cnnmoney.com_smallbusiness_archive\",\n\t\"technology\"\t\t\t: \"cnnmoney.com_technology_archive\",\n\n\t//fortune sections and Fortune\n\t\"fortune_news\"\t\t\t: \"fortune.com_businessnews_archive\",\n\t\"fortune_business\"\t\t: \"fortune.com_businessnews_archive\",\n\t\"fortune_markets\"\t\t: \"fortune.com_marketsandstocks_archive\",\n\t\"fortune_pf\"\t\t\t: \"fortune.com_personalfinance_archive\",\n\t\"fortune_smallbusiness\"\t: \"fortune.com_smallbusiness_archive\",\n\t\"fortune_technology\"\t: \"fortune.com_technology_archive\",\n\t\"fortune_fortune\"\t\t: \"fortune.com_technology_archive\",\n\n\n\t//branding\n\t\"2020_visionaries\"\t\t: \"cnnmoney.com_technology_2020visionaries_archive\",\n\t\"before_the_bell\"\t\t: \"cnnmoney.com_marketsandstocks_beforethebell_archive\",\n \"battleground_states\"\t: \"cnnmoney.com_economy_battlegroundstates_archive\",\t\n\t\"btw\"\t\t\t\t\t: \"cnnmoney.com_businessnews_btw_archive\",\n\t\"b.t.w.\"\t\t\t\t: \"cnnmoney.com_businessnews_btw_archive\",\n\t\"businessoftheolympics\" : \"cnnmoney.com_businessnews_olympics2016_businessoftheolympics_archive\",\n\t\"cnnmoneyreports\"\t\t: \"cnnmoney.com_businessnews_cnnmoneyreports_archive\",\n\t\"facetoface\"\t\t\t: \"cnnmoney.com_business_news_face_to_face_archive\",\n\t\"fear_and_greed\"\t : \"cnnmoney.com_investing_fearandgreed_archive\",\n\t\"future_of_tech\"\t\t: \"cnnmoney.com_technology_futureoftech_archive\",\n\t\"strategysessions\"\t\t: \"cnnmoney.com_businessnews_strategysessions_archive\",\n\t\"morningbuzz\"\t\t\t: \"cnnmoney.com_investing_thebuzz_archive\",\n\t\"corneroffice\"\t\t\t: \"cnnmoney.com_businessnews_clevel_corneroffice_archive\",\n\t\"detroit\"\t\t\t\t: \"cnnmoney.com_businessnews_jobsandeconomy_detroitproject_archive\",\n\t\"midtermelections2010\"\t: \"cnnmoney.com_businessnews_jobsandeconomy_election_archive\",\n\t\"gas\"\t\t\t\t\t: \"cnnmoney.com_businessnews_jobsandeconomy_energy_archive\",\n\t\"cnnmoneynow\"\t\t\t: \"cnnmoney.com_marketsandstocks_cnnmoneynow_archive\",\n\t\"moneytips\"\t\t\t\t: \"cnnmoney.com_personalfinance_moneytips_archive\",\n\t\"asktheexpert\"\t\t\t: \"cnnmoney.com_retirement_asktheexpert_archive\",\n\t\"revell\"\t\t\t\t: \"cnnmoney.com_retirement_rulesofretirement_archive\",\n\t\"innovationnation\"\t\t: \"cnnmoney.com_technology_innovationnation_archive\",\n\t\"smallglobal\"\t\t\t: \"cnnmoney.com_smallbusiness_smallandglobal_archive\",\n\t\"smallbiztips\"\t\t\t: \"cnnmoney.com_smallbusiness_smallbiztips_archive\",\n\t\"fsbmakeover\"\t\t\t: \"cnnmoney.com_smallbusiness_smallbusinessmakeover_archive\",\n\t\"resourceguide\"\t\t\t: \"cnnmoney.com_smallbusiness_smallbiztips_archive\",\n\t\"stateofsmallbiz\"\t\t: \"cnnmoney.com_small_business_state_of_small_business_archive\",\n\t\"where-are-they-now\"\t: \"cnnmoney.com_small_business_where_are_they_now_archive\",\n\t\"techtalk\"\t\t\t\t: \"cnnmoney.com_technology_techtalk_archive\",\n\t\"toptips\"\t\t\t\t: \"cnnmoney.com_personalfinance_fivetips_archive\",\n\t\"consciouscapitalism\"\t: \"cnnmoney.com_businessnews_clevel_consciouscapitalism_archive\",\n\t\"visionaries\"\t\t\t: \"cnnmoney.com_businessnews_visionaries_archive\",\n\t\"investing_guide\"\t\t: \"cnnmoney.com_investing_investingguide_archive\",\n\t\"agility_in_action\" : \"cnnmoney.com_technology_agilityinaction_archive\",\n\t\"alternative_investing\" : \"cnnmoney.com_investing_alternativeinvesting_archive\",\n\t\"american_dream\" : \"cnnmoney.com_businessnews_americandream_archive\",\n\t\"americas_choice_2016\" : \"cnnmoney.com_businessnews_americaschoice2016_archive\",\n\t\"americas_debt\" : \"cnnmoney.com_businessnews_americasdebt_archive\",\n\t\"bestadvice\"\t\t\t: \"fortune.com_businessnews_bestadvice_archive\",\n\t\"best_in_tech\" : \"cnnmoney.com_technology_bestintech_archive\",\n\t\"bestplacelive_2013\"\t: \"cnnmoney.com_personalfinance_bestplacestolive_archive\",\n\t\"bestplacelive_2012\"\t: \"cnnmoney.com_personalfinance_bestplacestolive_archive\",\n\t\"bestplacelive_2010\"\t: \"cnnmoney.com_personalfinance_bestplacestolive_archive\",\n\t\"bestplacelive_2009\"\t: \"cnnmoney.com_personalfinance_bestplacestolive_archive\",\n\t\"bestplacelive_2008\"\t: \"cnnmoney.com_personalfinance_bestplacestolive_archive\",\n\t\"bestplacelive_2007\"\t: \"cnnmoney.com_personalfinance_bestplacestolive_archive\",\n\t\"breaking_the_mold\" : \"cnnmoney.com_smallbusiness_breakingthemold_archive\",\n\t\"buffett_live\"\t\t\t: \"cnnmoney.com_investing_buffett_live_archive\",\n\t\"cnnmoney_investigates_con_woman\" : \"cnnmoney.com_businessnews_cnnmoneyinvestigatesconwoman_archive\",\n\t\"thebuzz\"\t\t\t\t: \"cnnmoney.com_investing_thebuzz_archive\",\n\t\"traders\" : \"cnnmoney.com_business_traders_archive\",\n\t\"holidaymoney2009\"\t\t: \"cnnmoney.com_personalfinance_holidaymoney_archive\",\n\t\"holidaymoney2010\"\t\t: \"cnnmoney.com_personalfinance_holidaymoney_archive\",\n \"holiday_shopping_2016\" : \"cnnmoney.com_personalfinance_holidayshopping2016_archive\",\n\t\"road-to-wealth\"\t\t: \"cnnmoney.com_personal_finance_road_to_wealth_archive\",\n\t\"bing\"\t\t\t\t\t: \"fortune.com_businessnews_stanleybing_archive\",\n\t\"csuite\"\t\t\t\t: \"fortune.com_clevel_csuitestrategies_archive\",\n\t\"csuiteunpackaged\"\t\t: \"fortune.com_clevel_csuitestrategies_archive\",\n\t\"cyber_safe\" : \"cnnmoney.com_technology_cybersafe_archive\",\n\t\"40under40_2010\"\t\t: \"fortune.com_clevel_peopleyoushouldknow_archive\",\n\t\"40under40_2011\"\t\t: \"fortune.com_business_news_clevel_40_under_40_archive\",\n\t\"40under40_2012\"\t\t: \"fortune.com_business_news_clevel_40_under_40_archive\",\n\t\"mostpowerfulwomen2013\"\t: \"fortune.com_clevel_50mostpowerfulwomen_archive\",\n\t\"election_2016\" : \"cnnmoney.com_economy_election2016_archive\",\n\t\"g20\" : \"cnnmoney.com_business_g20_archive\",\n\t\"gentlemans_guide\" : \"cnnmoney.com_luxury_gentlemansguide_archive\",\n\t\"global_real_estate\"\t: \"cnnmoney.com_realestate_globalrealestate_archive\",\n\t\"globalforum\"\t\t\t: \"fortune.com_worldbiz_globalforum_archive\",\n\t\"global500_2013\"\t\t: \"fortune.com_lists_global500_archive\",\n\t\"going_global\" : \"cnnmoney.com_business_goingglobal_archive\",\n\t\"growing_in_india\"\t : \"cnnmoney.com_business_growinginindia_archive\",\n\t\"streetlife\"\t\t\t: \"fortune.com_marketsandstocks_streetlife_archive\",\n \"europe_2020\" : \"cnnmoney.com_business_europe2020_archive\",\n \"india_2020\" : \"cnnmoney.com_business_india2020_archive\",\n \"india_20_under_40\" : \"cnnmoney.com_business_india20under40_archive\",\n\t\"innovate_tech\" : \"cnnmoney.com_technology_innovate_archive\",\n\t\"innovative_cities\" : \"cnnmoney.com_technology_innovativecities_archive\",\n\t\"innovators\" : \"cnnmoney.com_businessnews_innovators_archive\",\n\t\"internet_of_things\" : \"cnnmoney.com_technology_internetofthing_archive\",\n\t\"investorsguide2010\"\t: \"fortune.com_personalfinance_ultimateinvestmentguide_archive\",\n\t\"investorsguide2011\"\t: \"fortune.com_personalfinance_ultimateinvestmentguide_archive\",\n\t\"money-sense\"\t\t\t: \"fortune.com_personal_finance_money_sense_archive\",\n\t\"brainstormtech\"\t\t: \"fortune.com_technology_brainstorm_archive\",\n\t\"disruptors\"\t\t\t: \"fortune.com_technology_disruptors_archive\",\n\t\"techmate\"\t\t\t\t: \"fortune.com_technology_techmate_archive\",\n\t\"techtransformation\"\t: \"fortune.com_technology_techtransformation_archive\",\n\t\"the_business_view\" : \"cnnmoney.com_business_thebusinessview_archive\",\n\t\"the_collector\" : \"cnnmoney.com_luxury_thecollector_archive\",\n\t\"bestcos2012\"\t\t\t: \"fortune.com_lists_100bestcompaniestoworkfor_archive\",\n\t\"picture_this\" : \"cnnmoney.com_businessnews_picturethis_archive\",\n\t\"power\"\t\t : \"cnnmoney.com_ businessnews_power_archive\",\n\t\"powering_your_world\" : \"cnnmoney.com_technology_poweringyourworld_archive\",\n\t\"powerwomen2012\"\t\t: \"fortune.com_clevel_50mostpowerfulwomen_archive\",\n\t\"bestcos2011\"\t\t\t: \"fortune.com_lists_100bestcompaniestoworkfor_archive\",\n\t\"millennials_and_their_money\" : \"cnnmoney.com_personalfinance_millennialsandtheirmoney_archive\",\n\t\"mostadmired2013\"\t\t: \"fortune.com_lists_mostadmiredcompanies_archive\",\n\t\"mostadmired2014\"\t\t: \"fortune.com_lists_mostadmiredcompanies_archive\",\n\t\"most_innovative_cities\": \"cnnmoney.com_technology_mostinnovativecities_archive\",\n\t\"davos\"\t\t\t\t\t: \"cnnmoney.com_businessnews_worldbiz_davos_archive\",\n\t\"executivedreamteam\"\t: \"fortune.com_clevel_executivedreamteam_archive\",\n\t\"empire\"\t : \"cnnmoney.com_site_small_business_empire_archive\",\n\t\"evolution\" : \"cnnmoney.com_technology_evolution_archive\",\n\t\"appnation\"\t\t\t\t: \"cnnmoney.com_technology_app_nation_archive\",\n\t\"gadget\" : \"cnnmoney.com_technology_gadget_archive\",\n\t\"gamechangers\"\t\t\t: \"cnnmoney.com_businessnews_game_changers_archive\",\n\t\"fastestgrowingcos2012\"\t: \"fortune.com_lists_fastestgrowingcompanies_archive\",\n\t\"fastestgrowingcos2013\"\t: \"fortune.com_lists_fastestgrowingcompanies_archive\",\n\t\"fed_focus\" : \"cnnmoney.com_investing_fed_focus_archive\",\n\t\"wheels\"\t\t\t\t: \"cnnmoney.com_personalfinance_auto_wheels_archive\",\n\t\"women_entrepreneurs\" : \"CNNMoney.com_Site_Small_Business_Women_Entrepreneurs_Archive_Instream\",\n\t\"verne_harnish\"\t\t\t: \"cnnmoney.com_small_business_verne_harnish_archive\",\n\t\"sept11_2011\"\t\t\t: \"fortune.com_personalfinance_ground_zero_archive\",\n\t\"trailblazers\"\t\t\t: \"cnnmoney.com_small_business_innovation_trailblazers_archive\",\n\t\"away\"\t\t\t : \"cnnmoney.com_personalfinance_away_archive\",\n\t\"drive\"\t\t\t : \"cnnmoney.com_luxury_drive_archive\",\n\t\"million-dollar-homes\" : \"cnnmoney.com_luxury_milliondollarhomes_archive\",\n \"tech_reports\"\t\t\t: \"cnnmoney.com_technology_techreports_archive\",\n\t\"the-big-spend\"\t\t\t: \"cnnmoney.com_luxury_thebigspend_archive\",\n \"the_inside_story\"\t\t: \"cnnmoney.com_technology_theinsidestory_archive\",\n\t\"the_open\" \t\t : \"cnnmoney.com_investing_openingbell_archive\",\n\t\"reliablesources\"\t : \"cnnmoney.com_media_reliablesources_archive\",\n\t\"made_in_poland\" : \"cnnmoney.com_business_madeinpoland_archive\",\n \"made_in_safrica\" : \"cnnmoney.com_business_madeinsafrica_archive\",\n \"made_in_thailand\" : \"cnnmoney.com_markets_madeinthailand_archive\",\n\t\"market_movers\" : \"cnnmoney.com_investing_marketmovers_archive\",\n\t\"market_movers_and_shakers\" :\"cnnmoney.com_investing_marketmoversandshakers_archive\",\n \"marketplace_middle_east\" :\"cnnmoney.com_markets_marketplacemiddleeast_archive\",\n\t\"money_moves\"\t : \"cnnmoney.com_personalfinance_moneymoves_archive\",\n\t\"your-money\"\t : \"cnnmoney.com_personalfinance_yourmoney_archive\",\n\t\"future-of-love\"\t : \"cnnmoney.com_technology_futureoflove_archive\",\n\t\"big-money\"\t : \"cnnmoney.com_luxury_rare_archive\",\n\t\"new_delhi_pollution\" : \"cnnmoney.com_businessnews_newdelhipollution_archive\",\n\t\"new_investor\" : \"cnnmoney.com_investing_newinvestor_archive\",\n\t\"new_rules_for_retirement\" : \"cnnmoney.com_personalfinance_newrulesforretirement_archive\",\n\t\"nigeria_economy\" : \"cnnmoney.com_economy_nigeriaeconomy_archive\",\n\t\"24-hours-with\" \t\t: \"cnnmoney.com_personalfinance_24hourswith_archive\",\n\t\"billion-dollar-ideas\"\t:\"cnnmoney.com_businessnews_billiondollarideas_archive\",\n\t\"family\" :\"cnnmoney.com_personalfinance_family_archive\",\n\t\"family-money\"\t\t\t:\"cnnmoney.com_luxury_familymoney_archive\",\n\t\"why-costs\" \t\t :\"cnnmoney.com_luxury_whythiscoststhat_archive\",\n\t\"opening-bell\" \t\t :\"cnnmoney.com_investing_openingbell_archive\",\n\t\"aloft\" \t\t :\"cnnmoney.com_luxury_aloft_archive\",\n\t\"hottest-investments-world\" :\"cnnmoney.com_investing_hottestinvestmentsworld_archive\",\n\t\"the_connectors\" \t\t:\"cnnmoney.com_business_theconnectors_archive\",\n\t\"the-real-economy\" \t\t:\"cnnmoney.com_economy_therealeconomy_archive\",\n\t\"cloud-computing\"\t\t:\"cnnmoney.com_technology_cloudcomputing_archive\",\n\t\"business-ofbeing\"\t\t:\"cnnmoney.com_businessnews_businessofbeing_archive\",\n\t\"holiday_shopping\" :\"cnnmoney.com_personalfinance_holidayshopping_archive\",\n\t\"homes\" :\"cnnmoney.com_personalfinance_homes_archive\",\n\t\"passion_to_portfolio\" :\"cnnmoney.com_business_passiontoportfolio_archive\",\n\t\"planning-next\" :\"cnnmoney.com_personalfinance_planningnext_archive\",\n\t\"quest_means_business\" :\"cnnmoney.com_business_questmeansbusiness_archive\",\n\t\"runway_slaves\" :\"cnnmoney.com_businessnews_runwayslaves_archive\",\n \"dream-retirement\" :\"cnnmoney.com_personalfinance_dreamretirement_archive\",\n \"savings_challenge\" :\"cnnmoney.com_personalfinance_savingschallenge_archive\",\n \"science-of-work\" :\"cnnmoney.com_smallbusiness_scienceofwork_archive\",\n \"on_abu_dhabi\" :\"cnnmoney.com_markets_onabudhabi_archive\",\n \"stockswatch\"\t\t\t:\"cnnmoney.com_site_investing_stockswatch_archive\",\n \"voyage\"\t\t\t\t:\"cnnmoney.com_luxury_voyage_archive\",\n \"smart-spending\" :\"cnnmoney.com_personalfinance_smartspending_archive\",\n \"startups\" :\"cnnmoney.com_smallbusiness_startups_archive\",\n \"superhero_hackers\" :\"cnnmoney.com_technology_superherohackers_archive\",\n \"surge\" :\"cnnmoney.com_surge_archive\",\n \"retire_your_way\" :\"cnnmoney.com_personalfinance_retireyourway_archive\",\n \"restart\" :\"cnnmoney.com_smallbusiness_restart_archive\",\n \"producing_the_goods\" :\"cnnmoney.com_technology_producingthegoods_archive\",\n \"working_life\" :\"cnnmoney.com_ businessnews_workinglife_archive\",\n \"work_transformed\" :\"cnnmoney.com_technology_worktransformed_archive\",\n \"world_business_today\" :\"cnnmoney.com_business_worldbusinesstoday_archive\",\n \"unhackable\" :\"cnnmoney.com_technology_unhackable_archive\",\n \"unicorns\" :\"cnnmoney.com_business_unicorns_archive\",\n \"upstarts\" :\"cnnmoney.com_technology_upstarts_archive\",\n \"upstarts30\" \t\t\t:\"cnnmoney.com_technology_upstarts30_archive\"\n \n};\n\nvar cnnStoryAdSections =\n{\n\t//story sections\n//\t\"news/companies\" \t\t: \"cnnmoney.com_companies_t1\",\n\n\t\"markets\"\t\t\t\t: \"cnnmoney.com_marketsandstocks_t1\",\n\t\"news/economy\"\t\t\t: \"cnnmoney.com_businessnews_jobsandeconomy_t1\",\n\t\"news\"\t\t\t\t\t: \"cnnmoney.com_businessnews_t1\",\n\t\"pf\"\t\t\t\t\t: \"cnnmoney.com_personalfinance_t1\",\n\t\"real_estate\"\t\t\t: \"cnnmoney.com_realestate_t1\",\n\t\"retirement\"\t\t\t: \"cnnmoney.com_retirement_t1\",\n\t\"smallbusiness\"\t\t\t: \"cnnmoney.com_smallbusiness_t1\",\n\t\"technology\"\t\t\t: \"cnnmoney.com_technology_t1\",\n\n\t//fortune sourced story sections\n\t\"fortune_news\"\t\t\t: \"fortune.com_businessnews_t1\",\n\t\"fortune_pf\"\t\t\t: \"fortune.com_personalfinance_t1\",\n\t\"fortune_smallbusiness\"\t: \"fortune.com_smallbusiness_t1\",\n\t\"fortune_technology\"\t: \"fortune.com_technology_t1\",\n\t\"fortune_lifestyle\"\t\t: \"fortune.com_lifestyle_t1\",\n\n\t//branding default for blog stories\n\t\"blog_features\"\t\t\t : \"fortune.com_businessnews_t1\",\n\t\"blog_postcards\"\t\t : \"fortune.com_businessnews_t1\",\n\t\"blog_tech\"\t\t\t\t : \"fortune.com_technology_t1\",\n\t\"blog_finance\"\t\t\t : \"cnnmoney.com_investing_t1\",\n\t\"blog_management\"\t\t : \"fortune.com_businessnews_t1\",\n\t\"blog_moremoney\"\t\t : \"cnnmoney.com_personalfinance_t1\",\n\t\"blog_readereschoice\"\t : \"cnnmoney.com_personalfinance_t1\",\n\t\"blog_helpdesk\"\t\t\t : \"cnnmoney.com_personalfinance_fivetips_t1\",\n\t\"blog_economy\"\t\t\t : \"cnnmoney.com_businessnews_jobsandeconomy_t1\",\n\t\"blog_buzz\"\t\t\t\t : \"cnnmoney.com_investing_thebuzz_t1\",\n\t\"blog_smallbusiness\"\t : \"cnnmoney.com_smallbusiness_t1\",\n\n\t//branding\n\t\"2020_visionaries\"\t\t: \"cnnmoney.com_technology_2020visionaries_t1\",\n\t\"before_the_bell\"\t\t: \"cnnmoney.com_marketsandstocks_beforethebell_t1\",\n \"battleground_states\"\t: \"cnnmoney.com_economy_battlegroundstates_t1\",\n\t\"bestbizideas\"\t\t\t: \"cnnmoney.com_businessnews_bestbusinessideas_t1\",\n\t\"businessoftheolympics\" : \"cnnmoney.com_businessnews_olympics2016_businessoftheolympics_t1\",\n\t\"greenbiz\"\t\t\t\t: \"cnnmoney.com_businessnews_bizgreen_t1\",\n\t\"facetoface\"\t\t\t: \"cnnmoney.com_business_news_face_to_face_t1\",\n\t\"future_of_tech\"\t\t: \"cnnmoney.com_technology_futureoftech_t1\",\n\t\"strategysessions\" : \"cnnmoney.com_businessnews_strategysessions_t1\",\n\t\"morningbuzz\"\t\t\t: \"cnnmoney.com_investing_thebuzz_t1\",\n\t\"bestjobs2009\"\t\t\t: \"cnnmoney.com_businessnews_jobsandeconomy_bestjobs_t1\",\n\t\"bestjobs\"\t\t\t\t: \"cnnmoney.com_businessnews_jobsandeconomy_bestjobs_t1\",\n\t\"detroit\"\t\t\t\t: \"cnnmoney.com_businessnews_jobsandeconomy_detroitproject_t1\",\n\t\"TheRescue\"\t\t\t\t: \"cnnmoney.com_businessnews_jobsandeconomy_election_t1\",\n\t\"midtermelections2010\"\t: \"cnnmoney.com_businessnews_jobsandeconomy_election_t1\",\n\t\"gas\"\t\t\t\t\t: \"cnnmoney.com_businessnews_jobsandeconomy_energy_t1\",\n\t\"fortuneoutlook\"\t\t: \"cnnmoney.com_businessnews_jobsandeconomy_theoutlook_t1\",\n\t\"luxurylifetop\"\t\t\t: \"cnnmoney.com_luxury_t1\",\n\t\"agility_in_action\" : \"cnnmoney.com_technology_agilityinaction_t1\",\n\t\"alternative_investing\" : \"cnnmoney.com_investing_alternativeinvesting_t1\",\t\n\t\"american_dream\" : \"cnnmoney.com_businessnews_americandream_t1\",\n\t\"americas_choice_2016\" : \"cnnmoney.com_businessnews_americaschoice2016_t1\",\n\t\"americas_debt\" : \"cnnmoney.com_businessnews_americasdebt_t1\",\t\n\t\"bestplacelive_2013\"\t: \"cnnmoney.com_personalfinance_bestplacestolive_t1\",\n\t\"bestplacelive_2012\"\t: \"cnnmoney.com_personalfinance_bestplacestolive_t1\",\n\t\"bestplacelive_2010\"\t: \"cnnmoney.com_personalfinance_bestplacestolive_t1\",\n\t\"bestplacelive_2009\"\t: \"cnnmoney.com_personalfinance_bestplacestolive_t1\",\n\t\"bestplacelive_2008\"\t: \"cnnmoney.com_personalfinance_bestplacestolive_t1\",\n\t\"bestplacelive_2007\"\t: \"cnnmoney.com_personalfinance_bestplacestolive_t1\",\n\t\"breaking_the_mold\" : \"cnnmoney.com_smallbusiness_breakingthemold_t1\",\n\t\"buffett_live\"\t\t\t: \"cnnmoney.com_investing_buffett_live_t1\",\n\t\"doitnow\"\t\t\t\t: \"cnnmoney.com_personalfinance_doitnow_t1\",\n\t\"election_2016\" : \"cnnmoney.com_economy_election2016_t1\",\n\t\"cnnmoney_investigates_con_woman\" : \"cnnmoney.com_businessnews_cnnmoneyinvestigatesconwoman_t1\",\n\t\"holiday\"\t\t\t\t: \"cnnmoney.com_personalfinance_holidaymoney_t1\",\n\t\"holidaymoney2009\"\t\t: \"cnnmoney.com_personalfinance_holidaymoney_t1\",\n\t\"holidaymoney2010\"\t\t: \"cnnmoney.com_personalfinance_holidaymoney_t1\",\n\t\"holiday2007\"\t\t\t: \"cnnmoney.com_personalfinance_holidaymoney_t1\",\n \"holiday_shopping_2016\" : \"cnnmoney.com_personalfinance_holidayshopping2016_t1\",\n\t\"homes\" : \"cnnmoney.com_personalfinance_homes_t1\",\n\t\"moneymainstreet\"\t\t: \"cnnmoney.com_personalfinance_moneyandmainstreet_t1\",\n\t\"family\" : \"cnnmoney.com_personalfinance_family_t1\",\n\t\"familymoney\"\t\t\t: \"cnnmoney.com_personalfinance_yourfamily_t1\",\n\t\"fed_focus\" : \"cnnmoney.com_investing_fed_focus_t1\",\n\t\"yourfamilymoney\"\t\t: \"cnnmoney.com_personalfinance_yourfamily_t1\",\n\t\"road-to-wealth\"\t\t: \"cnnmoney.com_personal_finance_road_to_wealth_t1\",\n\t\"familymoney\"\t\t\t: \"cnnmoney.com_realestate_yourfamily_t1\",\n\t\"yourfamilymoney\"\t\t: \"cnnmoney.com_realestate_yourfamily_t1\",\n\t\"MONEY\"\t\t\t\t\t: \"cnnmoney.com_retirement_asktheexpert_t1\",\n\t\"best_in_tech\" : \"cnnmoney.com_technology_bestintech_t1\",\n\t\"bestplaceretire_2010\"\t: \"cnnmoney.com_retirement_bestplacestoretire_t1\",\n\t\"bestplaceretire_2009\"\t: \"cnnmoney.com_retirement_bestplacestoretire_t1\",\n\t\"bestplaceretire_2008\"\t: \"cnnmoney.com_retirement_bestplacestoretire_t1\",\n\t\"bestplaceretire_2007\"\t: \"cnnmoney.com_retirement_bestplacestoretire_t1\",\n\t\"bestplaceretire\"\t\t: \"cnnmoney.com_retirement_bestplacestoretire_t1\",\n\t\"retirerich\"\t\t\t: \"cnnmoney.com_retirement_retirerich_t1\",\n\t\"revell\"\t\t\t\t: \"cnnmoney.com_retirement_rulesofretirement_t1\",\n\t\"bestbizideas\"\t\t\t: \"cnnmoney.com_smallbusiness_bestbusinessideas_t1\",\n\t\"innovationnation\"\t\t: \"cnnmoney.com_technology_innovationnation_t1\",\n\t\"smallandglobal\"\t\t: \"cnnmoney.com_smallbusiness_smallandglobal_t1\",\n\t\"fsbmakeover\"\t\t\t: \"cnnmoney.com_smallbusiness_smallbusinessmakeover_t1\",\n\t\"stateofsmallbiz\"\t\t: \"cnnmoney.com_small_business_state_of_small_business_t1\",\n\t\"fortunetechtalk\"\t\t: \"cnnmoney.com_technology_techtalk_t1\",\n\t\"toptips\"\t\t\t\t: \"cnnmoney.com_personalfinance_fivetips_t1\",\n\t\"visionaries\"\t\t\t: \"cnnmoney.com_businessnews_visionaries_t1\",\n\t\"investing_guide\"\t\t: \"cnnmoney.com_investing_investingguide_t1\",\n\t\"where-are-they-now\"\t: \"cnnmoney.com_small_business_where_are_they_now_t1\",\n\t\"bestadvice2009\"\t\t: \"fortune.com_businessnews_bestadvice_t1\",\n\t\"brainstormgreen\"\t\t: \"fortune.com_businessnews_brainstormgreenconference_t1\",\n\t\"dumbest\"\t\t\t\t: \"fortune.com_lists_dumbmoments_t1\",\n\t\"stanleybing\"\t\t\t: \"fortune.com_businessnews_stanleybing_t1\",\n\t\"mostpowerfulwomen2013\"\t: \"fortune.com_clevel_50mostpowerfulwomen_t1\",\n\t\"picture_this\" : \"cnnmoney.com_businessnews_picturethis_t1\",\n\t\"power\"\t\t : \"cnnmoney.com_businessnews_power_t1\",\n\t\"powering_your_world\" : \"cnnmoney.com_technology_poweringyourworld_t1\",\n\t\"powerwomen2012\"\t\t: \"fortune.com_clevel_50mostpowerfulwomen_t1\",\n\t\"powerwomen2010\"\t\t: \"fortune.com_clevel_50mostpowerfulwomen_t1\",\t\n\t\"powerwomen2009\"\t\t: \"fortune.com_clevel_50mostpowerfulwomen_t1\",\n\t\"powerwomen2008\"\t\t: \"fortune.com_clevel_50mostpowerfulwomen_t1\",\n\t\"powerwomen2007\"\t\t: \"fortune.com_clevel_50mostpowerfulwomen_t1\",\n\t\"powerwomen\"\t\t\t: \"fortune.com_clevel_50mostpowerfulwomen_t1\",\n\t\"csuite\"\t\t\t\t: \"fortune.com_clevel_csuitestrategies_t1\",\n\t\"csuiteunpackaged\"\t\t: \"fortune.com_clevel_csuitestrategies_t1\",\n\t\"cyber_safe\" : \"cnnmoney.com_technology_cybersafe_t1\",\t\n\t\"leadership2008\"\t\t: \"fortune.com_clevel_leadershipseries_t1\",\n\t\"40under40_2010\"\t\t: \"fortune.com_clevel_peopleyoushouldknow_t1\",\n\t\"40under40_2011\"\t\t: \"fortune.com_business_news_clevel_40_under_40_t1\",\n\t\"40under40_2012\"\t\t: \"fortune.com_business_news_clevel_40_under_40_t1\",\n\t\"fortpower25\"\t\t\t: \"fortune.com_clevel_powerissue_t1\",\n\t\"peopleinpower\"\t\t\t: \"fortune.com_clevel_powerissue_t1\",\n\t\"bestcos2012\"\t\t\t: \"fortune.com_lists_100bestcompaniestoworkfor_t1\",\n\t\"bestcos2011\"\t\t\t: \"fortune.com_lists_100bestcompaniestoworkfor_t1\",\n\t\"bestcos2010\"\t\t\t: \"fortune.com_lists_100bestcompaniestoworkfor_t1\",\n\t\"bestcos2009\"\t\t\t: \"fortune.com_lists_100bestcompaniestoworkfor_t1\",\n\t\"bestcos2008\"\t\t\t: \"fortune.com_lists_100bestcompaniestoworkfor_t1\",\n\t\"bestcos\"\t\t\t\t: \"fortune.com_lists_100bestcompaniestoworkfor_t1\",\n\t\"fastestgrowingcos2009\"\t: \"fortune.com_lists_fastestgrowingcompanies_t1\",\n\t\"fastestgrowingcos2008\"\t: \"fortune.com_lists_fastestgrowingcompanies_t1\",\n\t\"fear_and_greed\"\t : \"cnnmoney.com_investing_fearandgreed_t1\",\n\t\"fortfastgrow_2007\"\t\t: \"fortune.com_lists_fastestgrowingcompanies_t1\",\n\t\"fortune500_2013\"\t\t: \"fortune.com_lists_fortune500_t1\",\n\t\"fortune500_2012\"\t\t: \"fortune.com_lists_fortune500_t1\",\n\t\"fortune500_2011\"\t\t: \"fortune.com_lists_fortune500_t1\",\n\t\"fortune500_2010\"\t\t: \"fortune.com_lists_fortune500_t1\",\n\t\"fortune500_2009\"\t\t: \"fortune.com_lists_fortune500_t1\",\n\t\"fortune500_2008\"\t\t: \"fortune.com_lists_fortune500_t1\",\n\t\"fortune500_2007\"\t\t: \"fortune.com_lists_fortune500_t1\",\n\t\"fortune500_2006\"\t\t: \"fortune.com_lists_fortune500_t1\",\n\t\"g20\" : \"cnnmoney.com_business_g20_t1\",\n\t\"gadget\" : \"cnnmoney.com_technology_gadget_t1\",\n\t\"gentlemans_guide\" : \"cnnmoney.com_luxury_gentlemansguide_t1\",\n\t\"global_real_estate\" : \"cnnmoney.com_realestate_globalrealestate_t1\",\n\t\"global500_2013\"\t\t: \"fortune.com_lists_global500_t1\",\n\t\"global500_2009\"\t\t: \"fortune.com_lists_global500_t1\",\n\t\"global500_2008\"\t\t: \"fortune.com_lists_global500_t1\",\n\t\"global500_2007\"\t\t: \"fortune.com_lists_global500_t1\",\n\t\"globalforum\"\t\t\t: \"fortune.com_worldbiz_globalforum_t1\",\n\t\"going_global\" : \"cnnmoney.com_business_goingglobal_t1\",\n\t\"growing_in_india\"\t : \"cnnmoney.com_business_growinginindia_t1\",\n\t\"made_in_poland\" : \"cnnmoney.com_business_madeinpoland_t1\",\n \"made_in_safrica\" : \"cnnmoney.com_business_madeinsafrica_t1\",\n \"made_in_thailand\" : \"cnnmoney.com_markets_madeinthailand_t1\",\n\t\"millennials_and_their_money\" : \"cnnmoney.com_personalfinance_millennialsandtheirmoney_t1\",\n\t\"mostadmired2009\"\t\t: \"fortune.com_lists_mostadmiredcompanies_t1\",\n\t\"mostadmired2008\"\t\t: \"fortune.com_lists_mostadmiredcompanies_t1\",\n\t\"mostadmired2013\"\t\t: \"fortune.com_lists_mostadmiredcompanies_t1\",\n\t\"mostadmired2014\"\t\t: \"fortune.com_lists_mostadmiredcompanies_t1\",\n\t\"mostadmiredcos\"\t\t: \"fortune.com_lists_mostadmiredcompanies_t1\",\n\t\"most_innovative_cities\": \"cnnmoney.com_technology_mostinnovativecities_t1\",\t\n\t\"callawaycars\"\t\t\t: \"fortune.com_lifestyle_autos_callawaycars_t1\",\n\t\"fortluxbiz2008\"\t \t: \"fortune.com_lifestyle_bizofluxury_t1\",\n\t\"luxurylifetop\"\t\t\t: \"fortune.com_lifestyle_lifeatthetop_t1\",\n\t\"roadwarriorsfortune\"\t: \"fortune.com_lifestyle_travel_roadwarriorsguide_t1\",\n\t\"captainsblog\"\t\t\t: \"fortune.com_marketsandstocks_streetlife_t1\",\n \"europe_2020\" : \"cnnmoney.com_business_europe2020_t1\",\n \"india_2020\" : \"cnnmoney.com_business_india2020_t1\",\n \"india_20_under_40\" : \"cnnmoney.com_business_india20under40_t1\",\n\t\"innovate_tech\" : \"cnnmoney.com_technology_innovate_t1\",\n\t\"innovative_cities\" : \"cnnmoney.com_technology_innovativecities_t1\",\n\t\"innovators\" : \"cnnmoney.com_businessnews_innovators_t1\",\n\t\"internet_of_things\" : \"cnnmoney.com_technology_internetofthing_t1\",\n\t\"investorsp-econ08\"\t\t: \"fortune.com_personalfinance_investorsspecialguide_t1\",\n\t\"investorsguide2010\"\t: \"fortune.com_personalfinance_ultimateinvestmentguide_t1\",\n\t\"investorsguide2011\"\t: \"fortune.com_personalfinance_ultimateinvestmentguide_t1\",\n\t\"money-sense\"\t : \"fortune.com_personal_finance_money_sense_t1\",\n\t\"bpsmbiz2009\"\t\t\t: \"fortune.com_smallbusiness_bestplacesforsmallbusiness_t1\",\n\t\"fsbhowwegotstarted\"\t: \"fortune.com_smallbusiness_entrepreneurialheroes_t1\",\n\t\"brainstormTech2008\"\t: \"fortune.com_technology_brainstorm_t1\",\n\t\"brainstormtech\"\t\t: \"fortune.com_technology_brainstorm_t1\",\n\t\"disruptors\"\t\t\t: \"fortune.com_technology_disruptors_t1\",\n\t\"techinnovation\"\t\t: \"fortune.com_technology_innovationtechspecial_t1\",\n\t\"techinnovators2008\"\t: \"fortune.com_technology_techspecialreport_t1\",\n\t\"the_business_view\" : \"cnnmoney.com_business_thebusinessview_t1\",\n\t\"the_collector\" : \"cnnmoney.com_luxury_thecollector_t1\",\n\t\"biztransform\"\t\t\t: \"fortune.com_technology_techtransformation_t1\",\n\t\"davos\"\t\t\t\t\t: \"cnnmoney.com_businessnews_worldbiz_davos_t1\",\n\t\"executivedreamteam\"\t: \"fortune.com_clevel_executivedreamteam_t1\",\n\t\"empire\"\t : \"cnnmoney.com_site_small_business_empire_t1\",\t\n\t\"evolution\" : \"cnnmoney.com_technology_evolution_t1\",\n\t\"appnation\"\t\t\t\t: \"cnnmoney.com_technology_app_nation_t1\",\n\t\"gamechangers\"\t\t\t: \"cnnmoney.com_businessnews_game_changers_t1\",\n\t\"fastestgrowingcos2012\"\t: \"fortune.com_lists_fastestgrowingcompanies_t1\",\n\t\"fastestgrowingcos2013\"\t: \"fortune.com_lists_fastestgrowingcompanies_t1\",\n\t\"wheels\"\t\t\t\t: \"cnnmoney.com_personalfinance_auto_wheels_t1\",\n\t\"women_entrepreneurs\" : \"CNNMoney.com_Site_Small_Business_Women_Entrepreneurs_T1_Instream\",\n\t\"sept11_2011\"\t\t\t: \"fortune.com_personalfinance_ground_zero_t1\",\n\t\"verne_harnish\"\t\t\t: \"cnnmoney.com_small_business_verne_harnish_t1\",\n\t\"trailblazers\"\t\t\t: \"cnnmoney.com_small_business_innovation_trailblazers_t1\",\n\t\"away\"\t\t\t : \"cnnmoney.com_personalfinance_away_t1\",\n\t\"drive\"\t\t\t : \"cnnmoney.com_luxury_drive_t1\",\n\t\"million-dollar-homes\" : \"cnnmoney.com_luxury_milliondollarhomes_t1\",\n\t\"tech_reports\"\t\t\t: \"cnnmoney.com_technology_techreports_t1\",\n \"the-big-spend\"\t\t\t: \"cnnmoney.com_luxury_thebigspend_t1\",\n \"the_inside_story\"\t\t: \"cnnmoney.com_technology_theinsidestory_t1\",\n\t\"the_open\" \t\t : \"cnnmoney.com_investing_openingbell_t1\",\n\t\"traders\" : \"cnnmoney.com_business_traders_t1\",\t\n\t\"reliablesources\"\t : \"cnnmoney.com_media_reliablesources_t1\",\n\t\"market_movers\" : \"cnnmoney.com_investing_marketmovers_t1\",\n\t\"market_movers_and_shakers\" :\"cnnmoney.com_investing_marketmoversandshakers_t1\",\n \"marketplace_middle_east\" :\"cnnmoney.com_markets_marketplacemiddleeast_t1\",\n\t\"money_moves\"\t : \"cnnmoney.com_personalfinance_moneymoves_t1\",\n\t\"your-money\"\t : \"cnnmoney.com_personalfinance_yourmoney_t1\",\n\t\"future-of-love\"\t : \"cnnmoney.com_technology_futureoflove_t1\",\n\t\"big-money\"\t : \"cnnmoney.com_luxury_rare_t1\",\n\t\"new_delhi_pollution\" : \"cnnmoney.com_businessnews_newdelhipollution_t1\",\n\t\"new_investor\" : \"cnnmoney.com_investing_newinvestor_t1\",\n\t\"new_rules_for_retirement\" : \"cnnmoney.com_personalfinance_newrulesforretirement_t1\",\n\t\"nigeria_economy\" : \"cnnmoney.com_economy_nigeriaeconomy_t1\",\t\n\t\"24-hours-with\" \t\t: \"cnnmoney.com_personalfinance_24hourswith_t1\",\n\t\"billion-dollar-ideas\"\t: \"cnnmoney.com_businessnews_billiondollarideas_t1\",\n\t\"family-money\"\t\t\t: \"cnnmoney.com_luxury_familymoney_t1\",\n\t\"why-costs\" \t\t : \"cnnmoney.com_luxury_whythiscoststhat_t1\",\n\t\"opening-bell\" \t\t :\"cnnmoney.com_investing_openingbell_t1\",\n\t\"aloft\" \t\t :\"cnnmoney.com_luxury_aloft_t1\",\n\t\"hottest-investments-world\" :\"cnnmoney.com_investing_hottestinvestmentsworld_t1\",\n\t\"the_connectors\" \t\t:\"cnnmoney.com_business_theconnectors_t1\",\n\t\"the-real-economy\" \t\t:\"cnnmoney.com_economy_therealeconomyt1\",\n\t\"cloud-computing\"\t\t:\"cnnmoney.com_technology_cloudcomputing_t1\",\n\t\"business-ofbeing\"\t\t:\"cnnmoney.com_businessnews_businessofbeing_t1\",\n\t\"holiday_shopping\":\"cnnmoney.com_personalfinance_holidayshopping_t1\",\n\t\"passion_to_portfolio\" :\"cnnmoney.com_business_passiontoportfolio_t1\",\n\t\"planning-next\":\"cnnmoney.com_personalfinance_planningnext_t1\",\n\t\"quest_means_business\" :\"cnnmoney.com_business_questmeansbusiness_t1\",\n\t\"runway_slaves\" :\"cnnmoney.com_businessnews_runwayslaves_t1\",\n\t\"restart\" :\"cnnmoney.com_smallbusiness_restart_t1\",\n \"dream-retirement\" :\"cnnmoney.com_personalfinance_dreamretirement_t1\",\n \"savings_challenge\" :\"cnnmoney.com_personalfinance_savingschallenge_t1\", \n \"science-of-work\" :\"cnnmoney.com_smallbusiness_scienceofwork_t1\",\n \"on_abu_dhabi\" :\"cnnmoney.com_markets_onabudhabi_t1\",\n \"startups\" :\"cnnmoney.com_smallbusiness_startups_t1\",\n \"voyage\" \t\t\t:\"cnnmoney.com_luxury_voyage_t1\",\n \"smart-spending\" :\"cnnmoney.com_personalfinance_smartspending_t1\",\n \"stockswatch\" :\"cnnmoney.com_site_investing_stockswatch_t1\",\n \"superhero_hackers\" :\"cnnmoney.com_technology_superherohackers_t1\",\n \"surge\" :\"cnnmoney.com_surge_t1\", \n \"retire_your_way\" :\"cnnmoney.com_personalfinance_retireyourway_t1\",\n \"producing_the_goods\" :\"cnnmoney.com_technology_producingthegoods_t1\",\n \"working_life\" :\"cnnmoney.com_businessnews_workinglife_t1\",\n \"work_transformed\" :\"cnnmoney.com_technology_worktransformed_t1\",\n \"world_business_today\" :\"cnnmoney.com_business_worldbusinesstoday_t1\",\n \"unhackable\" :\"cnnmoney.com_technology_unhackable_t1\",\n \"unicorns\" :\"cnnmoney.com_business_unicorns_t1\",\n \"upstarts\" :\"cnnmoney.com_technology_upstarts_t1\",\n \"upstarts30\" \t\t\t:\"cnnmoney.com_technology_upstarts30_t1\"\n};\n\n/* requires js/lib/videoplayer/3.0/common.js */\n\n/**\n * Override omniture fields.\n * Note: setADBPValues first created for Twitter so we're adopting function name and expanding \n */\nfunction setADBPValues(player, o, video_id)\n{\n\t/* always reset value */\n\tplayer.contentpage.cnnOmniture_source = player.contentpage.cnnOmniture_prop14 = ''; /* cnnOmniture_prop14 = prop5,eVar5 (video source) */\n\tplayer.contentpage.cnnOmniture_prop17 = ''; /*\tcnnOmniture_prop17 = not used in jsmd */\n\tplayer.contentpage.cnnOmniture_prop19 = ''; /*\tcnnOmniture_prop19 = not used in jsmd */\n\tplayer.contentpage.cnnOmniture_playername = player.contentpage.cnnOmniture_prop24 = ''; /*\tcnnOmniture_prop24 = prop16,eVar16 (video player) */\n\n\t/* prop14 */\n\tif(o.source == 'CNNMoney')\n\t{\n\t\tplayer.contentpage.cnnOmniture_source = player.contentpage.cnnOmniture_prop14 = 'CNNMONEY'; //MNY-4317\n\t}\n\telse if(o.source == 'Fortune')\n\t{\n\t\tplayer.contentpage.cnnOmniture_source = player.contentpage.cnnOmniture_prop14 = 'FORT';\n\t}\n\n\t/* prop17 \n\tif (video_id.match('fsb') || video_id.match('smallbusiness'))\n\t{\n\t\tplayer.contentpage.cnnOmniture_prop17 = 'Video: '+o.headline;\n\t}\n\t*/\n\n\t/* prop19 */\n\t//MNY-4224\n\tswitch(o.section)\n\t{\n\t\tcase '/video/news':\n\t\t\tplayer.contentpage.cnnOmniture_prop19 = 'News';\n\t\t\tbreak;\n\n\t\tcase '/video/markets':\n\t\t\tplayer.contentpage.cnnOmniture_prop19 = 'Markets';\n\t\t\tbreak;\n\n\t\tcase '/video/pf':\n\t\t\tplayer.contentpage.cnnOmniture_prop19 = 'PersonalFinance';\n\t\t\tbreak;\n\n\t\tcase '/video/technology':\n\t\t\tplayer.contentpage.cnnOmniture_prop19 = 'Technology';\n\t\t\tbreak;\n\n\t\tcase '/video/luxury':\n\t\t\tplayer.contentpage.cnnOmniture_prop19 = 'Luxury';\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tbreak;\n\t}\n\n\tvar playerprofile = player.profile;\n\t/* prop24 */\n\tvar pathname = location.pathname.toLowerCase();\n\tvar selectedEdition = cnnm_getCookie('SelectedEdition').toLowerCase();\n\n\tif(pathname.indexOf('/international/') !== -1 || (pathname == '/' && selectedEdition == 'edition') || (pathname == '/index.html' && selectedEdition == 'edition'))\n\t{\n\t\tplayer.contentpage.cnnOmniture_playername = player.contentpage.cnnOmniture_prop24 = 'international player';\n\t}\n\telse if(playerprofile == 'videoInteractive')\n\t{\n\t\tplayer.contentpage.cnnOmniture_playername = player.contentpage.cnnOmniture_prop24 = 'interactive player';\n\t}\n\telse if(location.pathname.match(\"/media/\"))\n\t{\n\t\tplayer.contentpage.cnnOmniture_playername = player.contentpage.cnnOmniture_prop24 = 'media player';\n\t}\t\t\n\telse if(location.pathname.match(\"/technology/\"))\n\t{\n\t\tplayer.contentpage.cnnOmniture_playername = player.contentpage.cnnOmniture_prop24 = 'tech player';\n\t}\n\telse if(location.pathname.match(\"/interactive/\"))\n\t{\n\t\tplayer.contentpage.cnnOmniture_playername = player.contentpage.cnnOmniture_prop24 = 'interactive player';\n\t}\t\n\telse if(playerprofile == 'live')\n\t{\n\t\tplayer.contentpage.cnnOmniture_playername = player.contentpage.cnnOmniture_prop24 = 'live player';\n\t}\n\telse if(playerprofile == 'videoclip')\n\t{\n\t\tplayer.contentpage.cnnOmniture_playername = player.contentpage.cnnOmniture_prop24 = 'videoclip';\n\t}\n\telse if(playerprofile == 'story' || playerprofile == 'wp_blogs')\n\t{\n\t\tif('top' == player.vidloc) {\n\t\t\tplayer.contentpage.cnnOmniture_playername = player.contentpage.cnnOmniture_prop24 = 'story top';\n\t\t}\n\t\telse {\n\t\t\tplayer.contentpage.cnnOmniture_playername = player.contentpage.cnnOmniture_prop24 = 'story player';\n\t\t}\n\t}\n\telse if(playerprofile == \"gallerySmall\" || playerprofile == \"galleryLarge\" || playerprofile == \"galleryExtraLarge\")\n\t{\n\t\tplayer.contentpage.cnnOmniture_playername = player.contentpage.cnnOmniture_prop24 = 'gallery player';\n\t}\n\telse if(location.pathname == \"/\" || location.pathname == \"/index.html\")\n\t{\n\t\tplayer.contentpage.cnnOmniture_playername = player.contentpage.cnnOmniture_prop24 = 'cnnmoney homepage';\n\t}\n\telse if(location.pathname == \"/smallbusiness/\" || location.pathname.match(\"/smallbusiness/index.html\"))\n\t{\n\t\tplayer.contentpage.cnnOmniture_playername = player.contentpage.cnnOmniture_prop24 = 'smallbusiness homepage';\n\t}\n\telse if(location.pathname == '/smallbusiness/makeover/' || location.pathname.match(\"/smallbusiness/makeover/index.html\"))\n\t{\n\t\tplayer.contentpage.cnnOmniture_playername = player.contentpage.cnnOmniture_prop24 = 'smallbusiness makeover';\n\t}\n\telse if(location.pathname == \"/magazines/fortune/\" || location.pathname.match(\"/magazines/fortune/index.html\"))\n\t{\n\t\tplayer.contentpage.cnnOmniture_playername = player.contentpage.cnnOmniture_prop24 = 'fortune homepage';\n\t}\n\telse if(top.location.pathname.match(\"data/premarket\"))\n\t{\n\t\tplayer.contentpage.cnnOmniture_playername = player.contentpage.cnnOmniture_prop24 = 'premarkets';\n\t}\n\telse if(top.location.pathname.match(\"data/afterhours\"))\n\t{\n\t\tplayer.contentpage.cnnOmniture_playername = player.contentpage.cnnOmniture_prop24 = 'afterhours';\n\t}\n\telse if(location.pathname.match(\"/video/\"))\n\t{\n\t\tplayer.contentpage.cnnOmniture_playername = player.contentpage.cnnOmniture_prop24 = 'videoclip';\n\t}\n\telse if(location.pathname.match(\"news/specials/assignment_detroit\"))\n\t{\n\t\tplayer.contentpage.cnnOmniture_playername = player.contentpage.cnnOmniture_prop24 = 'detroit homepage';\n\t}\n\telse\n\t{\n\t\tplayer.contentpage.cnnOmniture_playername = player.contentpage.cnnOmniture_prop24 = 'story player';\n\t}\n}\n\n\n\n\n\n/** \n * Inserts video into playlist and begins playing from this point.\n */\nfunction playVideo(videoId, playerId)\n{\n\tvar videoPlayer = (playerId === undefined) ? VideoPlayerManager.getPlayer() : VideoPlayerManager.getPlayer(playerId); \n\t\n\tif(videoPlayer == null)\n\t{\n\t\tVideoPlayerManager.playVideos();\n\t\treturn;\n\t}\n\t\n\t//if already loaded\n\tvar itemNum = videoPlayer.play_list.getIndex(videoId);\n\tif(!itemNum)\n\t{\n\t\t//load the new item by injecting into the current position in the playlist\n\t\tvideoPlayer.play_list.injectItem({id:videoId});\n\t\t\n\t\t//load the new item by replacing the entire playlist\n\t\t//videoPlayer.play_list.load([{id:videoId}]);\n\t}\n\n\tvideoPlayer.play(videoId);\t\n}\n\n/* requires js/lib/videoplayer/4.0/videoplayer.manager.js */\n\n\n\n\nvar VideoPlayerManager = {\n\tispreview : (location.hostname.match('preview'))? true : false,\n\tplayers : {},\n\tplayerprofiles : {\n\t\t/* Autostart (autoplay) vs Autostart (tracking)\n\n\t\t Autostart tracking \n\t\t update 2014-10-1: MNYGEN-3783:\n\t\t \t- Set to true for all videos that autostart. That viewer did not initiate.\n\t\t \t- all players that autostart\n\t\t \t- all videos that play in a playlist after\n\t\t \t- NOT replayed video\n\t\t \tNote: in the past we used to consider this a measure of \"intent\" so a video that autostarted\n\t\t \ton an article .top was not considered autostart because the user clicked on the article page and\n\t\t \tintended to view the content. Changed since MNYGEN-3783\n\n\t\t\t\n\t\t\tAutostart (Autoplay)\n\t\t\tCVP has it's on autostart (autoplay) property which we will not use and default to on.\n\t\t\tBecause we make use of poster images (fake player) we don't load the player until the user \n\t\t\tclicks on the poster image. Therefore autoplay must be controller by us.\n\n\t\t\t$autostart = CVP property. Always set to 'on' on our players that use a poster image (all but Twitter)\n\t\t\t$autoplay = Video Player Obj property we maintain that has actual value of whether the player is autoplay or not\n\t\t*/\n\t\tconfigs : {\n\t\t\t\"generic\" : {\n\t\t\t\twidth : 1024, \n\t\t\t\theight : 576, \n\t\t\t\tdivid : 'playerarea',\n\t\t\t\tslateClick : 'top',\n\t\t\t\tautoplay : false\n\t\t\t},\n\t\t\t\"story\" : {\n\t\t\t\twidth : 620, \n\t\t\t\theight : 348, \n\t\t\t\tdivid : 'vid0',\n\t\t\t\tslateClick : 'top',\n\t\t\t\tautoplay : false\n\t\t\t},\n\t\t\t\"wp_blogs\" : {\n\t\t\t\twidth : 476, \n\t\t\t\theight : 268, \n\t\t\t\tdivid : 'cnnVidplayer',\n\t\t\t\tslateClick : 'player',\n\t\t\t\tautoplay : false\n\t\t\t},\n\t\t\t\"section\" : {\n\t\t\t\twidth : 620, \n\t\t\t\theight : 348, \n\t\t\t\tdivid : 'cnnVidplayer',\n\t\t\t\tslateClick : 'top',\n\t\t\t\tautoplay : false\n\t\t\t},\n\t\t\t\"sectionLarge\" : {\n\t\t\t\twidth : 1024, \n\t\t\t\theight : 576, \n\t\t\t\tdivid : 'cnnVidplayer',\n\t\t\t\tslateClick : 'top',\n\t\t\t\tautoplay : false\n\t\t\t},\n\t\t\t\"videoclip\" : {\n\t\t\t\twidth : 1024, \n\t\t\t\theight : 576, \n\t\t\t\tdivid : 'cnnVidplayer',\n\t\t\t\tslateClick : 'top',\n\t\t\t\tautoplay : true\n\t\t\t},\n\t\t\t\"galleryLarge\" : {\n\t\t\t\twidth : 620, \n\t\t\t\theight : 348, \n\t\t\t\tdivid : 'cnnVidplayer',\n\t\t\t\tslateClick : 'top',\n\t\t\t\tautoplay : false\n\t\t\t},\n\t\t\t\"gallerySmall\" : {\n\t\t\t\twidth : 340, \n\t\t\t\theight : 191, \n\t\t\t\tdivid : 'cnnVidplayer',\n\t\t\t\tslateClick : 'top',\n\t\t\t\tautoplay : false\n\t\t\t},\n\t\t\t\"galleryExtraLarge\" : {\n\t\t\t\twidth : 1024, \n\t\t\t\theight : 576, \n\t\t\t\tdivid : 'cnnVidplayer',\n\t\t\t\tslateClick : 'top',\n\t\t\t\tautoplay : false\n\t\t\t},\t\t\t\t\n\t\t\t\"homepage\" : {\n\t\t\t\twidth : 620, \n\t\t\t\theight : 348, \n\t\t\t\tdivid : 'cnnVidplayer',\n\t\t\t\tslateClick : 'top',\n\t\t\t\tautoplay : false\n\t\t\t},\n\t\t\t\"markets\" : {\n\t\t\t\twidth : 300, \n\t\t\t\theight : 168, \n\t\t\t\tdivid : 'cnnVidplayer',\n\t\t\t\tslateClick : 'top',\n\t\t\t\tautoplay : false\n\t\t\t},\n\t\t\t\"interactive\" : {\n\t\t\t\twidth : 925,\n\t\t\t\theight : 520,\n\t\t\t\tdivid : 'playerarea',\n\t\t\t\tslateClick : 'top',\n\t\t\t\tautoplay : false\n\t\t\t},\n\t\t\t\"videoInteractive\" : {\n\t\t\t\twidth : 1024,\n\t\t\t\theight : 576,\n\t\t\t\tdivid : 'cnnVidplayer',\n\t\t\t\tslateClick : 'top',\n\t\t\t\tautoplay : false\n\t\t\t},\t\t\t\n\t\t\t\"live\" : {\n\t\t\t\twidth : 925,\n\t\t\t\theight : 520,\n\t\t\t\tdivid : 'playerarea',\n\t\t\t\tslateClick : 'player',\n\t\t\t\tautoplay : true\n\t\t\t},\n\t\t\t\"twitter\" : {\n\t\t\t\twidth : 420,\n\t\t\t\theight : 236,\n\t\t\t\tdivid : 'cnnVidplayer',\n\t\t\t\tslateClick : 'player',\n\t\t\t\tautoplay : false\n\t\t\t},\n\t\t\t\"noAds\" : {\n\t\t\t\twidth : 1024, \n\t\t\t\theight : 576, \n\t\t\t\tdivid : 'cnnVidplayer',\n\t\t\t\tslateClick : 'top',\n\t\t\t\tautoplay : true\n\t\t\t}\n\t\t}\n\t},\n\t\n\tadd : function(videoPlayer)\n\t{\n\t\tthis.players[videoPlayer.id] = videoPlayer;\t\n\t},\n\t/**\n\t * pause all players except pid else, pause all players\n\t */\n\tpauseplayers : function(pid) {\n\t\tfor(var p in this.players)\n\t\t{\n\t\t\tif(pid != this.players[p].id && this.players[p].isPlaying) {\n\t\t\t\tthis.players[p].pause();\t\t\t\t\n\t\t\t}\n\t\t}\n\t},\n\tgetPlayer : function(id)\n\t{\n\t\t/* default to first videoPlayer if no id passed in. */\n\t\tif(typeof(id) == 'undefined')\n\t\t{\n\t\t\tfor(var p in this.players)\n\t\t\t{\n\t\t\t\treturn this.players[p];\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn this.players[id]; \n\t},\n\tinitVideo : function (playerconfig) \n\t{\t\t\n\t\tprofile = (typeof playerconfig.playerprofile !== 'undefined')? playerconfig.playerprofile : 'generic';\n\t\t\n\t\tvar context\t\t = (VideoPlayerManager.ispreview)? 'preview' : profile,\n\t\t\twidth\t\t = (typeof playerconfig.width !== 'undefined')? playerconfig.width : this.playerprofiles.configs[profile].width, \n\t\t\theight\t\t = (typeof playerconfig.height !== 'undefined')? playerconfig.height : this.playerprofiles.configs[profile].height, \n\t\t\tplayerid\t = (typeof playerconfig.playerid !== 'undefined')? playerconfig.playerid : 'cvp_x' + (parseInt(Math.random() * 10000)).toString(), \n\t\t\tdivid\t\t = (typeof playerconfig.divid !== 'undefined')? playerconfig.divid: this.playerprofiles.configs[profile].divid,\n\t\t\tflashVarsProfile = (typeof playerconfig.flashVarsProfile !== 'undefined') ? playerconfig.flashVarsProfile : '2',\n\t\t\tfreewheelJsUrl = (typeof playerconfig.freewheelJsUrl !== 'undefined') ? playerconfig.freewheelJsUrl : '',\n\t\t\tssid \t\t = (typeof playerconfig.ssid !== 'undefined') ? playerconfig.ssid : undefined,\n\t\t\tautostart\t = (playerconfig.profile == 'twitter')? 'off' : 'on',\t\t\t\t\t\n\t\t\tautoplay\t = (typeof playerconfig.autoplay !== 'undefined')? (playerconfig.autoplay) : this.playerprofiles.configs[profile].autoplay,\n\t\t\thas_poster\t = (typeof playerconfig.has_poster !== 'undefined')? (playerconfig.has_poster) : true,\n\n\t\t\tdefaultSection = (typeof playerconfig.defaultSection !== 'undefined')? playerconfig.defaultSection: null,\n\t\t\tplaylist\t = playerconfig.videoArray || playerconfig.playlist,\n\t\t\tauto_playlist = (typeof playerconfig.auto_playlist != 'undefined')? playerconfig.auto_playlist : true,\n\t\t\tmaxVideos\t = (typeof playerconfig.maxVideos !== 'undefined')? playerconfig.maxVideos: 7,\n\t\t\tvidloc\t\t = (typeof playerconfig.loc != 'undefined')? playerconfig.loc: '',\n\t\t\tcontentpage\t = (typeof playerconfig.contentpage != 'undefined') ? playerconfig.contentpage : undefined,\n\t\t\tdisableEndSlate = (typeof playerconfig.disableEndSlate != 'undefined') ? playerconfig.disableEndSlate : undefined,\n\t\t\tdisableNextUpSlate = (typeof playerconfig.disableNextUpSlate != 'undefined') ? playerconfig.disableNextUpSlate : undefined,\n\t\t\tmode\t\t\t= (typeof playerconfig.mode != 'undefined') ? playerconfig.mode : undefined,\n\t\t\tfirstVideoId\t= (typeof playerconfig.firstVideoId != 'undefined') ? playerconfig.firstVideoId : undefined,\n\t\t\tcallouts \t = (typeof playerconfig.callouts != 'undefined') ? playerconfig.callouts : undefined;\n\t\tvar _cvpPlayerConfig =\n\t\t{\n\t\t\tid : playerid,\n\t\t\twidth : width,\n\t\t\theight : height,\n\t\t\tdivId : divid,\n\t\t\tflashVarsProfile : flashVarsProfile,\t\t\t\n\t\t\tfreewheelJsUrl : freewheelJsUrl,\n\t\t\tdefaultSection : defaultSection,\n\t\t\tcallouts : callouts,\n\t\t\tmode : mode,\n\t\t\tfirstVideoId : firstVideoId,\n\t\t\tmaxVideos : maxVideos,\n\t\t\tplaylist : playlist,\n\t\t\tauto_playlist : auto_playlist,\n\t\t\tcontentpage : contentpage,\n\t\t\tdisableEndSlate : disableEndSlate,\n\t\t\tdisableNextUpSlate : disableNextUpSlate,\n\t\t\tvidloc : vidloc,\n\t\t\tvidprofile : profile,\n\t\t\tssid : ssid,\n\t\t\tautoplay : autoplay,\n\t\t\tautostart : autostart, /* This var has the actual CVP value of whether this video is an autostartvideo */\n\t\t\thas_poster : has_poster\n\t\t};\n\n\t\tvar _cvpPlayerCallbacks\t= (typeof playerconfig.callbacks !== 'undefined') ? playerconfig.callbacks : {};\n\n\t\tvar player = new VideoPlayer(_cvpPlayerConfig, _cvpPlayerCallbacks);\n\t\t\n\t\t//if nothing can play, then give user 'needs flash' message and bail out..\n\t\tif(!player.canPlay)\n\t\t{\n\t\t\tplayer.embedNeedsFlash();\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t\n\t\t//something can play so lets continue..\n\t\tthis.add(player);\n\t\tplayer.init();\n\n\t},\n\n\t\n\t/**\n\t * Loads playerid or loads all players on the page\n\t */\n\tplayVideos : function (playerid) \n\t{\t\t\n\t\tvar numPlayers = vidConfig.length,\n\t\t\tplayerconfig;\n\t\t\n\t\tfor(var i = 0; i < numPlayers; i++) {\n\t\t\tplayerconfig = vidConfig[i];\n\n\t\t\tif(typeof(playerid) != 'undefined') {\n\t\t\t\tif(typeof(playerconfig.playerid) != 'undefined' && playerid == playerconfig.playerid) {\n\t\t\t\t\tthis.initVideo(playerconfig);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis.initVideo(playerconfig);\n\t\t\t}\n\t\t}\n\t},\n\n\t/**\n\t * Loads all players on the page that are set to autoplay\n\t */\n\tloadAutoplayers : function () \n\t{\t\t\n\t\tvar numPlayers = vidConfig.length,\n\t\t\tplayerconfig,\n\t\t\tautoplayflag = false;\n\t\t\n\t\tfor(var i = 0; i < numPlayers; i++) {\n\t\t\tplayerconfig = vidConfig[i];\n\t\t\tprofile\t\t = (typeof playerconfig.playerprofile !== 'undefined')? playerconfig.playerprofile : 'generic';\n\t\t\tautoplayflag = (typeof playerconfig.autoplay !== 'undefined')? (playerconfig.autoplay) : this.playerprofiles.configs[profile].autoplay;\n\n\t\t\tif(autoplayflag) {\n\t\t\t\tthis.initVideo(playerconfig);\n\t\t\t}\n\t\t}\n\t}\n};\n\n/* requires js/lib/videoplayer/5.0/videoplayer.js */\n/**\n * @class\n * @classdesc CNNMoney VideoPlayer class\n * @param {object} config - Required video player configuration options\n * @param {object} [callbacks={}] - Callback overrides.\n */\n\n/**\n\nAUTO PLAYING\nWhether a video autoplay depends on autoplay, has_poster, and autostart variables.\n autostart (boolean) = the actual variable CVP uses.\n autoplay (boolean) = the variable we use\n has_poster (boolen) = is the video player using a poster image?\n\nWhy is this so complicated?\nIn general our videos use a poster image to lighten browser loading for users. Once the user \nclicks on the poster image the video player loads. The player should then auto play otherwise\nthe video will load and the user needs to click \"play\" again. This means autostart is always \nequal to true since it's the autoplay variable that defines the user's experience.\n\nWhat does this mean?\nautostart is no longer reliable for determining the user's experience. We need to use autoplay.\nHence we use autoplay to determine trackingcontext (See trackingcontext comment below).\n\nNow what's with has_poster?\nIn some special cases, we want a video experience without a poster image but the bare CVP. In this\ncase we want to be able to make use of autostart when we want to control a video's auto-play functionality.\nHence there's a check in the flashVar variable we use to initialize the CVP that checks if has_poster is\ndefined.\n**/\n\nfunction VideoPlayer(config, callbacks) \n{\n /**\n * Pointer back to this player\n * @private\n * @type {VideoPlayer}\n * @defaultvalue this\n */\n var _self = this;\n\n /**\n * CVP object\n * @private\n * @type {CVP}\n */\n var _player = null;\n\n /**\n * Profile used by the player. These are CVP profiles found in CVP XML\n * @defaultvalue 'generic'\n */\n this.profile = config.vidprofile || config.playerprofile || 'generic';\n\n /**\n * ID of this player\n * @type {String}\n * @defaultvalue 'cvp_x13232432'\n */\n this.id = config.id || 'cvp_x' + (parseInt(Math.random() * 10000)).toString();\n\n /**\n * The player's width.\n * @type {Int}\n * @defaultvalue Width stored for the active profile\n */\n this.playerWidth = config.width || VideoPlayerManager.playerprofiles.configs[this.profile].width;\n\n /**\n * The player's height\n * @type {Int}\n * @defaultvalue Height stored for the active profile\n */\n this.playerHeight = config.height || VideoPlayerManager.playerprofiles.configs[this.profile].height;\n\n\n /**\n * The player's target div id\n * @type {String}\n * @defaultvalue Div id stored for the active profile\n */\n this.playerDivId = config.divId || VideoPlayerManager.playerprofiles.configs[this.profile].divid; /* target div to insert player */\n\n /**\n * flashvars' profile effects how CVP loads configuration files.\n * @type {String}\n * @defaultvalue '2'\n */\n /* THIS IS FOR PROD */\n this.flashVarsProfile = config.flashVarsProfile || \"2\";\n\n /* OTHER ENVS \n this.flashVarsProfile = config.flashVarsProfile || \"3\";\n */\n\n /**\n * URI to override freewheelJS file. Rarely used but available JIC\n * @type {String}\n */\n this.freewheelJsUrl = config.freewheelJsUrl || '';\n\n /**\n * Used to set determind if video player autoplays\n * @type {Boolean}\n */\n this.autoplay = config.autoplay || false;\n\n /**\n * Are we using a poster image before we load the player? (In Special cases we turn this off)\n * @type {Boolean}\n */\n this.has_poster = (typeof config.has_poster !== undefined)? config.has_poster : true;\n\n /**\n * Used for stories but can be applied to other players\n * @type {String}\n */\n this.vidloc = config.vidloc || '';\n\n /**\n * Uri of default playlist\n * @defaultvalue null\n * @type {String}\n */\n this.defaultSection = config.defaultSection || null;\n\n /**\n * Total number of videos that should be allowed to play in a row\n * @defaultvalue 0 (normal)\n * @type {Int}\n */\n this.mode = config.mode || VideoPlaylist.MODES.NORMAL; \n \n /**\n * First VideoId to play from initial playlist\n * @defaultvalue null\n * @type {String} VideoId in initial playlist to being playback from. \n * If the videoId is not found in the initial playlist, then first video will be first in video playlist.\n */\n this.firstVideoId = config.firstVideoId || null; \n \n this.updateFirstHed = config.updateFirstHed || false; \n\n /**\n * Total number of videos that should be allowed to play in a row\n * @defaultvalue 7\n * @type {Int}\n */\n this.maxVideos = config.limit || config.maxVideos || 7;\n\n /* \n * Temporary bin to create hybrid curated and default playlist to be loaded into play_list\n */\n this.temp_list = config.playlist || config.videoArray || [];\n\n /**\n * Automatically load a playlist?\n * @type {Boolean}\n * @defaultvalue true\n */\n this.auto_playlist = (config.auto_playlist !== undefined) ? config.auto_playlist : true;\n\n /**\n * @access private\n * @type {Object}\n */\n this.initial_callouts = config.callouts || {};\n\n /*\n * TODO: Remove this eval() ASAP!!!!\n * switch case it, if else if, .. anything but eval()\n */\n this.contentpage = (typeof(config.contentpage) !== 'undefined') ? eval(config.contentpage) : window;\n\n /**\n * Disables the nextup slate\n * @type {Boolean}\n * @defaultvalue false\n */\n this.disableNextUpSlate = (config.disableNextUpSlate !== undefined) ? config.disableNextUpSlate : true;\n\n /**\n * Disables the end slate\n * @type {Boolean}\n * @defaultvalue false\n */\n this.disableEndSlate = (config.disableEndSlate !== undefined) ? config.disableEndSlate : false;\n\n /** \n * Global SSID setting. If set, this will be used instead of video specific SSIDs.\n * @type {String}\n */\n this.ssid = config.ssid || undefined;\n\n /* Playlist Object */\n this.play_list = new VideoPlaylist(this.maxVideos, this.mode);\n\n /**\n * Slate thumbnail click behavior\n * @type {String}\n * @defaultvalue 'top'\n */\n this.slateClickTarget = config.slateClickTarget || VideoPlayerManager.playerprofiles.configs[this.profile].slateClick || 'top';\n\n /* Slate Objects */\n /**\n * End Slate\n * @type {VideoPlayerSlate}\n */\n this.endSlate = null;\n\n /**\n * Pause Slate\n * @type {VideoPlayerSlate}\n */\n this.pauseSlate = null;\n\n /**\n * Nextup Slate\n * @type {VideoPlayerSlate}\n */\n this.nextUpSlate = null;\n\n\n /**\n * CVP's json representation of the video currently loaded converted to an object\n * @type {CVP Video}\n * @defaultvalue null\n */\n this.activeVideoObject = null;\n\n /* \n * Callback overrides to cvp player.\n *\n * *CAUTION*\n * - Overriding callbacks will have adverse effects (missing slates, broken tracking, ads) if custom overrides don't support the same features\n *\n */\n this.callbacks = callbacks || {};\n\n /* callout functions to other apps that want to know when this video player updates */\n this.callouts = {\n onCVPReady: [],\n onContentBegin: [],\n onContentPause: [],\n onContentEnd: [],\n onContentPlayhead: []\n };\n\n this.hedClass\t\t= \"js-vid-hed-\" + this.id;\t\t /* headline class */\n this.dekClass\t\t= \"js-vid-dek-\" + this.id;\t\t /* dek class */\n this.countdownClass = \"js-vid-countdown-\" + this.id; /* ad countdown class */\n \tthis.bylineClass\t= 'js-vid-byline-' + this.id; /* byline class */\n\n /* these get set by a method */\n this.player_elem = null; /* player HTML container element*/\n this.hed_elem = null; /* hed HTML container element*/\n this.dek_elem = null; /* del HTML container element*/\n this.byline_elem = null; /* del HTML container element*/\n this.countdown_elem = null; /* countdown HTML container element*/\n\n this.adStartTime = 0;\n this.trackingcontext = 'main';\n this.videoStartTime = 0;\n\n /* flags */\n this.canPlay\t\t\t= false; /* controls whether or not to start the embed process */\n this.maximizeAndroid\t= false; /* controls whether or not we should try to use flash on android to maximize viewers */\n this.isPlaying\t\t\t= false;\n this.isPaused\t\t\t= false;\n this.isAdPlaying\t\t= false;\n this.isHTML5\t\t\t= false;\n this.playlistloaded\t\t= false;\n this.isReplay\t\t\t= false;\n this.autoPaused = false; /* flag to determine if we're programatically pausing the player */\n this.playBackStarted = false; /* flag to determine if we've ever started video playback */\n\n /* \n * Autostart tracking is a measure of intent -- Did the user want to see this video?\n update 2014-10-1: MNYGEN-3783:\n - Set to true for all videos that autostart. That viewer did not initiate.\n - all players that autostart\n - all videos that play in a playlist after\n - NOT replayed video\n Note: in the past we used to consider this a measure of \"intent\" so a video that autostarted\n on an article .top was not considered autostart because the user clicked on the article page and\n intended to view the content. Changed since MNYGEN-3783\n */\n this.autostart_tracking = false;\n\n this.viewability_pinner = null;\n\n /**\n * keyword \"this\" points to the CVP created object\n * @access private\n */\n var default_callbacks = {\n onPlayerReady: function(playerId) \n {\n _self.setHTML5flag();\n },\n\n onAdSetup: function (/*playerId*/) \n {\n try\n {\n AmazonDirectMatchBuy.setAdKeyValuePairs(this);\n AmazonDirectMatchBuy.requestAdRefresh();\n }\n catch(e)\n {\n console.log(\"Error in onAdSetup with AmazonDirectMatchBuy. - \" + e);\n }\n }, \n\n onCVPReady: function() \n {\n /* define player html elements */\n try { _self.setplayerElems(); } \n catch (e) {}\n\n \n var firstVideo = _self.play_list.getItem(_self.firstVideoId);\n if(firstVideo != null)\n {\n \t/* set the pointer to the desired video */\n \t_self.play_list.setPointer(firstVideo.id);\n \t\n \t/* pull the pointer back 1 position so playNext() finds it */\n \t_self.play_list.prevItem();\n }\n \n \n /* play the first video */\n try { _self.playNext(); } \n catch (e) { VideoPlayer.utils.log('Error trying to play first video fron onCVPReady'); }\n\n\n /* Viewability: setup */\n try{\n /* only setup for story top */\n if(_self.vidloc == 'top') {\n _self.viewability_pinner = new ViewabilityVideo;\n _self.viewability_pinner.init();\n }\n }catch(e) {console.log('onCVPReady: Video Viewability setup: ' + e.message)}\n\n\n /* handle any callouts that may be registered */\n if (_self.callouts.onCVPReady.length > 0) \n {\n for (var i = 0; i < _self.callouts.onCVPReady.length; i++) \n {\n try \n { \n var _f = _self.callouts.onCVPReady[i];\n if (typeof(_f) === 'function') \n {\n /* pass the player id */\n _f(_self.id);\n }\n } \n catch (e) \n {\n \tVideoPlayer.utils.log(\"Error running callout - \" + e);\n }\n }\n }\n },\n\n\n onAdPlay: function(playerId, token, mode, id, duration, blockId, adType) \n {\n try {\n var vdata = this.getContentEntry(this.getContentId());\n var analyticsAdtype = 'video-'+adType; /* video-preroll, video-midroll, video-postroll */\n vdata = window.JSON.parse(vdata); \n vdata.video_collection = _self.play_list.getItem(this.getContentId()).collection;\n vdata.cnnOmniture_prop14 = vdata.cnnOmniture_source = _self.contentpage.cnnOmniture_prop14;\n vdata.cnnOmniture_prop19 = _self.contentpage.cnnOmniture_prop19;\n vdata.cnnOmniture_prop24 = vdata.cnnOmniture_playername = _self.contentpage.cnnOmniture_prop24;\n _self.contentpage.sendVideoEvent(vdata, analyticsAdtype, playerId);\n } \n catch (e) { VideoPlayer.utils.log(\"error in onAdPlay - \" + e); }\n\n _self.adStartTime = new Date();\n _self.isAdPlaying = true;\n _self.adcountdown_start(duration);\n\n /* Viewability: pin to screen */\n // try{\n // _self.viewability_pinner.pin_style2();\n // }catch(e) {console.log('onAdPlay: Video Viewability pinning: ' + e.message)}\n },\n\n onAdPlayhead: function(playerId, playhead, duration) \n {\n _self.adcountdown_update(duration - playhead);\n },\n\n onAdEnd: function(playerId, token, mode, id, blockId, adType) \n {\n try\n {\n var vdata = this.getContentEntry(this.getContentId());\n vdata = window.JSON.parse(vdata);\n vdata.adType = adType;\n vdata.video_collection = _self.play_list.getItem(this.getContentId()).collection;\n _self.contentpage.sendVideoEvent(vdata, \"video-adcomplete\", playerId);\n }\n catch (e) { VideoPlayer.utils.log(\"error in onAdEnd - \" + e); }\n\n _self.adStartTime = 0;\n _self.isAdPlaying = false;\n _self.adcountdown_remove();\n },\n\n onContentBegin: function(playerId, contentId) \n {\n _self.playBackStarted = true;\n _self.hideSlates();\n _self.videoStartTime = new Date();\n _self.isPlaying = true;\n\n /* setAdSection: too late to be setting here. */\n try \n {\n /* get the json, parse it, store it */\n _self.activeVideoObject = window.JSON.parse(this.getContentEntry(contentId));\n\n /* callout to setADBPValues(). Need to find a better way for this */\n if (typeof(setADBPValues) === 'function') {\n setADBPValues(_self, _self.activeVideoObject, contentId);\n }\n } \n catch (e) \n {\n console.warn(\"Error in onContentBegin, trying to get json data to set ADBP values\" + e.message);\n }\n\n /* On content resume: pause all other players.\n * Note: using _self.id vs playerId because playerId returns wrong id (last embedded id?)\n */\n try { VideoPlayerManager.pauseplayers(_self.id); } \n catch(e) { VideoPlayer.utils.log('pauseplayers' + e.message); }\n\n\n /* Update Hed, Dek, byline, and sharetools if it's not the first video or if it is the first video only if updateFirstHed is true */\n try { \n if (0 < _self.play_list.pointer || _self.isReplay || (0 == _self.play_list.pointer && _self.updateFirstHed) ) \n {\n _self.updateexternalitems(_self.activeVideoObject);\n }\n } \n catch (e) { VideoPlayer.utils.log('update:' + e.message); }\n\n\n /* Autostart tracking switch.\n * @see autostart_tracking above for criteria\n */\n try \n {\n /* autostart is true for \n - videos that autoplay from playlist \n - If first video then check the autoplay property \n - never for replayed videos\n */\n if ( (0 < _self.play_list.pointer || _self.autoplay) && !_self.isReplay) \n {\n _self.trackingcontext = 'autostart';\n this.switchTrackingContext(_self.trackingcontext);\n } \n else \n {\n _self.trackingcontext = 'main';\n this.switchTrackingContext(_self.trackingcontext);\n }\n //VideoPlayer.utils.log(\"Tracking Context set to: \" + _self.trackingcontext)\n } catch (e) {}\n\n /* \n * load playlist - load after first video begins to play.\n */\n try {\n if (!_self.playlistloaded) {\n _self.loadplaylist();\n }\n } catch (e) {}\n\n /* handle any callouts that may be registered */\n if (_self.callouts.onContentBegin.length > 0) \n {\n for (var i = 0; i < _self.callouts.onContentBegin.length; i++) \n {\n try \n {\n var _f = _self.callouts.onContentBegin[i];\n if (typeof(_f) === 'function') \n {\n _f(_self.id, contentId);\n }\n } \n catch (e) \n {\n VideoPlayer.utils.log(\"Error running callout - \" + e);\n }\n }\n }\n },\n\n onContentPlay: function(playerId, contentId) {\n try {\n var vdata = this.getContentEntry(contentId);\n vdata = window.JSON.parse(vdata);\n vdata.video_length = _self.activeVideoObject.trt || 3; //trt MNYGEN-1667\n vdata.video_publish_date = _self.activeVideoObject.dateCreated.text.replace(/\\//g, \"-\") || ''; //publish date. MNYGEN-1667\n vdata.video_collection = _self.play_list.getItem(contentId).collection;\n vdata.cnnOmniture_prop14 = vdata.cnnOmniture_source = _self.contentpage.cnnOmniture_prop14;\n vdata.cnnOmniture_prop19 = _self.contentpage.cnnOmniture_prop19;\n vdata.cnnOmniture_prop24 = vdata.cnnOmniture_playername = _self.contentpage.cnnOmniture_prop24;\n try { if ('autostart' == _self.trackingcontext) { vdata.is_auto = 1; } } \n catch (e) {}\n _self.contentpage.sendVideoEvent(vdata, \"video-start\", playerId);\n } catch (e) {\n VideoPlayer.utils.log('Error on contentplay : video-start: ' + e.message);\n }\n\n /* Viewability: pin to screen */\n try{\n _self.viewability_pinner.pin_style2();\n }catch(e) {console.log('onContentPlay: Video Viewability pinning: ' + e.message)}\n\n },\n /* Fired when the player is paused or resumed. */\n onContentPause: function(playerId, contentId, paused) \n {\n /* ADBP Tracking */\n try {\n var vdata = this.getContentEntry(contentId);\n vdata = window.JSON.parse(vdata);\n vdata.paused = paused; \n vdata.video_collection = _self.play_list.getItem(contentId).collection;\n vdata.cnnOmniture_prop14 = vdata.cnnOmniture_source = _self.contentpage.cnnOmniture_prop14;\n vdata.cnnOmniture_prop19 = _self.contentpage.cnnOmniture_prop19;\n vdata.cnnOmniture_prop24 = vdata.cnnOmniture_playername = _self.contentpage.cnnOmniture_prop24;\n _self.contentpage.sendVideoEvent(vdata, \"video-pause\", playerId);\n } catch (e) {\n VideoPlayer.utils.log(\"error in onContentPause - \" + e);\n }\n\n\n /* On content resume: pause all other players.\n * Note: using _self.id vs playerId because playerId returns wrong id (last embedded id?)\n */\n if (!this.isPaused()) \n {\n VideoPlayerManager.pauseplayers(_self.id);\n _self.isPlaying = true;\n _self.isPaused = false;\n } \n else \n {\n /* Paused */\n _self.isPlaying = false;\n _self.isPaused = true;\n }\n\n\n /* handle any callouts that may be registered */\n if (_self.callouts.onContentPause.length > 0) \n {\n for (var i = 0; i < _self.callouts.onContentPause.length; i++) \n {\n try \n {\n var _f = _self.callouts.onContentPause[i];\n if (typeof(_f) === 'function') \n {\n _f(_self.id, contentId, paused);\n }\n } \n catch (e) \n {\n VideoPlayer.utils.log(\"Error running callout - \" + e);\n }\n }\n }\n },\n \n onContentBuffering: function(playerId, contentId, buffering) \n {\n /* ADBP Tracking */\n try {\n var vdata = this.getContentEntry(contentId);\n vdata = window.JSON.parse(vdata);\n vdata.buffering = buffering;\n vdata.video_collection = _self.play_list.getItem(contentId).collection;\n vdata.cnnOmniture_prop14 = vdata.cnnOmniture_source = _self.contentpage.cnnOmniture_prop14;\n vdata.cnnOmniture_prop19 = _self.contentpage.cnnOmniture_prop19;\n vdata.cnnOmniture_prop24 = vdata.cnnOmniture_playername = _self.contentpage.cnnOmniture_prop24;\n _self.contentpage.sendVideoEvent(vdata, \"video-buffer\", playerId);\n } catch (e) {\n VideoPlayer.utils.log(\"error in onContentBuffering - \" + e);\n }\n },\n onTrackingContentSeek: function(playerId, dataObj) \n {\n /* ADBP Tracking */\n try {\n var vdata = this.getContentEntry(this.getContentId());\n vdata = window.JSON.parse(vdata);\n vdata.video_collection = _self.play_list.getItem(contentId).collection;\n vdata.cnnOmniture_prop14 = vdata.cnnOmniture_source = _self.contentpage.cnnOmniture_prop14;\n vdata.cnnOmniture_prop19 = _self.contentpage.cnnOmniture_prop19;\n vdata.cnnOmniture_prop24 = vdata.cnnOmniture_playername = _self.contentpage.cnnOmniture_prop24;\n _self.contentpage.sendVideoEvent(vdata, \"video-scrub\", playerId);\n } catch (e) {\n VideoPlayer.utils.log(\"error in onTrackingContentSeek - \" + e);\n }\n },\n onContentPlayhead: function(playerId, contentId, playhead, duration) \n {\n /* ADBP Tracking */\n try {\n var vc = new _self.contentpage._jsmd.plugin.gMONVideoCollection();\n if (playhead > (duration / 2) && vc.get(playerId, \"hasScrubbed\") == false && vc.get(playerId, \"pastHalf\") == false) {\n var vdata = this.getContentEntry(contentId);\n vdata = window.JSON.parse(vdata); \n vdata.video_collection = _self.play_list.getItem(contentId).collection;\n vdata.cnnOmniture_prop14 = vdata.cnnOmniture_source = _self.contentpage.cnnOmniture_prop14;\n vdata.cnnOmniture_prop19 = _self.contentpage.cnnOmniture_prop19;\n vdata.cnnOmniture_prop24 = vdata.cnnOmniture_playername = _self.contentpage.cnnOmniture_prop24;\n _self.contentpage.sendVideoEvent(vdata, \"video-fifty_percent\", playerId);\n }\n } catch (e) {\n VideoPlayer.utils.log(\"error in onContentPlayhead - \" + e);\n }\n \n\n /* handle any callouts that may be registered */\n if (_self.callouts.onContentPlayhead.length > 0) \n {\n for (var i = 0; i < _self.callouts.onContentPlayhead.length; i++) \n {\n try \n {\n var _f = _self.callouts.onContentPlayhead[i];\n if (typeof(_f) === 'function') \n {\n _f(_self.id, contentId, playhead, duration);\n }\n } \n catch (e) \n {\n VideoPlayer.utils.log(\"Error running callout - \" + e);\n }\n }\n }\n },\n\n onContentEnd: function(playerId, contentId) \n {\n /* ADBP Tracking */\n try {\n var vdata = this.getContentEntry(contentId);\n vdata = window.JSON.parse(vdata); \n vdata.video_collection = _self.play_list.getItem(contentId).collection; \n vdata.cnnOmniture_prop14 = vdata.cnnOmniture_source = _self.contentpage.cnnOmniture_prop14;\n vdata.cnnOmniture_prop19 = _self.contentpage.cnnOmniture_prop19;\n vdata.cnnOmniture_prop24 = vdata.cnnOmniture_playername = vdata.cnnOmniture_playername = _self.contentpage.cnnOmniture_prop24;\n _self.contentpage.sendVideoEvent(vdata, \"video-complete\", playerId);\n } catch (e) {\n VideoPlayer.utils.log(\"error in onContentEnd - \" + e);\n }\n\n _self.isPlaying = false;\n _self.isReplay = false;\n\n \tif (!_self.play_list.hasMoreItems() && _self.play_list.mode === VideoPlaylist.MODES.REPEAT)\n \t{\n \t\t_self.play_list.resetPointer();\n \t}\n \t\n /* show the next slate */\n try \n { \t\n if (!_self.showSlate()) \n {\n _self.playNext();\n }\n } \n catch (e) \n {\n /* Slate failed to show so lets try to playNext\n * If slate class is missing or has errors then showSlate should error out\n */\n VideoPlayer.utils.log(\"Couldn't load slate - \" + e.message);\n _self.playNext();\n }\n\n /* handle any callouts that may be registered */\n if (_self.callouts.onContentEnd.length > 0) {\n for (var i = 0; i < _self.callouts.onContentEnd.length; i++) {\n try {\n var _f = _self.callouts.onContentEnd[i];\n if (typeof(_f) === 'function') {\n _f(_self.id, contentId);\n }\n } catch (e) {\n VideoPlayer.utils.log(\"Error running callout - \" + e);\n }\n }\n }\n },\n\n\n onContentReplayRequest: function(playerId, contentId, additionalParams) {\n /* VideoPlayer.utils.log(\"In replay request callback\") */\n _self.isReplay = true;\n _self.trackingcontext = 'main';\n this.switchTrackingContext(_self.trackingcontext);\n },\n\n onContentEntryLoadError: function(playerId, contentId, errorMessage, errorCode, queue) {\n _self.handleContentError('onContentEntryLoadError', playerId, contentId, errorMessage);\n },\n onContentError: function(playerId, contentId, errorMessage) {\n _self.handleContentError('onContentError', playerId, contentId, errorMessage);\n },\n\n\n\n /* visibility callbacks */\n onCVPVisibilityChange: function(playerId, visible) {},\n onPageVisibilityChange: function(playerId, visible) {},\n onViewportVisibilityChange: function(playerId, visible) {},\n\n /* ads callbacks */\n onAdError: function(playerId, errorMessage) {},\n onAdPrerollUrl: function(playerId, contentId) {},\n onAdPostrollUrl: function(playerId, contentId) \n {\n \tVideoPlayer.utils.log(\"postroll url coming in for - \" +contentId);\n \treturn false; \n },\n onAdSensitive: function(playerId, contentId) {},\n\n /* content callbacks */\n onContentEntryLoad: function(playerId, contentId, isQueue) {},\n onContentResize: function(playerId, width, height) {},\n onContentVolume: function(playerId, muted, volume) {\n /* _self.volumeChange(playerId, muted, volume); */\n },\n onContentBitrateInfo: function(playerId, currentBitrateId, maxBitrateId, currentBitrate) {},\n onContentBitrateChangeStart: function(playerId, currentBitrateId, maxBitrateId, currentBitrate) {},\n onContentBitrateChangeEnd: function(playerId, currentBitrateId, maxBitrateId, currentBitrate) {},\n onContentBitrateChangeError: function(playerId, error, currentBitrateId, maxBitrateId, currentBitrate) {},\n onContentComplete: function(playerId, contentId) {},\n onContentMetadata: function(playerId, contentId, duration, width, height) {},\n onContentQueue: function(playerId, queue) {},\n onContentQueueAutoplay: function(playerId, autoplay) {},\n\n /* tracking callbacks */\n onTrackingAdStart: function(playerId, dataObj) {},\n onTrackingAdComplete: function(playerId, dataObj) {},\n onTrackingAdProgress: function(playerId, dataObj) {},\n onTrackingAdCountdown: function(playerId, dataObj) {},\n onTrackingAdClick: function(playerId, dataObj) {},\n onTrackingContentPlay: function(playerId, dataObj) {},\n onTrackingContentBegin: function(playerId, dataObj) {},\n onTrackingContentProgress: function(playerId, dataObj) {},\n onTrackingContentComplete: function(playerId, dataObj) {},\n onTrackingContentReplay: function(playerId, dataObj) {},\n onTrackingContentSegmentPlay: function(playerId, dataObj) {},\n onTrackingContentSegmentComplete: function(playerId, dataObj) {},\n onTrackingFullscreen: function(playerId, dataObj) {},\n onTrackingMuted: function(playerId, dataObj) {},\n onTrackingPaused: function(playerId, dataObj) {}\n };\n\n\n /* create cvp object player */\n\n function _init() \n {\n //check if we can play anything.. if not... adios \n if (!VideoPlayer.utils.canPlayFlash() && !VideoPlayer.utils.canPlayHTML5()) \n {\n return;\n }\n\n /* looks like we can play so.. */\n _self.canPlay = true;\n\n /* load the playlist of videos the player was initialized with. */\n _self.play_list.load(_self.temp_list);\n\n\n\n /* setup player metadata */\n _player = {\n id: _self.id,\n width: _self.playerWidth,\n height: _self.playerHeight,\n /*** MNYGEN 6966: force CVP to play HTML5 player ***/\n playerType: VideoPlayer.utils.getBestPlayer(),\n\n flashVars: {\n context: (VideoPlayerManager.ispreview) ? 'preview' : _self.profile,\n autostart: ((!_self.has_poster && !_self.autoplay) || _self.profile === 'twitter') ? 'off' : 'on',\n site: 'cnnmoney',\n profile: _self.flashVarsProfile\n },\n embed: {\n containerSwf: VideoPlayer.utils.getContainerPath(),\n expressInstallSwf: '/.element/apps/cvp2/assets/expressInstall.swf',\n options: {\n quality: 'high',\n bgcolor: '#000000',\n allowFullScreen: 'true',\n allowScriptAccess: 'always',\n wmode: 'transparent'\n }\n }\n };\n\n /*** \n TEMP: MNYGEN 4332: IE8 bug - video doesn't play for IE8 if playerType is set. \n Uncomment line 707 when permanently fixed and remove if block below.\n\n if(navigator.userAgent.toLowerCase().indexOf('msie 8') == -1) {\n _player.playerType = (_self.profile === 'twitter') ? 'html5' : VideoPlayer.utils.getBestPlayer();\n }\n ***/\n\n\n\n /* if freewheel js url was passed in then use */\n if (_self.freewheelJsUrl != '') \n {\n _player.freewheelJsUrl = _self.freewheelJsUrl;\n }\n\n /* callbacks - merge - override defaults or add to callbacks */\n var playercallbacks = default_callbacks;\n for (var c in _self.callbacks) \n {\n playercallbacks[c] = _self.callbacks[c];\n }\n\n /* callback - add to player */\n for (var c in playercallbacks) \n {\n _player[c] = playercallbacks[c];\n }\n\n\n /* Initialize some ADBP vars */\n _self.contentpage.cnnOmniture_prop14 = null;\n _self.contentpage.cnnOmniture_prop19 = null;\n _self.contentpage.cnnOmniture_prop17 = null;\n _self.contentpage.cnnOmniture_prop24 = null;\n\n /* register initial callouts */\n _self.registerCallouts(_self.initial_callouts);\n }\n\n\n this.init = function() \n {\n _player = new CVP(_player);\n\n try\n {\n // Fire-and-pray that it sets key-value-pairs before we get around to playing.\n AmazonDirectMatchBuy.init(); \n }\n catch(e)\n {\n console.log(\"Error while embedding. AmazonDirectMatchBuy = \" + AmazonDirectMatchBuy);\n }\n\n setTimeout(function() {\n _self.embed();\n }, 250);\n /* this.embed(); */\n };\n\n\n /**\n * Loads videos from xml file found in defaultSection.\n */\n this.loadplaylist = function() \n {\n /*\n * This function is repeatedly called from oncontentready callback.\n * So we need a way to limit how many times it actually executes.\n */\n if (this.playlistloaded) \n {\n return;\n }\n\n\n /* load videos from video auto_playlist flag is set */\n if (this.auto_playlist) \n {\n /* this forces all players of these profiles to have a playlist IF auto_playlist is set */\n if (this.defaultSection == null && (this.profile == 'story' || this.profile == 'wp_blogs')) \n {\n var firstVideoId = this.play_list.getFirstItemId();\n var playlistItem = this.play_list.getItem(firstVideoId);\n var branding = (playlistItem.branding !== undefined) ? playlistItem.branding : '';\n var category = (playlistItem.category !== undefined) ? playlistItem.category : '';\n\n this.defaultSection = VideoPlayer.utils.getDefaultSection(branding, category);\n }\n\n\n\n /* If theres a defaultSection to get... */\n if (this.defaultSection != null) \n {\n /* \n * MNYGEN-2685\n * If profile is a story video player, then lets check to see if there are any sensitive videos in the list yet.\n * The list at this point should be only the curated playlist.\n * This will set the limit of the playlist to stop at the sensitive video.\n */\n if (this.profile === 'story') \n {\n for (var i = 0; i < this.play_list.list.length; i++) \n {\n if (this.play_list.list[i].adSensitive === 'yes') \n {\n this.playlistloaded = true;\n this.play_list.setLimit(this.play_list.list.length);\n return;\n }\n }\n }\n\n\n\n /*\n * Make an async request for defaultSection XML content.\n */\n VideoPlayer.utils.getPayload(this.defaultSection, true, 'xml', 'defaultplaylist', {\n success: function(reqId, data, textStatus, jqXHR) {\n var playlist = [];\n var $xmldata = jQuery(data);\n var $video = $xmldata.find('video');\n\n for (i = 0; i < $video.length; i++) {\n var videoId = $video.eq(i).find(\"id\").text();\n var headline = $video.eq(i).find(\"headline\").text();\n var dek = $video.eq(i).find(\"description\").text();\n if (videoId != '' && headline != '') \n {\n if ('/' != videoId.charAt(0)) \n {\n videoId = '/' + videoId;\n }\n \n playlist.push({\n 'id': videoId,\n 'hed': headline,\n 'dek': dek\n });\n }\n }\n\n _self.play_list.append(playlist);\n },\n error: function(reqId, jqXHR, textStatus, errorThrown) {}\n });\n }\n }\n\n this.playlistloaded = true;\n };\n\n this.mute = function()\n {\n try\n {\n _player.mute();\n }\n catch(e){}\n }; \n\n this.resizeTo = function(width, height) \n {\n try \n {\n document.getElementById(this.id).width = width;\n document.getElementById(this.id).height = height;\n _player.resize(width, height);\n } \n catch (e) \n {\n VideoPlayer.utils.log(\"Error trying to resize to \" + width + \"x\" + height + \" - \" + e);\n }\n };\n\n\n this.hideSlates = function() \n {\n if (!this.disableNextUpSlate) {\n this.nextUpSlate.hide();\n }\n if(!this.disableEndSlate) {\n this.endSlate.hide();\n }\n };\n\n this.setplayerElems = function() \n {\n\n /* set id for player container */\n var player_holderid = 'cnnplayer_' + this.id;\n var cvpplayerobject = document.getElementById(this.id);\n var parent = cvpplayerobject.parentNode;\n var traversals = 0;\n\n do {\n parent = parent.parentNode;\n traversals++;\n } while (parent.className.match('cnnplayer') == null && traversals < 4);\n\n parent.setAttribute('id', player_holderid);\n\n /* set player style breakpoints */\n if (this.playerWidth < 560 && this.playerWidth >= 420) {\n parent.className = parent.className + \" medium-player\";\n } else if (this.playerWidth < 420) {\n parent.className = parent.className + \" small-player\";\n }\n\n /* save player elements */\n this.player_elem\t = parent;\n this.hed_elem\t\t = document.querySelector(\".\" + this.hedClass);\n this.dek_elem\t\t = document.querySelector(\".\" + this.dekClass);\n this.countdown_elem = document.querySelector(\".\" + this.countdownClass);\n this.byline_elem\t = document.querySelector(\".\" + this.bylineClass);\n\n\n /* Slate Setup */\n try \n {\n var playerParent = document.getElementById(this.id).parentNode;\n\n if(!this.disableEndSlate) {\n /* end slate */\n this.endSlate = new VideoPlayerSlate({\n targetNode: playerParent,\n playerId: _self.id,\n type: VideoPlayerSlate.TYPES.END,\n clickTarget: _self.slateClickTarget\n }); \n }\n\n\n if (!this.disableNextUpSlate) {\n /* nextup slate */\n this.nextUpSlate = new VideoPlayerSlate({\n targetNode: playerParent,\n playerId: _self.id,\n type: VideoPlayerSlate.TYPES.NEXTUP,\n clickTarget: _self.slateClickTarget,\n onCountdownComplete: function() {\n //VideoPlayer.utils.log(\"In countdown complete callback for nextup slate\");\n \n try{ _self.playNext(); } \n catch(e) { VideoPlayer.utils.log(\"Error trying to call next video. - \" + e.message); }\n }\n });\n }\n } \n catch (e) \n {\n VideoPlayer.utils.log(\"Error creating slates. \" + e.message);\n }\n\n };\n\n this.unmute = function()\n {\n try\n {\n _player.unmute();\n }\n catch(e){}\n };\n\n /**\n * Update external items\n * Share tools, HTML UI etc.\n */\n this.updateexternalitems = function(vidjson) \n {\n vidjson = vidjson || {};\n var vid = vidjson['id'];\n var hed = (typeof(vidjson.headline) != 'undefined') ? vidjson.headline : '';\n var dek = (typeof(vidjson.description) != 'undefined') ? vidjson.description : '';\n var producer = '';\n var producer_tw = '';\n var producer_icon = '';\n var producer_url = '';\n var producerImg_elem = document.getElementById('js-byline-icon');\n var shareBylineContainer_Elem = document.getElementById('js-share-byline-timestamp');\n var byline_html = '';\n var producerIcon_html = '';\n var shareimageNode = {};\n var shareimage = '';\n\n if ('' != hed) {\n if (null != this.hed_elem) {\n this.hed_elem.innerHTML = hed;\n }\n if (null != this.dek_elem) {\n this.dek_elem.innerHTML = dek;\n }\n }\n\n if (null != this.byline_elem) {\n\n if (typeof(vidjson.producer) != 'undefined') {\n if (typeof(vidjson.producer.name) != 'undefined') {\n producer = (typeof(vidjson.producer.name.text) != 'undefined') ? vidjson.producer.name.text : producer;\n producer_tw = (typeof(vidjson.producer.name['twitterhandle']) != 'undefined') ? vidjson.producer.name['twitterhandle'] : producer_tw;\n producer_icon = (typeof(vidjson.producer.name['icon']) != 'undefined') ? vidjson.producer.name['icon'] : producer_icon;\n producer_url = (typeof(vidjson.producer.name['url']) != 'undefined') ? vidjson.producer.name['url'] : producer_url;\n } else if (typeof(vidjson.producer[0]) != 'undefined' && typeof(vidjson.producer[0].name) != 'undefined') {\n producer = (typeof(vidjson.producer[0].name.text) != 'undefined') ? vidjson.producer[0].name.text : producer;\n producer_tw = (typeof(vidjson.producer[0].name['twitterhandle']) != 'undefined') ? vidjson.producer[0].name['twitterhandle'] : producer_tw;\n }\n }\n\n var byline_html = producer;\n if ('' != producer) {\n /* Update \n 1. Byline name (Producer)\n 2. Byline image icon\n 3. Byline twitter sn\n 4. Update container share-byline container class for layout with/without byline\n */\n if('' != producer_icon) {\n producerIcon_html = '';\n }\n\n if ('' != producer_url) {\n byline_html = '' + byline_html + '';\n producerIcon_html = ''+producerIcon_html+'';\n }\n\n byline_html = 'by ' + byline_html + '';\n\n if ('' != producer_tw) {\n byline_html += '  @' + producer_tw + '';\n }\n\n /* set share-byline container element layout - removing modifier classes */\n shareBylineContainer_Elem.className = shareBylineContainer_Elem.className.replace(/ byline--none/g,'');\n } else {\n /* set share-byline container element layout with modifier classes */\n shareBylineContainer_Elem.className += ' byline--none';\n }\n\n producerImg_elem.innerHTML = producerIcon_html;\n this.byline_elem.innerHTML = byline_html;\n }\n\n /* Update share tools */\n if(this.profile == 'videoclip') {\n if(vidjson.images !== undefined) {\n /* Gradually step down to find next available images (will happen for very old video XML) \n This 5 step incrememnt is completely arbitrary */\n shareimageNode = vidjson.images[15] || vidjson.images[10] \n || vidjson.images[5] || vidjson.images[0] || shareimageNode;\n if(shareimageNode.image !== undefined) {\n shareimage = shareimageNode.image.text || shareimage;\n } \n }\n\n var sharevid = vid.replace('/video/', 'video/'); /* vid has changed from how CVP1 supplied it */\n try {\n cnnUpdateShareWidget({\n \"video_id\": sharevid,\n \"title\": hed,\n \"image\" : shareimage\n });\n } catch (e) {} \n }\n };\n \n /* duration in seconds */\n this.adcountdown_start = function(duration) \n {\n var playerclass = this.player_elem.className;\n playerclass += ' showcountdown';\n this.player_elem.className = playerclass;\n\n\n /* set a interval countdown for HTML5 player since onAdPlayhead() isn't available */\n if (!isNaN(duration) && this.isHTML5) \n {\n var countdown = setInterval(function() {\n _self.countdown_elem.innerHTML = 'Your video will play in ' + VideoPlayer.utils.time_tostring(duration);\n duration--;\n /*remove countdown */\n if (duration < 0) {\n clearInterval(countdown);\n _self.countdown_elem.innerHTML = '';\n playerclass = _self.player_elem.className;\n playerclass = playerclass.replace(' showcountdown', '');\n _self.player_elem.className = playerclass;\n }\n }, 1000);\n }\n\n };\n\n /* Updates HTML ad-countdown */\n this.adcountdown_update = function(duration) \n {\n if (isNaN(duration) || this.isHTML5) {\n return;\n }\n _self.countdown_elem.innerHTML = 'Your video will play in ' + VideoPlayer.utils.time_tostring(duration);\n };\n\n /* Removes ad-countdown HTML markup */\n this.adcountdown_remove = function() \n {\n _self.countdown_elem.innerHTML = '';\n\n var playerclass = this.player_elem.className;\n playerclass = playerclass.replace(' showcountdown', '');\n _self.player_elem.className = playerclass;\n\n /*\n* Update with this code?\n* \ntry\n{\nthis.countdown_elem.innerHTML = '';\nthis.player_elem.className = this.player_elem.className.replace(' showcountdown', '');\n}\ncatch(e)\n{\nVideoPlayer.utils.log(\"Couldn't remove the adcountdown snippet\n}\n*/\n };\n\n\n /**\n * Sets an internal html5 flag.\n * Pulls value from loaded cvp player and not the config value\n *\n * TODO: May not be needed anymore. Check to see if we need it\n */\n this.setHTML5flag = function() \n {\n if (_player.getPlayerType() == 'html5') \n {\n this.isHTML5 = true;\n } \n else \n {\n this.isHTML5 = false;\n }\n };\n\n\n /**\n * Embeds the player onto the page\n */\n this.embed = function() \n {\n _player.embed(this.playerDivId);\n };\n\n\n /**\n * Embeds a needs flash message onto the page\n */\n this.embedNeedsFlash = function() \n {\n try \n {\n var s = '\"\"';\n var elem = document.getElementById(this.playerDivId).parentNode;\n if (elem) {\n elem.innerHTML = s;\n }\n } catch (e) {\n //do nothing\n VideoPlayer.utils.log(\"could not embed flash message - \" + e);\n }\n };\n\n /** \n * Registers callout functions when events fire.\n * This is how other applications can \"hook\" into the video player and be notified of changes\n */\n this.registerCallouts = function(callouts) \n {\n if (typeof(callouts.onCVPReady) === 'function') \n {\n this.callouts.onCVPReady.push(callouts.onCVPReady);\n }\n\n if (typeof(callouts.onContentBegin) === 'function') \n {\n this.callouts.onContentBegin.push(callouts.onContentBegin);\n }\n\n if (typeof(callouts.onContentPause) === 'function') \n {\n this.callouts.onContentPause.push(callouts.onContentPause);\n }\n\n if (typeof(callouts.onContentEnd) === 'function') \n {\n this.callouts.onContentEnd.push(callouts.onContentEnd);\n }\n \n if (typeof(callouts.onContentPlayhead) === 'function') \n {\n this.callouts.onContentPlayhead.push(callouts.onContentPlayhead);\n } \n };\n\n /**\n * Pauses the video player\n * @param {Boolean} userIntent Flag to know if user intended to pause the player\n */\n this.pause = function(autoPaused) \n {\n try\n {\n this.autoPaused = (typeof(autoPaused) == 'boolean') ? autoPaused : false;\n _player.pause();\n }\n catch(e)\n {\n VideoPlayer.utils.log(\"Error trying to pause. - \" +e);\n }\n };\n\n /**\n * Plays the video id passed in.\n * VideoId must already be in the playlist...\n * SSID retrieval must not error out...\n * Set the playlist pointer to the video passed in.\n * IF all checks pass, then we try to play the video.\n *\n * @param {String} id Video id to play\n * @param {Boolean} allowPastLimit Tells the player to allow the playlist to go past the limit if the video trying to play is over the limit flag\n */\n this.play = function(id, allowPastLimit) \n {\n try \n {\n var playListItem = this.play_list.getItem(id);\n if (!playListItem) \n {\n VideoPlayer.utils.log(\"Cannot play \" + id + \" - Not found in playlist.\");\n return;\n }\n } \n catch (e) \n {\n VideoPlayer.utils.log(\"Error accessing playlist in VideoPlayer.play(); - \" + e);\n return;\n }\n\n try \n {\n /* Set the playlist pointer to this video. \n * Note: If this fails, it throws an error and stops before getting to _setAdSection(ssid) below.\n */\n this.play_list.setPointer(id, allowPastLimit);\n\n /* The videoplayer profile property is not guaranteed to be the same as the cvp player's context.\n * Mostly because of video on preview servers. We want the same feature set but need to use a preview context for cvp and keep the profile the same\n * In other words, VideoPlayer.profile and the cvp player.getContext() are the same in published content but probably different in preview content\n */\n var profile = _player.getContext();\n\n /* set FW SSID for the video */\n /* use the player's ssid setting or failover to the normal process */\n var ssid = this.ssid || VideoPlayerAds.get_ssid(profile, id, this.contentpage, playListItem);\n\n /* Determine if the content page is surging. */\n /* Removed on 7th July 2016 */\n /* var isSurging = this.contentpage.CNNMONEY.adTargets.surge || false;\n if(profile === \"story\" && this.play_list.pointer == 0 && isSurging === 'true')\n {\n ssid = \"cnnmoney.com_surge_t1\";\n } */\n\n\n if ('' != ssid) {\n _player.setAdSection(ssid);\n }\n \n /* if setting pointer was successful.. */\n if (this.play_list.getCurrentItemId() === id) \n {\n \t/*\n \t * The setTimeout seems to fix it. MNYGEN-2773\n \t */\n \tsetTimeout(function() {\n \t\t_player.play(id);\n \t}, 100);\n }\n\n try {\n /* Outbrain javscript call\n * before playing the video, we send a call to Outbrain that we are going to play a video\n * Three different scenarios to do\n * 1. exception when profile == videoclip. This type of page is under /video\n * example: /video/smallbusiness/2014/02/04/ban-this-119000-dune-buggy-can-fly.cnnmoney/index.html\n * 2. but even if on videoclip page, we have a playlist and want to send the call for all videos AFTER 1st video\n * 3. in embeded video player like on an article page, when it's appearing in the middle of a page\n */\n if (profile != \"videoclip\") {\n /* contentId comes in the form of: /video/news/2014/11/11/1-billion-divorce.cnnmoney */\n _vrtrack({track_url: 'http://money.cnn.com'+ id});\n } else if (profile == \"videoclip\" && this.play_list.getFirstItemId() != this.play_list.getCurrentItemId()) {\n _vrtrack({track_url: 'http://money.cnn.com'+ id});\n }\n }catch(e) {\n VideoPlayer.utils.log(\"Error in firing _vrtrack \\nid=\" + id + \"\\n\\n\" + e.message);\n }\n\n } \n catch (e) \n {\n VideoPlayer.utils.log(\"Error in VideoPlayer.play()\\nid=\" + id + \"\\n\\n\" + e.message);\n }\n };\n\n\n /**\n * Moves the videoplaylist to the next item and plays the video\n */\n this.playNext = function() \n {\n /* does the playlist have more items from the current position */\n if (this.play_list.hasMoreItems()) \n {\n /* move the pointer into the new position */\n this.play_list.nextItem();\n\n /* get the ID at the new position */\n var nextVideoId = this.play_list.getCurrentItemId();\n\n /* play the video in the new position */\n this.play(nextVideoId);\n } \n else \n {\n /* if there is some kind of content, then show a slate. Otherwise, should end up staying black since nothing has played */\n if (this.play_list.getNumItems() > 0) \n {\n try { this.showSlate(); } \n catch(e){}\n }\n\n }\n };\n\n /**\n * General content error handler for content when thrown by cvp player.\n * Removes the video id, and either plays next video or shows a slate\n * @param {String} type error callback name\n * @param {String} playerId videoplayer id that threw the error\n * @param {String} contentId video id that caused the error\n * @param {String} errorMessage CVP error message\n */\n this.handleContentError = function(type, playerId, contentId, errorMessage) \n {\n switch (type) \n {\n case 'onContentError':\n case 'onContentEntryLoadError':\n VideoPlayer.utils.log(type + \" - \" + contentId + \" - \" +errorMessage);\n\n this.play_list.remove(contentId);\n\n if (this.play_list.hasMoreItems()) \n {\n this.playNext();\n } \n else \n {\n try { this.showSlate(); } \n catch (e) {}\n }\n\n break;\n\n default:\n break;\n }\n };\n\n /**\n * Tells the player to show a slate. The method will try to determine the slate to show\n * @type {Boolean} The return value is whether a slate was shown or not\n * @defaultvalue false\n */\n this.showSlate = function() \n {\n /* if last item in the playlist? */\n if (!this.play_list.hasMoreItems() && this.play_list.mode !== VideoPlaylist.MODES.REPEAT) \n {\n if(!this.disableNextUpSlate) \n {\n this.nextUpSlate.hide();\n }\n\n /* if end slate isn't disabled, then */\n if (!this.disableEndSlate) \n {\n this.endSlate.show(this.play_list);\n return true;\n }\n\n return false;\n } \n else /* otherwise theres more video to play */ \n {\n if (!this.disableEndSlate) \n {\n this.endSlate.hide();\n }\n\n /* if nextup slate isn't disabled, then */\n if (!this.disableNextUpSlate) \n {\n /* nextUpSlate calls playNext */\n this.nextUpSlate.show(this.play_list);\n return true;\n }\n\n return false;\n }\n\n return false;\n };\n\n /**\n * Command to replay the current video\n */\n this.replay = function() \n {\n \ttry\n \t{\n \t\t_player.replay();\t\n \t}\n \tcatch(e)\n \t{\n \t\tvar playlistItemId = this.play_list.getCurrentItemId();\n \t\t\n \t\t/* replay failed, lets try to manually do it */\n this.isReplay = true;\n this.trackingcontext = 'main';\n _player.switchTrackingContext(this.trackingcontext);\n \n this.play(playlistItemId);\n \t}\n \n };\n\n /** \n * Resumes playback from a paused state\n */\n this.resume = function(autoResume) {\n try\n {\n if(!_player.isPaused)\n {\n VideoPlayer.utils.log(\"player.resume() - Player is not paused.\");\n }\n \n /* \n * There is no flag to determine if the user paused the player. \n * We only know that the player is paused, user initiated or programatically initiated.\n * \n * Only auto-resume when autoPaused has been set. This is so we know when a user paused the player on their own.\n */\n if(this.autoPaused === true || autoResume === true)\n {\n _player.resume();\n\n /* reset the flag since its not paused anymore */\n this.autoPaused = false;\n }\n else\n {\n VideoPlayer.utils.log(\"Cannot resume playback. Player is not autoPaused.\");\n } \n }\n catch(e)\n {\n VideoPlayer.utils.log(\"Error trying to resume playback. - \" + e.message);\n }\n };\n\n /**\n * Returns the actual current playtime of the current video\n */\n this.getCurrentPlayTime = function() \n {\n return parseInt(_player.getPlayhead()) * 1000;\n };\n\n\n /**\n * Queues videos into the video player.\n * @deprecated\n */\n this.queue = function(vid) { /* _player.queue(vid); */ };\n\n /**\n * Clears the videoplayer queue\n * @deprecated\n */\n this.emptyQueue = function() { /* _player.emptyQueue(); */ };\n\n /**\n * Seeks video to a specified second\n * @deprecated\n */\n this.seek = function(sec) { /* _player.seek(sec); */ };\n\n\n\n\n _init();\n}\n\n\n\n/*\n//Typical Video item\n{\nid : \"\",\nimg : \"\",\nheadline : \"\",\ndek : \"\",\nimg : \"\",\nssid : \"\",\nbranding : \"\",\nsection : \"\",\nsource : \"\"\n}\n*/\n\n\n/* requires js/lib/videoplayer/3.0/videoplayer.utils.js */\n\n\n\nVideoPlayer.utils = {\t\n\t\t\n\tisSecure : (location.protocol === \"https:\") ? true : false,\t\n\t\t\t\t\n\t/**\n\t * Checks if device can play flash with a minimum version \n\t */\n\tcanPlayFlash : function()\n\t{\t\t \n\t\tif (typeof CVP.swfobject == \"object\" && CVP.swfobject.hasFlashPlayerVersion(\"9.0\")) \n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\treturn false;\t\t\t\n\t},\t\t\n\t\n\t/**\n\t * Checks if device can play HTML5 video\n\t */\n\tcanPlayHTML5 : function()\n\t{\n\t\tvar canPlay = false;\n\t\n\t\ttry\n\t\t{\n\t\t var v = document.createElement('video');\n\t\t if(v.canPlayType && v.canPlayType('video/mp4').replace(/no/, ''))\n\t\t {\n\t\t canPlay = true;\n\t\t }\n\t\t v = null;\n\t\t}\n\t\tcatch(e)\n\t\t{\n\t\t\t//failed or some other error\n\t\t\tcanPlay = false;\n\t\t}\n\t\t\n\t\treturn canPlay;\n\t},\n\t\n\tgetBestPlayer : function()\n\t{\n\t\tvar ua = window.navigator.userAgent;\n \n if( ua.indexOf('MSIE ') === -1 && ua.indexOf('Trident/') === -1 && ua.indexOf('Edge/') === -1 ){\n \treturn 'html5';\n }\n else{\n \treturn 'flash';\n }\n\n\t},\n\t\n\tgetContainerPath : function()\n\t{ \n\t\tvar env = {\n\t\t\tdev :'/.element/apps/cvp2/assets/cvp_main_container.swf',\n\t\t\tpro:'https://cdn.cnn.com/money/.element/apps/cvp2/assets/cvp_main_container.swf',\n\t\t\tpro_secure : 'https://s.cdn.turner.com/money/.element/apps/cvp2/assets/cvp_main_container.swf'\n\t\t};\n\n\t\tvar uri = env['pro'];\n\t\tswitch(location.hostname)\n\t\t{\n\t\t\tcase 'money.cnn.com':\n\t\t\t\turi = env['pro'];\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'secure.money.cnn.com':\n\t\t\t\turi = env['pro_secure'];\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tdefault:\n\t\t\t\turi = env['dev'];\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\treturn uri;\t\t\n\t},\n\n\t/**\n\t * Get a default section for a given video.\n\t */\n\tgetDefaultSection : function(branding, category)\n\t{\n\t\tvar defaultSection = \"/.element/ssi/auto/4.0/video/xml/latest.xml\";\n\t\tvar secondaryList = [\"fortune\", \"luxury\", \"markets\", \"moneymag\", \"news\", \"pf\", \"smallbusiness\", \"technology\", \"luxury\", \"media\"];\t\n\n\t\t/* now apply logic for default section */\n\t\tif(branding != \"\")\n\t\t{\n\t\t\tdefaultSection = \"/.element/ssi/auto/4.0/video/xml/branding/\"+branding+\".xml\";\t\n\t\t}\n\t\t/* no branding.. get section default */\n\t\telse\t\n\t\t{\n\t\t\t/* overide the latest with section specific */\n\t\t\tfor(var i = 0; i < secondaryList.length; i++)\n\t\t\t{\n\t\t\t\tif(secondaryList[i] == category)\n\t\t\t\t{\n\t\t\t\t\tdefaultSection = \"/.element/ssi/auto/4.0/video/xml/\"+category+\".xml\";\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\t\n\t\t\n\t\treturn defaultSection;\n\t\t\n\t},\n\t\n\tgetPosterImage : function(images, width)\n\t{\n\t\tvar defaultPoster = ((VideoPlayer.utils.isSecure) ? \"https://s.\" : \"http://i2.\") + \"cdn.turner.com/money/.element/img/4.0/video/default_thumbs/cnnmoney.620x348.jpg\";\n\t\t\n\t\tfor(var key in images)\n\t\t{\n\t\t\t/* if the key starts with the width then we found it */\n\t\t\tif(key.indexOf(width+\"x\") === 0)\n\t\t\t{\n\t\t\t\tvar _img = new Image();\n\t\t\t\t_img.src = images[key];\n\t\t\t\treturn _img;\n\t\t\t}\n\t\t}\n\t\t\n\t\t/* we made it this far so we didn't find the image. Lets look for something close */\n\t\t/* assumes:\n\t\t * \t1 - images is an array of img uris\n\t\t * 2 - images array is in width size order\n\t\t * \n\t\t * Assuming smaller images than the requested width exist, we start looping\n\t\t */\n\t\tvar smallerImage = '';\n\t\tvar largerImage = '';\n\n\t\t/* loop on images. The key is the dimensions of the image */\n\t\tfor(var key in images)\n\t\t{\n\t\t\tvar k = key.split(\"x\");\n\t\t\tvar w = k[0]; /* width */\n\t\t\tvar h = k[1]; /* height */\n\t\t\t\n\t\t\t/* if image width is <= to desired width then \n\t\t\t * \tset then smallerImage variable and continue with the loop. \n\t\t\t * This way if we find another smaller image, it should be \"bigger\" than the one already found... getting us closer to the desired size \n\t\t\t */\n\t\t\tif(w <= width)\n\t\t\t{\n\t\t\t\tsmallerImage = images[key];\n\t\t\t}\n\t\t\t\n\t\t\t/* if image width is >= to desired width then \n\t\t\t * \tset then largerImage variable and break out of the loop because we found the next suitable size up \n\t\t\t */\n\t\t\tif(w >= width)\n\t\t\t{\n\t\t\t\tlargerImage = images[key];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\t\t\n\t\t\n\t\t/* create the dom image obj so its cached */\n\t\tvar _img = new Image();\n\t\t\n\t\tif(largerImage !== '')\t\t\t/* Preferred image is larger so if we found one, then return it */\n\t\t{\n\t\t\t_img.src = largerImage;\n\t\t}\n\t\telse if(smallerImage !== '') /* if we found a smaller image, then return it */ \n\t\t{\n\t\t\t_img.src = smallerImage;\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\t_img.src = defaultPoster;\t\t\t\n\t\t}\n\n\t\treturn _img;\n\t\t\n\t},\n\t\n\t/**\n\t * Gets image uri's based on inputs\n\t * @param {jQuery xmlSnippet} $images\n\t * @param {Array} sizes\n\t */\n\tgetImages : function($images, sizes)\n\t{\n\t\tif(sizes === undefined)\n\t\t{\n\t\t\tvar sizes = ['160x90', '576x324', '620x348', '1024x576', '1280x720'];\t\n\t\t}\n\t\t\n\t\tvar images = {};\n\t\t\n\t\tfor(var i = 0; i < $images.length; i++)\n\t\t{\n\t\t\tfor(var s = 0; s < sizes.length; s++)\n\t\t\t{\n\t\t\t\tvar _dim = sizes[s].split(\"x\");\n\t\t\t\tvar desiredWidth = _dim[0];\n\t\t\t\t\n\t\t\t\tvar $img = jQuery($images[i]);\n\t\t\t\tif( $img.text().match(sizes[s]) || $img.attr(\"width\") == desiredWidth )\n\t\t\t\t{\n\t\t\t\t\timages[sizes[s]] = (VideoPlayer.utils.isSecure) ? $img.text().replace(\"http://i2.\", \"https://s.\") : $img.text();\n\t\t\t\t}\t\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn images;\n\t},\t\n\t\t\t\n\tgetPayload : function(uri, async, dataType, id, callbacks)\n\t{ \n\t\t/* sanitize for the crazy */\n\t\turi = uri.replace('4.0video', '4.0/video');\n\t\turi = uri.replace('4.0//video', '4.0/video');\n\t\t\n\t\tjQuery.ajax({\n\t\t\treqId : id,\n\t\t\tasync : async,\n\t\t\tdataType: dataType,\n\t\t\turl : uri,\n\t\t\tsuccess: function(data, textStatus, jqXHR ) \n\t\t\t{\n\t\t\t\tif(typeof(callbacks.success) == 'function')\n\t\t\t\t{\n\t\t\t\t\tcallbacks.success(this.reqId, data, textStatus, jqXHR);\n\t\t\t\t} \n\t\t\t},\n\t\t\terror: function (jqXHR, textStatus, errorThrown) \n\t\t\t{\t\n\t\t\t\tif(typeof(callbacks.error) == 'function')\n\t\t\t\t{ \n\t\t\t\t\tcallbacks.error(this.reqId, jqXHR, textStatus, errorThrown);\n\t\t\t\t}\n\t\t\t}\n\t\t});\t\t\t\t\n\t},\n\n\tlog : function(s)\n\t{\n\t\ttry{ console.log(s); }\n\t\tcatch(e){}\n\t},\n\t\n\twarn : function(s)\n\t{\n\t\ttry{ console.warn(s); }\n\t\tcatch(e){}\t\t\n\t},\t\n\t\n\tsecureHost : function(src)\n\t{\n if(src.indexOf(\"https://ht.cdn.turner.com/money/big/ads/\") === 0)\n {\n \tsrc = src.replace(\"https://ht.cdn.turner.com/money/big/ads/\", \"https://secure.money.cnn.com/big/ads/\");\n } \n src = src.replace(/http:/g, \"https:\");\n src = src.replace(/http\\%/g, \"https%\");\n \n return src;\n\t},\t\n\n\t/**\n\t * return secs in format of hh:mm:ss\n\t */\n\ttime_tostring : function(totalsecs) \n\t{\n\t\tvar timedisplay = '';\n\t\tvar totalsecs = Math.round(totalsecs);\n\t\tvar hours\t= Math.floor(totalsecs/3600);\n\t\tvar mins\t= Math.floor((totalsecs - (hours*3600)) / 60);\n\t\tvar seconds\t= totalsecs - (hours*3600) - (mins*60);\n\t\t\t\n\t\t\n\t\tif(hours > 0){\n\t\t\tif(hours < 10) {timedisplay += '0';}\n\t\t\ttimedisplay += hours;\n\t\t}\n\t\tif(mins > 0){\n\t\t\ttimedisplay += \":\";\n\t\t\tif(mins < 10) {timedisplay += '0';}\n\t\t\ttimedisplay += mins;\n\t\t}else {\n\t\t\ttimedisplay += \"00\";\n\t\t}\n\t\t\n\t\ttimedisplay += \":\";\n\t\tif(seconds < 10) {timedisplay += '0';}\n\t\t\n\t\ttimedisplay += seconds;\n\t\t\n\t\treturn timedisplay;\n\t}\t\n\t\n};\n\n/* requires js/lib/videoplayer/3.0/videoplayer.playlist.js */\n\n/**\n * @class\n * A typical playlist class

    \n * @param {int} limit The max number of items the playlist supports
    \n */\n\nfunction VideoPlaylist(limit, mode)\n{\t\t\n\tvar _self = this;\n\t\n\tthis.list\t\t = [];\n\tthis.pointer\t = -1;\t\t\t/* The index of the internal list of items */\n\tthis.limit\t\t = limit || 7;\t/* The max limit of playlist-items to support, @default 7 */\n\tthis.endOfList\t = true;\n\tthis.mode\t\t = mode || 'normal'; \n\t\n\t/*\n\t * This is a really dirty way of keeping uniques but hey it works.. \n\t */\n\tfunction _sanitize(list)\n\t{\n\t\t/* store as array of ids, to make looping simpler. */\n\t\tvar temp_list = [];\t\t\n\t\tfor(var i = 0; i < list.length; i++)\n\t\t{\n\t\t\t/*\n\t\t\t * Force each playlist item to have an id property\n\t\t\t */\n\t\t\tif(list[i].id === undefined)\n\t\t\t{ \n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t/*\n\t\t\t * Force each id to start with /\n\t\t\t */\n\t\t\tif('/' != list[i].id.charAt(0)) {\n\t\t\t\tlist[i].id = '/' + list[i].id;\n\t\t\t}\n\t\t\t\n\t\t\ttemp_list[i] = list[i].id;\n\t\t}\n\t\t\n\t\t/*\tstore the first item, since it can't be a duplicate */\n\t\tvar playlist = [];\t\t\n\t\tplaylist.push(list[0]);\n\t\t\n\t\t/*\n\t\t * Here we're cleaning up the list passed in, so that its unique\n\t\t * Only store unique items. loop through remaining items checcking for duplicates. \n\t\t */\n\t\tfor(var i = 1; i < temp_list.length; i++)\n\t\t{\n\t\t\tvar found_dup = false;\n\t\t\tfor(var j = 0; j < playlist.length; j++)\n\t\t\t{\n\t\t\t\tif( temp_list[i].match(playlist[j].id) || playlist[j].id.match(temp_list[i]) )\n\t\t\t\t{\n\t\t\t\t\tfound_dup = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/* item is unique so we store */\n\t\t\tif(found_dup == false)\n\t\t\t{\n\t\t\t\tplaylist.push(list[i]);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn playlist;\t\t\n\t}\n\t\n\t/**\n\t * Appends a new list to the existing playlist\n\t * @param {Array} list \n\t */\n\tthis.append = function(list)\n\t{\n\t\ttry\n\t\t{\n\t\t\t/* are we dealing with an Array */\n\t\t\tif(list.length === undefined) \n\t\t\t{\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\t/* clean up list */\n\t\t\tvar appendList = _sanitize(list);\n\t\t\t\n\t\t\t/* if theres nothing to process.. then bail out */\n\t\t\tif(appendList.length == 0)\n\t\t\t{\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\t/* append to main list.. */\n\t\t\tfor(var i = 0; i < appendList.length; i++)\n\t\t\t{\n\t\t\t\tthis.list.push(appendList[i]);\n\t\t\t}\n\t\t\t\n\t\t\t/* clean up newly merged list */\n\t\t\tvar playlist = _sanitize(this.list);\n\n\t\t\t/* store the playlist */\n\t\t\tthis.list = playlist;\n\t\t\t\n\t\t\t/* get secondary playlist data and drop invalid videos */\n\t\t\tthis.loadPlaylistItemData();\n\t\t\t\n\t\t\t/* finally update EoL flag */\n\t\t\tthis.updateEndOfListFlag();\t\t\t\n\t\t}\n\t\tcatch(e)\n\t\t{\n\t\t\tconsole.log(\"VideoPlaylist could not append new list - \" +e);\n\t\t}\n\t};\n\t\n\t/**\n\t * Gets the current playlist-item\n\t * @returns {String} id\n\t */\t\n\tthis.getCurrentItem = function()\n\t{\n\t\tif(this.list[this.pointer])\n\t\t{\n\t\t\treturn this.list[this.pointer];\t\n\t\t}\n\t\t\n\t\treturn null;\n\t};\n\t\n\t\n\t/**\n\t * Gets the current playlist-item Id\n\t * @returns {String} id\n\t */\n\tthis.getCurrentItemId = function()\n\t{\n\t\tif(this.list[this.pointer])\n\t\t{\n\t\t\treturn this.list[this.pointer].id;\t\n\t\t}\n\t\t\n\t\treturn '';\t\n\t};\n\t\n\t/**\n\t * Gets the first playlist-item Id\n\t * @returns {String} id\n\t */\t\n\tthis.getFirstItemId = function()\n\t{\n\t\tif(this.list.length > 0)\n\t\t{\n\t\t\treturn this.list[0].id;\t\n\t\t}\n\t\t\n\t\treturn '';\n\t};\n\t\n\t/**\n\t * Get the index of the current playist-item\n\t * @param {String} id\n\t * @returns {int|null}\n\t */\n\tthis.getIndex = function(id)\n\t{\n\t\tfor(var i = 0; i < this.list.length; i++)\n\t\t{\n\t\t\tif(this.list[i].id == id)\n\t\t\t{\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t};\n\n\t/**\n\t * Gets the playlist-item by id\n\t * @param {String} id\n\t * @returns {playlist-item}\n\t */\n\tthis.getItem = function(id)\n\t{\n\t\tfor(var i = 0; i < this.list.length; i++)\n\t\t{\n\t\t\tvar itemid = this.list[i].id;\n\t\t\tif(itemid === id)\n\t\t\t{\n\t\t\t\treturn this.list[i];\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn null;\n\t};\n\t\n\t\n\t/**\n\t * Gets a subset of playlist items from startIndex to endIndex | endOfList\n\t * @param {String} id\n\t * @returns {Array} playlist\n\t */\t\n\tthis.getItemsInRange = function(startIndex, endIndex)\n\t{\n\t\tvar list = [];\n\t\tif(startIndex < 0)\n\t\t{\n\t\t\tthrow new Error(\"Out of range exception. Cannot access playlist in position \" + startIdex);\n\t\t}\n\t\t\n\t\tfor(var i = startIndex; i <= endIndex || i >= this.list.length; i++ )\n\t\t{\n\t\t\tif(i >= this.list.length)\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tif(this.list[i])\n\t\t\t{\n\t\t\t\tlist.push(this.list[i]);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn list;\n\t};\n\n\t\n\t/**\n\t * Gets the ID of the last playlist item\n\t * @returns {String} id \n\t */\n\tthis.getLastItemId = function()\n\t{\n\t\tif(this.list[this.list.length-1])\n\t\t{\n\t\t\treturn this.list[this.list.length-1].id;\t\n\t\t}\n\t\t\t\n\t\treturn '';\n\t};\n\t\n\n\t/**\n\t * Returns the number of items in the playlist\n\t * @returns {int}\n\t */\n\tthis.getNumItems = function()\n\t{\n\t\treturn this.list.length;\n\t};\n\n\t/*\n\t * Checks endOfList flag\n\t */\n\tthis.hasMoreItems = function()\n\t{\n\t\treturn (!this.endOfList);\n\t};\t\n\t\n\t\n\t/**\n\t * Injects an item into the playlist at a given position\n\t */\n\tthis.injectItem = function(item, index)\n\t{\n\t\tif(item === undefined)\n\t\t{\n\t\t\tthrow new Error(\"Nothing to inject into playlist. Missing item parameter.\");\n\t\t}\n\t\t\t\n\t\tif(index === undefined)\n\t\t{\n\t\t\tvar index = this.pointer+1;\n\t\t}\n\t\t\t\n\t\tif(index > this.list.length-1)\n\t\t{\n\t\t\tindex = this.list.length-1;\n\t\t}\n\t\t\n\t\tif(index == -1)\n\t\t{\n\t\t\tindex = 0;\n\t\t}\n\t\t\n\t\t/* inject into list */\n\t\tthis.list.splice(index, 0, item);\n\t\t\n\t\t/* clean up newly merged list */\n\t\tvar playlist = _sanitize(this.list);\n\n\t\t/* store the playlist */\n\t\tthis.list = playlist;\n\t\t\n\t\t/* get secondary playlist data and drop invalid videos */\n\t\tthis.loadPlaylistItemData(false);\n\t\t\n\t\t/* finally update EoL flag */\n\t\tthis.updateEndOfListFlag();\t\t\t\n\t};\n\t\n\t/**\n\t * Load up the playlist based on an array of objects passed in.\n\t * Each playlist-item must be an object with a unique id property.\n\t * @param {Array} list\n\t */\n\tthis.load = function(list)\n\t{\n\t\tif(list.length === undefined) \n\t\t{\n\t\t\tthrow new Error(\"Missing Array parameter\");\n\t\t}\n\n\t\tvar playlist = _sanitize(list);\n\n\t\tif(playlist.length == 0)\n\t\t{\n\t\t\tthrow new Error(\"Playlist resulted in 0 valid entries.\");\n\t\t}\n\t\t\n\t\t//store the playlist\n\t\tthis.list = playlist;\n\t\t\n\t\t/* this is a new playlist so we reset things back to first item */\n\t\tthis.resetPointer();\n\t\t\n\t\t/* get secondary playlist data and drop invalid videos */\n\t\tthis.loadPlaylistItemData(false);\n\t\t\n\t\t/* update the EoL flag */\n\t\tthis.updateEndOfListFlag();\t\t\n\t};\n\t \n\t/**\n\t * Downloads playlist-item data. (This is the CVP Video XML) \n\t */\n\tthis.loadPlaylistItemData = function(async)\n\t{\n\t\tif(async === undefined)\n\t\t{\n\t\t\tvar async = true;\n\t\t}\n\n\t\tvar callbacks = {\n\t\t\tsuccess : function(videoId, data, textStatus, jqXHR)\n\t\t\t{\n\t\t\t\tvar index = _self.getIndex(videoId);\n\t\t\t\t\n\t\t\t\tvar $xmldata = jQuery(data);\n\t\t\t\t\n\t\t\t\t/*\n\t\t\t\t * Need a better way to trap this error. \n\t\t\t\t * If xml comes back invalid, jquery doesn't throw an error and instead fills the object with html markup..\n\t\t\t\t * so we try to fix the markup from known issues and reparse the document.\n\t\t\t\t */\n\t\t\t\tif($xmldata[0].firstChild.nodeName === \"html\")\n\t\t\t\t{\n\t\t\t\t\tdata = jqXHR.responseText.replace(\" images > image\");\n\t\t\t\tvar $files = $xmldata.find(\"video > files > file\");\n\t\t\t\t\n\t\t\t\t/* update playlist item with secondary data */\n\t\t\t\t_self.list[index].category\t= $xmldata.find('video > category').text();\n\t\t\t\t_self.list[index].branding\t= $xmldata.find('video > branding').text();\n\t\t\t\t_self.list[index].source\t= $xmldata.find('video > source').text();\n\t\t\t\t_self.list[index].adSensitive = $xmldata.find('video > isAdSensitive').text();\t\t\t\t\n\t\t\t\t_self.list[index].headline\t= _self.list[index].hed = $xmldata.find('video > headline').text();\n\t\t\t\t_self.list[index].jqFiles\t= $files;\n\t\t\t\t_self.list[index].jqImages\t= $images;\n\t\t\t\t_self.list[index].collection = (typeof(_self.list[index].collection) == 'undefined' || _self.list[index].collection == '') ? \"no video collection\" : _self.list[index].collection; \n\t\t\t\t\t\t\t\t\n\t\t\t\t_self.list[index].images\t= VideoPlayer.utils.getImages($images);\n\t\t\t\t_self.list[index].poster\t= _self.list[index].img = VideoPlayer.utils.getPosterImage(_self.list[index].images, \"620\");\n\t\t\t\t_self.list[index].thumb\t\t= VideoPlayer.utils.getPosterImage(_self.list[index].images, \"160\");\n\t\t\t\t\t\t\t\t\n\t\t\t\t/* mark this playlist item as complete */\n\t\t\t\t_self.list[index]._dataComplete = 'success';\t\t\t\t\n\t\t\t\t\n\t\t\t\t/* headline should never be empty... something went wrong.. */\n\t\t\t\tif(_self.list[index].headline === \"\")\n\t\t\t\t{\n\t\t\t\t\t//VideoPlayer.utils.log(\"Removing video. Headline was empty. - \" + videoId);\n\t\t\t\t\t\n\t\t\t\t\t//remove the video from the playlist\t\t\t\t\t\n\t\t\t\t\t//_self.remove(videoId);\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t},\n\t\t\terror : function(videoId, jqXHR, textStatus, errorThrown)\n\t\t\t{\n\t\t\t\t//remove the video from the playlist\n\t\t\t\t_self.remove(videoId);\n\t\t\t}\n\t\t};\t\t\n\t\t\n\t\tfor(var i = 0; i < this.list.length; i++)\n\t\t{\n\t\t\t//if flag is not defined... then we haven't requested data yet\n\t\t\tif(this.list[i]._dataComplete === undefined)\n\t\t\t{\t\n\t\t\t\t//handle preview urls\n\t\t\t\tif(this.list[i].id.indexOf(\"/presenter\") == 0)\n\t\t\t\t{\n\t\t\t\t\tvar uri = this.list[i].id + '.xml';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t//handle normal urls\n\t\t\t\t\tvar uri = '/video/data/4.0' + this.list[i].id + '.xml';\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t/* ensure we call it just once */\n\t\t\t\tthis.list[i]._dataComplete = ''; \n\t\t\t\t\n\t\t\t\t/* get the goods */\n\t\t\t\tVideoPlayer.utils.getPayload(uri, async, 'xml', this.list[i].id, callbacks);\t\t\n\t\t\t}\n\t\t}\n\t};\n\n\t/**\n\t * Move the playlist to the previous item\n\t */\t\n\tthis.prevItem = function()\n\t{\n\t\t/* pointer starts at -1 */\n\t\tif(this.pointer != -1)\n\t\t{\n\t\t\tthis.pointer--;\n\t\t\tthis.updateEndOfListFlag();\t\t\t\n\t\t}\n\t};\n\n\t/**\n\t * Move the playlist to the next the item\n\t */\n\tthis.nextItem = function()\n\t{\n\t\tif(this.hasMoreItems())\n\t\t{\n\t\t\tthis.pointer++;\n\t\t\tthis.updateEndOfListFlag();\t\t\t\n\t\t}\n\t};\n\n\t/**\n\t * Removes a playlist-item based on the id passed in\n\t * @param {String} id Id of playlist-item to remove\n\t */\n\tthis.remove = function(id)\n\t{\t\n\t\tvar idx = this.getIndex(id);\n\t\t\n\t\t/* Remove the item */\n\t\tthis.list.splice(idx, 1);\n\t\t\n\t\t/*\n\t\t * Removing the current position makes the next playable item the same position\n\t\t * So, we set pointer to previous item. This is so that the \"next\" item to play will be the current position.\n\t\t */ \n\t\tif(idx == this.pointer && (idx != 0 && this.list.length > 0))\n\t\t{\t\t\t\n\t\t\tthis.pointer--;\n\t\t}\n\t\t\n\t\tthis.updateEndOfListFlag();\n\t};\n\t\n\t/**\n\t * Resets the playlist back to the beginning\n\t */\n\tthis.resetPointer = function()\n\t{\n\t\tthis.pointer = -1;\n\t\tthis.updateEndOfListFlag();\n\t};\n\t\n\t/**\n\t * updates the endOfList flag\n\t * If pointer is pointing to last item OR pointer is at the limit, then we're at end of list\n\t */\n\tthis.updateEndOfListFlag = function()\n\t{\n\t\tthis.endOfList = (this.pointer >= (this.list.length-1) || (this.pointer >= this.limit-1));\n\t};\n\t\n\t\n\t/**\n\t * Sets the max limit of video play for this playlist\n\t */\n\tthis.setLimit = function(newLimit)\n\t{\n\t\tthis.limit = newLimit;\n\t\tthis.updateEndOfListFlag();\n\t};\n\t\n\t/**\n\t * Sets the playlist's pointer to the item with matching id passed in\n\t * @param {String} id\n\t */\n\tthis.setPointer = function(id, allowPastLimit)\n\t{\n\t\t/* default to false. Playlist should stay within the limit */\n\t\tif(allowPastLimit === undefined) \n\t\t{\n\t\t\tvar allowPastLimit = false;\n\t\t}\n\t\t\n\t\t/* get the pointer index of the id passed in */\n\t\tvar pointer = this.getIndex(id);\t\t\n\t\tif(pointer == null)\n\t\t{\n\t\t\tthrow new Error(\"Cannot set pointer to id - \" +id+\". Item not found.\");\n\t\t}\n\t\t\n\t\t/* if we're not allowed past the playlist limit && we're trying to set the pointer past the limit */\n\t\tif(allowPastLimit === false && pointer >= this.limit)\n\t\t{\n\t\t\tthrow new Error(\"Cannot set pointer to playlist-item past the limit of \" +this.limit);\n\t\t}\n\t\t\n\t\t/* if we are allowed past the playlist limit and we're trying to set the pointer past the limit, then update the limit */\n\t\tif(allowPastLimit === true && pointer >= this.limit)\n\t\t{\n\t\t\tthis.limit = pointer+1;\n\t\t}\n\t\t\n\t\tthis.pointer = pointer;\n\t\tthis.updateEndOfListFlag();\t\t\n\t};\n\t\n}\n\nVideoPlaylist.MODES = {\n\tNORMAL : 0,\n\tREPEAT : 1\n};\n\n\n\n/* requires js/lib/videoplayer/3.0/videoplayer.slate.js */\n\n\nfunction VideoPlayerSlate(config)\n{\n\tif(config === undefined)\n\t{\n\t\tthrow new Error(\"Missing required parameter to create VideoPlayerSlate object.\");\n\t}\n\t\n\tif(config.targetNode === undefined || config.playerId === undefined )\n\t{\n\t\tthrow new Error(\"Missing required parameter to create VideoPlayerSlate object.\");\n\t}\n\t\n\tvar _self \t = this;\n\tthis.type \t = (config.type !== undefined) ? config.type : VideoPlayerSlate.TYPES.END;\n\tthis.rootNode = config.targetNode;\n\tthis.playerId = config.playerId;\n\tthis.id \t = this.playerId + \"_\" +this.type+ \"Slate\";\n\t\n\t\n\t/**\n\t * Determines the behavior when clicking on a playlist item\n\t * Possible values: \n\t * top - (default) clicking on playlist items takes you to the player page\n\t * player - plays the video inline. \n\t */\n\tthis.clickTarget = config.clickTarget || 'top';\n\t\n\t\n\t/* optional params */\n\tthis.seconds = config.seconds || 5;\n\tthis.onCountdownComplete = config.onCountdownComplete || null;\n\tthis.onCountdownPause = config.onCountdownPause || null;\n\t\n\tfunction _init()\n\t{\t\t\n\t\tvar newSlate = document.createElement('div');\n\t\tnewSlate.id = _self.id;\t\n\t\tnewSlate.className = (_self.type === VideoPlayerSlate.TYPES.NEXTUP) ? 'video-posterboard nextup-slate' : 'video-posterboard end-slate';\n\t\t_self.rootNode.appendChild(newSlate);\n\t\t_self.buildUI();\n\t}\n\t\n\t/**\n\t * Countdown object\n\t */\n\tthis.countdown = {\n\t\tisRunning : false,\n\t\tisStopped : false,\n\t\tisPaused : false,\n\t\tintervalId : null,\n\t\tstart : function()\n\t\t{\n\t\t\tif(this.isRunning)\n\t\t\t{\n\t\t\t\tconsole.log(\"Cannot start the same counter while its running...\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\tthis.isRunning = true;\n\t\t\tthis.isStopped = false;\n\n\t\t\t/* init second count */\n\t\t\tvar second = 0; \n\t\t\t\n\t\t\t/* initialize countdown label */\n\t\t\tvar $countdownLabel = jQuery('div#' +_self.id + ' .video-slate-countdown');\t\t\t\n\t\t\t$countdownLabel.html('0' +_self.seconds);\n\t\t\t\n\t\t\t/* set interval so we can pause */\n\t\t\tthis.intervalId = setInterval(function() {\t\t\t\t\n\t\t\t\t\n\t\t\t\tif(!_self.countdown.isPaused)\n\t\t\t\t{\n\t\t\t\t\tsecond++;\n\t\t\t\t\t$countdownLabel.html('0' +(_self.seconds - second));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(second >= _self.seconds || _self.countdown.isStopped)\n\t\t\t\t{\n\t\t\t\t\twindow.clearInterval(_self.countdown.intervalId);\t\t\t\t\t\n\t\t\t\t\t_self.countdown.complete();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}, 1000);\n\t\t}, \n\t\tpause : function()\n\t\t{\n\t\t\tthis.isPaused = !this.isPaused;\n\t\t\tif(typeof(_self.onCountdownPause) === 'function')\n\t\t\t{\n\t\t\t\t_self.onCountdownPause(this.isPaused);\n\t\t\t}\t\t\t\n\t\t},\n\t\tstop : function()\n\t\t{\n\t\t\tthis.isStopped = true;\t\t\t\n\t\t},\n\t\tcomplete : function()\n\t\t{\n\t\t\tthis.isRunning = false;\n\t\t\t\n\t\t\tif(this.isStopped)\n\t\t\t{\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\tif(typeof(_self.onCountdownComplete) === 'function')\n\t\t\t{\n\t\t\t\t_self.onCountdownComplete();\n\t\t\t}\n\t\t}\n\t};\n\t\n\tthis.show = function(playlist)\n\t{\t\n\t\t/*\n\t\t * NextUp slate handler. These handlers should be overridden per instantiation so that each one can do what it needs to do\n\t\t * Or implemented using prototype chain. \n\t\t */\n\t\tif(this.type === VideoPlayerSlate.TYPES.NEXTUP)\n\t\t{\n\t\t\t//get the next item in the list\n\t\t\tvar nextIndex \t = playlist.pointer + 1;\n\t\t\tvar _playlistItem = playlist.list[nextIndex];\n\t\t\t\n\t\t\t//next item not found, default to empty obj\n\t\t\tif(!_playlistItem)\n\t\t\t{\n\t\t\t\t_playlistItem = {};\n\t\t\t}\n\t\t\t\n\t\t\t//get properties from playlist item\n\t\t\tvar id \t = _playlistItem.id || '';\n\t\t\tvar poster \t = _playlistItem.poster || {};\n\t\t\tvar headline = _playlistItem.hed || '';\n\n\t\t\t\t\t\t\n\t\t\t//list of playlist-items. 3 videos not yet watched and not the next one since we're showing whats next in the slate\n\t\t\tvar _list \t = playlist.getItemsInRange(nextIndex + 1, nextIndex + 4);\n\t\t\t\n\t\t\t//we reset the UI mostly to clean up but theres a problem assigning thumbnails to the same thumbnails. \n\t\t\tthis.buildUI();\n\t\t\t\n\t\t\t//update the ui\n\t\t\tthis.runTemplate({\n\t\t\t\tid : id,\n\t\t\t\ttitle : headline,\n\t\t\t\tposter : poster,\n\t\t\t\tlist : _list\n\t\t\t});\n\t\t\n\t\t\t//first we show the slate.. then start the countdown\n\t\t\tjQuery('div#' +this.id).show();\n\t\t\t\n\t\t\t//start the countdown\n\t\t\tthis.countdown.start();\n\t\t\t\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t\n\t\t/*\n\t\t * End slate handler\n\t\t */\n\t\tif(this.type === VideoPlayerSlate.TYPES.END)\n\t\t{\n\t\t\t//get current item\n\t\t\tvar _playlistItem = playlist.getCurrentItem();\t\n\n\t\t\tvar id \t= _playlistItem.id || '';\n\t\t\tvar poster \t= _playlistItem.poster || {};\n\t\t\t\n\t\t\t//list of playlist-items. 3 videos not yet watched and not the next one since there is NO next one to play we start at pointer + 1. \n\t\t\tvar _list \t= playlist.getItemsInRange(playlist.pointer + 1, playlist.pointer + 4);\n\t\t\t\n\t\t\t//backfill the playlist in case there aren't enough videos to show a thumbnail set\n\t\t\tif(_list.length < 3)\n\t\t\t{\n\t\t\t\tvar endRange = 3 - _list.length; \n\t\t\t\tvar _list2 = playlist.getItemsInRange(1, endRange);\n\t\t\t\t_list = _list.concat(_list2);\n\t\t\t}\n\t\t\t\n\t\t\t//update the ui\n\t\t\tthis.runTemplate({\n\t\t\t\tid : id,\n\t\t\t\tposter : poster,\n\t\t\t\tlist : _list\n\t\t\t});\n\t\t\n\t\t\t//first we show the slate.. then start the countdown\n\t\t\tjQuery('div#' +this.id).show();\n\t\t\t\n\t\t\treturn;\n\t\t}\t\n\t};\n\t\n\tthis.hide = function()\n\t{\n\t\tjQuery('div#' +this.id).hide();\n\t};\n\t\n\tthis.replay = function()\n\t{\n\t\tconsole.log(\"In replay handler\");\n\t};\n\t\n\t\n\tthis.buildUI = function()\n\t{\n\t\t/* defined as top for now. */ \n\t\t/* TODO: Need to override this based on player. */\n\t\t//var target = this.clickTarget;\n\t\tvar target = '_top'; \n\t\t\n\t\tvar html = '';\n\t\thtml += '
    ';\n\t\thtml += '
    ';\n\t\thtml += \t'
    ';\n\t\thtml += \t'\"\"';\n\t\thtml += '
    ';\n\t\thtml += '
    ';\n\t\t\n\t\tif(this.type == VideoPlayerSlate.TYPES.NEXTUP)\n\t\t{\n\t\t\thtml += '\t
    ';\n\t\t\thtml += '\t\t
    ';\n\t\t\thtml += '\t\t
    ';\n\t\t\thtml += '\t\t\tNext up:';\n\t\t\thtml += '\t\t\t';\n\t\t\thtml += '\t\t
    ';\n\t\t\thtml += '\t
    ';\t\t\t\n\t\t}\n\t\t\n\t\thtml += '\t';\n\t\thtml += '\t
    Replay
    ';\t\n\t\thtml += '
    ';\n\t\thtml += '
    ';\n\t\t\n\t\tjQuery('#'+this.id).html(html);\n\t\t\n\t\t/* add replay handler */\n\t\tjQuery('#'+this.id+ ' > .video-slate-wrapper > .video-slate-content > .replay').click(function() {\n\t\t\tvar playerid = this.dataset['playerid'];\n\t\t\tVideoPlayerManager.getPlayer(playerid).replay();\n\t\t\t_self.countdown.stop();\n\t\t});\t\t\n\t};\n\t\n\tthis.runTemplate = function(slateData)\n\t{\t\t\n\t\t//default slateData if its missing.. just in case\n\t\tif(slateData === undefined)\n\t\t{\n\t\t\tvar slateData = {};\n\t\t}\n\n\t\tvar title\t= (slateData.title !== undefined) ? slateData.title : '',\n\t\t\tposter\t= (slateData.poster !== undefined) ? slateData.poster : '',\n\t\t\tlist\t= (slateData.list !== undefined) ? slateData.list : [],\n\t\t\thtml\t= '';\n\t\t\n\t\tif(this.type == VideoPlayerSlate.TYPES.NEXTUP)\n\t\t{\n\t\t\tjQuery('#'+this.id+ ' > .video-slate-wrapper > .video-slate-content > div.video-slate-header .video-title').text(title);\t\n\t\t}\n\t\t\n\t\t\n\t\tjQuery('#'+this.id+ ' > .video-slate-wrapper > .video-bg > img').replaceWith(poster);\n\t\tjQuery('#'+this.id+ ' > .video-slate-wrapper > .video-slate-content > .video-thumbnails-wrapper a.video-thumbnail').each(function(index) {\n\t\t\tvar $elem = jQuery(this);\n\t\t\tif(list[index])\n\t\t\t{\n\t\t\t\t/* set the image thumb */\n\t\t\t\t$elem.find('img').attr('src', (list[index].thumb.src || ''));\n\t\t\t\t\n\t\t\t\t/* set the caption */\n\t\t\t\t$elem.find('.video-thumbnail-caption').text(list[index].hed);\n\t\t\t\t\n\t\t\t\t/* set the link href */\n\t\t\t\t$elem.attr('href', list[index].id);\n\t\t\t\t\n\t\t\t\t/* set the click event handler */\t\t\t\t\n\t\t\t\tif(_self.clickTarget === 'player')\n\t\t\t\t{\n\t\t\t\t\t$elem.click(function(event) {\n\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\tVideoPlayerManager.getPlayer(_self.playerId).play(list[index].id, true);\n\t\t\t\t\t});\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t/* show the thumbnail */\n\t\t\t\t$elem.show();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$elem.hide();\n\t\t\t}\n\t\t});\n\t\t\n\t\t/*\n\t\tif(this.clickTarget === 'player')\n\t\t{\n\t\t\tjQuery('#'+this.id+ ' > .video-thumbnails-wrapper a').each(function(index) {\n\t\t\t\t\n\t\t\t});\n\t\t\t\n\t\t\tjQuery('#'+this.id+ ' > .video-thumbnails-wrapper a').click(function() {\n\t\t\t\t\n\t\t\t});\n\t\t}\n\t\t*/\t\t\n\t};\n\n\t\n\t_init();\n}\n\n\nVideoPlayerSlate.TYPES = {\n\tNEXTUP : 'nextup',\n\tPAUSE : 'pause',\n\tEND : 'end'\n};\n\n\n/* requires js/lib/videoplayer/3.0/videoplayer.ads.js */\n\n\nvar VideoPlayerAds = {\n\tpage_target\t: window,\n\tpagebranding : '',\n\tpagesection : '',\n\n\t/**\n\t *\tplayer = CVP player, vidId = video id string, contentpage = target window of containing page \n\t */\n\tget_ssid : function (profile, vidId, contentpage, playListItem) {\n \t\t\n\t\tif(null != contentpage) {\n\t\t\tthis.page_target = contentpage;\n\t\t}\n\t\t\n\t\tvar ssid = '';\n\n\t\tswitch(profile) {\n\t\t\tcase \"generic\":\n\t\t\t\tssid = this.get_story_ssid();\n\t\t\t\tbreak;\n\n\t\t\tcase \"story\":\n\t\t\t\tssid = this.get_story_ssid();\n\t\t\t\tbreak;\n\n\t\t\tcase \"interactive\":\n\t\t\t\t/* set Freewheel SiteSectionID for the current video */\n\t\t\t\tssid = this.get_story_ssid();\n\t\t\t\tbreak;\n\t\t\tcase \"wp_blogs\":\n\t\t\t\tssid = this.get_blogstory_ssid();\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase \"gallerySmall\":\n\t\t\tcase \"galleryLarge\":\n\t\t\tcase \"galleryExtraLarge\":\t\n\t\t\tcase \"videoclip\":\n\t\t\tcase \"section\":\n\t\t\tcase \"sectionLarge\":\n\n\t\t\t\t/* set Freewheel SiteSectionID for the section player */\n\n\t\t\t\t/**\n\t\t\t\t * Get video content XML. Why aren't we using getContentEntry() player function?\n\t\t\t\t * player.setAdSection() call has no affect when made in ContentBegin callback. Calling seAdSection() in CVPReady/onPlayerReady callback means \n\t\t\t\t * we can't use the player.getContentEntry() because no content is currently playing. We must pull the the XML and convert to JSON manually.\n\t\t\t\t */\n\t\t\t\tvar _branding = playListItem.branding;\n\t\t\t\tvar _category = playListItem.category;\n\t\t\t\tvar _source = playListItem.source;\n\t\t\t\tssid = this.get_bvp_ssid(_branding, _category, _source);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase \"homepage\":\n\t\t\tcase \"markets\":\n\t\t\t\tssid = this.get_smallplayer_ssid();\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn ssid;\n\t},\n\n\t/*\n\t * Freewheel ad IDs : Gets the section string from url\n\t */\n\t_get_story_section : function ()\n\t{\n\t\t/* not found in branding now look at section */\n\t\tvar loc = location.pathname;\n\t\t/* \n\t\tvar loc = '/2010/03/03/pf/funds/diversification.moneymag/index.htm'; \n\t\tvar loc = '/2010/03/03/pf/diversification.moneymag/index.htm';\n\t\tvar loc = '/2010/03/02/news/auto_sales/index.htm';\n\t\tvar loc = '/2010/03/05/smallbusiness/electronic_medical_records/index.htm';\n\t\t*/\n\t\tvar pairs = loc.split(\"/\");\n\t\tvar sectionItems = [];\n\t\tvar section = '';\n\n\t\t/* the last 2 items will be slug and file so skip those */\n\t\tfor(var i = 0; i < pairs.length-2; i++)\n\t\t{\n\t\t\t/* skip date portions */\n\t\t\tif(isNaN(parseInt(pairs[i], 10)) && pairs[i] != '')\n\t\t\t{\n\t\t\t\tsectionItems.push(pairs[i]);\n\t\t\t}\n\t\t}\n\n\t\tfor(var i = 0; i < sectionItems.length; i++)\n\t\t{\n\t\t\tsection += sectionItems[i];\n\t\t\tif(i < sectionItems.length-1)\n\t\t\t{\n\t\t\t\tsection += '/';\n\t\t\t}\n\t\t}\n\n\t\tif(this.page_target.cnnSource == \"FORT\")\n\t\t{\n\t\t\tsection = \"fortune_\" +section;\n\t\t}\n\n\t\treturn section;\n\t},\n\n\t/**\n\t * Freewheel ad IDs : Picks up the branding value\n\t */\n\t_get_page_branding : function ()\n\t{\n\t\tif(typeof(this.page_target.cnnBrandingValue) == 'undefined')\n\t\t{\n\t\t\treturn '';\n\t\t}\n\n\t\tif(this.page_target.cnnBrandingValue == '')\n\t\t{\n\t\t\treturn '';\n\t\t}\n\n\t\treturn this.page_target.cnnBrandingValue;\n\t},\n\n\tset_branding : function (branding)\n\t{\n\t\tthis.pagebranding = branding;\n\t},\n\tset_section : function (section)\n\t{\n\t\tthis.pagesection = section;\n\t},\n\t/*\n\t * Freewheel ad IDs : Gets site section id for story\n\t */\n\tget_story_ssid: function ()\n\t{\n\t\tvar branding = ('' != this.pagebranding)? this.pagebranding : this._get_page_branding();\n\t\tvar section\t = ('' != this.pagesection)? this.pagesection : this._get_story_section();\n\t\t\n\n\t\tvar branding_ssid = cnnStoryAdSections[branding];\n\t\tvar section_ssid = cnnStoryAdSections[section];\n\n\t\t/* if branding found, return it */\n\t\tif(branding_ssid != null)\n\t\t{\n\t\t\treturn branding_ssid;\n\t\t}\n\n\t\tif(section_ssid != null)\n\t\t{\n\t\t\treturn section_ssid;\n\t\t}\n\n\t\t/* default the section\n\t\t\tcheck for fortune and set default section\n\t\t*/\n\t\tif(this.page_target.cnnSource == \"FORT\")\n\t\t{\n\t\t\tsection = \"fortune_technology\";\n\t\t}\n\t\telse\t/* its cnnmoney */\n\t\t{\n\t\t\tsection = \"news\";\n\t\t}\n\n\t\treturn cnnStoryAdSections[section];\n\t},\n\n\t/*\n\t * Freewheel ad IDs : Gets site section id for blog story\n\t */\n\tget_blogstory_ssid: function ()\n\t{\n\t\tvar branding = ('' != this.pagebranding)? this.pagebranding : this._get_page_branding();\n\t\tvar section\t = ('' != this.pagesection)? this.pagesection : this._get_story_section();\n\t\t\n\n\t\tvar branding_ssid = cnnStoryAdSections[branding];\n\t\tvar section_ssid = cnnStoryAdSections[section];\n\n\t\t/* if branding found, return it */\n\t\tif(branding_ssid != null)\n\t\t{\n\t\t\treturn branding_ssid;\n\t\t}\n\n\t\tif(section_ssid != null)\n\t\t{\n\t\t\treturn section_ssid;\n\t\t}\n\n\t\t/* blogname should be defined on blog player */\n\t\tif(typeof(cnnStoryAdSections[blogname]) != 'undefined'){\n\t\t\treturn cnnStoryAdSections[blogname];\n\t\t}\n\t\treturn cnnStoryAdSections[section];\n\t},\n\n\t/**\n\t * Gets site section id for bvp\n\t * Rules are as follows:\n\t * 1) Check the host page's branding value. If found in the cnnBVPAdSections object, then return it.\n//\t * 2) if page branding not found, then check the video's branding value. If found in the cnnBVPAdSections object, then return it.\n\t * 3) if video is fortune, \n\t * \t a) check the video's category value (section). If found in the cnnBVPAdSections object, then return it.\n\t * \t b) return fortune_technology\n\t * 4) Check video's category value (section). If found in the cnnBVPAdSections object, then return it. \n\t * 5) Finally nothing found, use news section as the final default\n\t */\n\tget_bvp_ssid : function (videoBranding, videoCategory, videoSource)\n\t{\n\n\t\t/* check for the page's branding value. */\n\t\tvar branding\t = this._get_page_branding();\n\t\tvar branding_ssid = cnnBVPAdSections[branding];\n\n\t\t/* if branding found, return it */\n\t\tif(branding_ssid != null)\n\t\t{\n\t\t\treturn branding_ssid;\n\t\t}\n\n\t\t/* if we find branding, then gitit */\n\t\tif(typeof(cnnBVPAdSections[videoBranding]) != 'undefined')\n\t\t{\n\t\t\treturn cnnBVPAdSections[videoBranding];\n\t\t}\n\n\t\t/* if source is fortune */\n\t\tif(videoSource.toLowerCase() == \"fortune\")\n\t\t{\n\t\t\t/* if matching category is found, then gitit */\n\t\t\tif(typeof(cnnBVPAdSections[\"fortune_\" +videoCategory]) != 'undefined')\n\t\t\t{\n\t\t\t\treturn cnnBVPAdSections[\"fortune_\" +videoCategory];\n\t\t\t}\n\n\t\t\t/* default to fortune technology */\n\t\t\treturn cnnBVPAdSections[\"fortune_technology\"];\n\t\t}\n\n\t\t/* finally it must be cnnmoney\n\t\t\tif matching category is found, then gitit\n\t\t*/\n\t\tif(typeof(cnnBVPAdSections[videoCategory]) != 'undefined')\n\t\t{\n\t\t\treturn cnnBVPAdSections[videoCategory];\n\t\t}\n\n\t\t/* default to fortune news */\n\t\treturn cnnBVPAdSections[\"news\"];\n\t},\n\n\n\t/**\n\t * Gets the freewheel ssid for small players like Fortune homepage, Smallbusiness homepage, Smallbusiness Makeover, Premarkets, Afterhours\n\t */\n\tget_smallplayer_ssid : function ()\n\t{\n\t\tvar ssid = 'cnnmoney.com_homepage';\n\t\tvar loc = location.pathname;\n\n\t\tif(loc == \"/smallbusiness/\" || loc.match(\"/smallbusiness/index.html\"))\n\t\t{\n\t\t\tssid = 'cnnmoney.com_smallbusiness_sectionhomepage';\n\t\t}\n\t\telse if(loc == \"/magazines/fortune/\" || loc.match(\"/magazines/fortune/index.html\"))\n\t\t{\n\t\t\tssid = 'fortune.com_homepage';\n\t\t}\n\t\telse if(loc.match(\"data/premarket\"))\n\t\t{\n\t\t\tssid = 'cnnmoney.com_premarkets';\n\t\t}\n\t\telse if(loc.match(\"data/afterhours\"))\n\t\t{\n\t\t\tssid = 'cnnmoney.com_afterhours';\n\t\t}\n\n\t\treturn ssid;\n\t}\n\n};","/* Load CVP before loading these controls */\r\nvar specials_vidControls = {\r\n\t$controls : jQuery('.js-videoplayer_ui nav'),\r\n\tvideoplayer : null,\r\n\t$videoplayer_viewer : jQuery('#cnnVPscreen'),\r\n\tvidPlayerid : 'staticVideoPlayer',\r\n\tvideoisonscreen : true,\r\n\r\n\tisonscreen : function (elem) {\r\n var win = $(window);\r\n\r\n var viewport = {\r\n top: win.scrollTop(),\r\n left: win.scrollLeft()\r\n };\r\n viewport.right = viewport.left + win.width();\r\n viewport.bottom = viewport.top + win.height();\r\n\r\n var bounds = elem.offset();\r\n bounds.right = bounds.left + elem.outerWidth();\r\n bounds.bottom = bounds.top + elem.outerHeight();\r\n\r\n return (!(viewport.right < bounds.left || viewport.left > bounds.right || viewport.bottom < (bounds.top+96) || viewport.top > bounds.bottom));\r\n\t},\r\n\r\n\tsetonblur : function() {\r\n\t\tjQuery(window).scroll(function(){\r\n\t\t\tif(!specials_vidControls.isonscreen(specials_vidControls.$videoplayer_viewer)) {\r\n\t\t\t\tspecials_vidControls.videoplayer.pause();\r\n\t\t\t}\r\n\t\t})\r\n\t},\r\n\r\n\thighlightbtn : function($button) {\r\n\t\tthis.$controls.removeClass('active');\r\n\t\t$button.className += ' active';\r\n\t\treturn;\r\n\t},\r\n\r\n\tfindandhighlightbtn : function(vid) {\r\n\t\t// var buttons = this.$controls;\r\n\t\t// for (i = 0 ; i < buttons.length; i++ ) {\r\n\t\t// \tif (vid == $(buttons[i]).attr(\"data-vid\")) {\r\n\t\t// \t\tthis.highlightbtn(buttons[i]);\r\n\t\t// \t}\r\n\t\t// }\r\n\r\n\t\tvar buttons = this.$controls.parent().find(\"[data-vid='\"+vid+\"']\");\r\n\t\tfor (i = 0 ; i < buttons.length; i++ ) {\r\n\t\t\tthis.highlightbtn(buttons[0]);\r\n\t\t}\r\n\r\n\t\tif ( $('#js-video1').hasClass('active') ){\r\n\t\t\t$('#playlist-title').text('The American Dream');\r\n\t\t}\r\n\t\telse if ( $('#js-video2').hasClass('active') ){\r\n\t\t\t$('#playlist-title').text('Alan Greenspan');\r\n\t\t}\r\n\t\telse if ( $('#js-video3').hasClass('active') ){\r\n\t\t\t$('#playlist-title').text('Howard Schultz');\r\n\t\t}\r\n\t\telse if ( $('#js-video4').hasClass('active') ){\r\n\t\t\t$('#playlist-title').text('Ursula Burns');\r\n\t\t}\r\n\t\telse if ( $('#js-video5').hasClass('active') ){\r\n\t\t\t$('#playlist-title').text('Millard Drexler');\r\n\t\t}\r\n\t\telse if ( $('#js-video6').hasClass('active') ){\r\n\t\t\t$('#playlist-title').text('Russell Simmons');\r\n\t\t}\r\n\t\treturn;\r\n\t},\r\n\r\n\tplayVideoURLParam: function () {\r\n\t\tvar selectedvid = getQSParam('playvid'); /* from main.js */\r\n\t\tselectedvid = parseInt(selectedvid)-1;\r\n\t\tif(selectedvid >=0 && selectedvid < this.videoplayer.play_list.getNumItems()) {\r\n\t\t\t/** hack: this.$controls[selectedvid].click(); has a bug - race condition? **/\r\n\t\t\tif(selectedvid-1 >= 0) {\r\n\t\t\t\tvar vid = this.$controls[selectedvid-1].dataset['vid'];\r\n\t\t\t\tspecials_vidControls.videoplayer.play(vid);\r\n\t\t\t}\r\n\t\t\tspecials_vidControls.highlightbtn(this.$controls[selectedvid]);\r\n\t\t}\r\n\t},\r\n\r\n\tinit : function(options) {\r\n\t\toptions = options || {};\r\n\r\n\t\tif(typeof options.UI_btns_selector !== 'undefined') {\r\n\t\t\tthis.$controls = jQuery(options.UI_btns_selector);\r\n\t\t}\r\n\t\tif(typeof options.viewerContainer !== 'undefined') {\r\n\t\t\tthis.$videoplayer_viewer = jQuery(options.viewerContainer);\r\n\t\t}\r\n\t\tif(typeof options.playerid !== 'undefined') {\r\n\t\t\tthis.vidPlayerid = options.playerid;\r\n\t\t}\r\n\r\n\t\t/* load cvp */\r\n\t\tif(typeof VideoPlayerManager.getPlayer(this.vidPlayerid) == \"undefined\") {\r\n\t\t\tVideoPlayerManager.playVideos(this.vidPlayerid);\r\n\t\t}\r\n\r\n\t\tthis.videoplayer = VideoPlayerManager.getPlayer(this.vidPlayerid);\r\n\r\n\t\t/* Set buttons */\r\n\t\tthis.$controls.bind('click', function(e) {\r\n\t\t\tvar vid = this.dataset['vid'];\r\n\t\t\tspecials_vidControls.videoplayer.play(vid);\r\n\t\t\tspecials_vidControls.highlightbtn(this);\r\n\t\t});\r\n\r\n\t\t/* Check if URL specifies target video to autoplay */\r\n\t\tthis.playVideoURLParam();\r\n\r\n\r\n\t\t/* video player resizing for responsiveness */\r\n\t\twindow.onresize = function(event) {\r\n\t\t\tvar player_w = 1024;\r\n\t\t\tif (document.body && document.body.offsetWidth)\r\n\t\t\t{\r\n\t\t\t\tplayer_w = document.body.offsetWidth;\r\n\t\t\t}\r\n\t\t\tif (window.innerWidth && window.innerHeight)\r\n\t\t\t{\r\n\t\t\t\tplayer_w = window.innerWidth;\r\n\t\t\t}\r\n\t\t\tif(specials_vidControls.$videoplayer_viewer.length != 0){\r\n\t\t\t\tplayer_w = specials_vidControls.$videoplayer_viewer.width();\r\n\t\t\t}\r\n\r\n\t\t\tplayer_h = player_w * (9/16);\r\n\t\t\tspecials_vidControls.videoplayer.resizeTo(player_w, player_h);\r\n\t\t\tspecials_vidControls.$videoplayer_viewer.height('auto');\r\n\t\t};\r\n\r\n\t}\r\n}","var windowWidth = $(window).width();\nvar vidConfig = [];\n\nfunction initOwl() {\n $('#js-owl').addClass('owl-carousel');\n \n $('#js-owl').owlCarousel({\n responsiveClass:true,\n responsive : {\n // breakpoint from 0 up\n 0 : {\n items : 1,\n margin : 0,\n loop: false,\n center: false,\n slideBy: 1,\n dots: false,\n nav: false,\n autoWidth: false\n },\n // breakpoint from 480 up\n 480 : {\n items : 2,\n slideBy: 1\n },\n // breakpoint from 768 up\n 768 : {\n items : 3,\n slideBy: 1\n },\n // breakpoint from 1024 up\n 1024 : {\n items : 4,\n slideBy: 1\n }\n }\n });\n}\n\nfunction destroyOwl() {\n $('#js-owl').owlCarousel('destroy').removeClass('owl-carousel owl-theme owl-loaded');\n $('#js-owl').find('.owl-stage-outer').children().unwrap();\n}\n\n$vidviewport = jQuery('#cnnVPscreen');\nvideoplayer_width = $vidviewport.width();\nvideoplayer_height = videoplayer_width * (9/16);\n\n//on document ready\n$(document).ready(function(){\n\n vidConfig.push({\n \"playerprofile\" : \"noAds\",\n \"playerid\" : \"staticVideoPlayer\",\n \"divid\" : \"cnnVidplayer\",\n \"autoplay\": true,\n \"has_poster\" : false,\n \"auto_playlist\" : false,\n \"disableNextUpSlate\" : true,\n \"disableEndSlate\" : true,\n \"width\": videoplayer_width,\n \"height\": videoplayer_height,\n \"mode\" : VideoPlaylist.MODES.REPEAT,\n \"callouts\" : {\n \"onContentBegin\" : function (id, contentId) {\n specials_vidControls.findandhighlightbtn(contentId);\n }\n },\n videoArray : [{\n \"id\" : \"video/news/2017/02/03/american-dream-new-york-documentary.cnnmoney\",\n \"hed\" : \"These leaders overcame adversity and changed America\",\n \"dek\" : \"Howard Schultz... Alan Greenspan... Mickey Drexler... Russell Simmons... Ursula Burns... There was something happening in New York City in the first half of the 20th Century: the 1% were being formed in the primordial soup of the city's roughest neighborhoods. CNNMoney's Cristina Alesci talks to some of the city's most successful offspring to find out how it shaped their drive for success.\",\n \"img\" : \"https://i2.cdn.turner.com/money/dam/assets/170203145738-american-dream-new-york-title-slate-780x439.jpg\"\n }]\n });\n\n // init video player\n specials_vidControls.init({\n UI_btns_selector : '.js-videoplayer_ui nav',\n playerid : 'staticVideoPlayer'\n });\n\n //http://www.money.cnn.com/the-american-dream-new-york/\n cnnmsoc_overrides = {\n global : {\n bitlyurl : \"http://cnnmon.ie/2jI9uCX\"\n },\n twitter : {\n url : \"http://cnnmon.ie/2jI9uCX\",\n title: \"Cristina Alesci talks to some of the city's most successful offspring about their American Dream.\"\n },\n facebook : {\n title: \"The American Dream New York\"\n }\n };\n\n try {\n CNNM.Social.init();\n }\n catch(e){}\n\n $('#js-menu-btn').click(function(){\n $('body').toggleClass('menu-active');\n });\n\n $('#playlist-btn').click(function(){\n $('.video-playlist').toggleClass('active');\n $(this).toggleClass('active');\n });\n});\n\n$(window).resize(function() {\n windowWidth = $( window ).width();\n $vidviewport = jQuery('#cnnVPscreen');\n videoplayer_width = $vidviewport.width();\n videoplayer_height = videoplayer_width * (9/16);\n});\n\n$(window).load(function(){\n $('body').addClass('loaded');\n});\n "],"sourceRoot":"/source/"}