$(document).ready(function() {
		$('.horizontal_scroller').SetScroller({	velocity: 	 60,
											direction: 	 'horizontal',
											startfrom: 	 'right',
											loop:		 'infinite',
											movetype: 	 'linear',
											onmouseover: 'pause',
											onmouseout:  'play',
											onstartup: 	 'play',
											cursor: 	 'pointer'
										});
		$('#no_mouse_events').ResetScroller({	onmouseover: 'play', onmouseout: 'play'   });

	$("#content").prepend('<div class="apple_overlay" id="overlay"><div id="contentWrap">123</div></div>');
	$(".content img[rel]").before(function(){ return "<div style='display:inline-block; width:"+$(this).css('width')+"; position:relative; float:"+$(this).css('float')+";'><span style='position:absolute; width:70px; margin-left:230px; display:inline-block; color: #88c; font-size:8px; text-align:right;'>click for more info</span><div style='position:relative'>";})
		.after("</div></div>")
		.hover(function(e){
			e.preventDefault();
			$(this).attr('title',$(this).attr('otitle'));
			$(this).attr('otitle','');
		},function(){}).mouseover(function () {
		$(this).css('cursor', 'pointer');
		$(this).attr('otitle',$(this).attr('title'));
		$(this).attr('title','');
	}).overlay({
		mask: "#111155",
		effect: 'apple',
		onBeforeLoad: function (){
			var wrap = document.getElementById('contentWrap');
			wrap.innerHTML="<img src='"+(this.getTrigger().attr("src"))+"' style='max-width:100%;' /><p>"+(this.getTrigger().attr("otitle"))+"</p><p class='tiny'>"+(this.getTrigger().attr("alt"))+"</p>";
		}
	});
});
