$(document).ready(function() {
	$('#newstickerOn').css({opacity:"0.4"});
	$('#newstickerOff').click(function() { 
		stopNews();
	});
	$('#newstickerOn').click(function() { 
		startNews();
	});
	$('#newstickerLeft').click(function() { 
		stopNews();
	});
	$('#newstickerRight').click(function() { 
		stopNews();
	});
	$('#newsticker').cycle({
    fx:    'scrollHorz', 
    delay: -1000,
	speed: 900,
	timeout: 6000,
	pause: 1,
	prev:    '#newstickerLeft', 
    next:    '#newstickerRight' 
	});
	function stopNews (){
		$('#newsticker').cycle('pause'); 
		$('#newstickerOff').css({opacity:"0.4"});
		$('#newstickerOn').css({opacity:"1.0"});
	}
	function startNews (){
		$('#newsticker').cycle('resume'); 
		$('#newstickerOn').css({opacity:"0.4"});
		$('#newstickerOff').css({opacity:"1.0"});
	}
	$('a.nyroModal').nyroModal({
	type: 'iframe',
	width: iframe_width,
	height: iframe_height,
	padding: 0,
	autoSizable: false,
	hideContent: function hideContent(elts, settings, callback) {
		elts.contentWrapper.hide();
		callback();
		}
	});
});
