$(document).ready(function(){ 
$('#playpause').click(function() {
    var obj = $(this);
    if (obj.hasClass('pause')) {
        obj.removeClass('pause').addClass('play');
		obj.html('>');
        $('#slideshow').cycle('pause'); 
    } else if (obj.hasClass('play')) {
        obj.removeClass('play').addClass('pause');
		obj.html('II');
        $('#slideshow').cycle('resume');
    }
});	
});	
	


$(function() {

    $('#slideshow').cycle({
        fx:      'scrollHorz',
        timeout:  0,
		speed: '1000',
		timeout: '3000',
        prev:    '.prev',
        next:    '.next',
        pager:   '.navnumbers',
        pagerAnchorBuilder: pagerFactory
    });


	
    function pagerFactory(idx, slide) {
        var s = idx > 10 ? ' style="display:none"' : '';
        // return '<li'+s+'><a href="#">'+(idx+1)+'</a></li>';
		return '<li'+s+'><a href="#">&nbsp;</a></li>';
    };
    
});

$(document).ready(function() {
$('#contente').hide(); 
$('#contente').fadeIn(2000,  function() {});
});

$(document).ready(function() {
var deviceAgent = navigator.userAgent.toLowerCase();
	var agentID = deviceAgent.match(/(iphone|ipod|ipad)/);
	if (agentID) {
 
$('head').append("<link rel='stylesheet' type='text/css' href='media/ipad.css'/>");
 
}
});
