this.eventslide = function() {
	$('.header-home.right').css({'position': 'relative', 'overflow': 'hidden'}).append('<img src="/cash.png" alt="slider" style="position: absolute; bottom:0; left:0; margin: 0 0 6px 8px" />')
	if ($('.header-home.right ul li:eq(4)').length) {
		slide('.header-home.right ul li:eq(0)')
	}
} 

this.slide = function(e) {
	var timeout = setTimeout(function(){
		var temphtml = $(e).html()
		$(e).fadeOut(600, function(){ $(this).remove() })
		$('.header-home.right ul').append('<li class="newnews" style="display:none">'+ temphtml + '</li>').find('.newnews').fadeIn(400)
		slide(e)
	}, 3000)
	
}

this.prepareComments = function(){
    
    $("#ccounter").click(function(){
        $("#comments").toggle("slow")
    })
    
    $("#formcomment").submit(function(){
    
        $.ajax({  //enregistrer contact
                type: 'POST',
                url: "http://www.manufuture.ch?action=mf_addComment",
                contentType: "application/x-www-form-urlencoded",
                data: $("#formcomment").serialize(),
                   success: function( msg ){
                       
                       apprise( $("#message").html(), {'animate':true}, function(r){
                                if(r){
                                   location.reload()
                                    }
                                });                       
                   }
            });
            return false;
        })   
}


$(document).ready(function() {
    $("#iframe").attr("src", "http://www.enterprise-europe-network.ch/marketplace/stakeholder/index.php?file=302&source=Manufuture&l=uk&width=600&target=self").attr("height","6000");
    
    setTimeout(function() {
            $("#loader").css("display","none")
            $("#loaderlogo").css("display","none")
  }, 8000);
  
  prepareComments()
  $('#QapTcha').QapTcha({disabledSubmit:true,autoRevert:false});


})
