
sIFR.replace(flamabold, {
  selector: '#main h1',
  css: '.sIFR-root { background-color: transparent; color: #000000; text-transform: uppercase;}'
});



(function($){
	$.pbslider.fn.extend({

		afterInitializing: function()
		{
			this.showTitles();
		},

		
		beforeSliding: function()
		{
			this.hideTitles();
		},
		
		afterSliding: function()
		{
			this.showTitles();
		},
		
		hideTitles:function(){
			$('#bigcarousel-wrap h2, #bigcarousel-wrap h3, #bigcarousel-wrap a').remove();
		},
		
		showTitles: function(){
			var right = (this.firstPosition + this.options.startItem + 2) % this.nbItems;
			var left = (this.firstPosition + this.options.startItem) % this.nbItems;
			
			this.showSideTitle(left, 'left');
			this.showSideTitle(right, 'right');
			this.showCenterTitle((this.firstPosition + this.options.startItem + 1) % this.nbItems);
			
			
			 $('#bigcarousel-wrap h2, #bigcarousel-wrap h3, #bigcarousel-wrap a').css('display', 'block');
			 
			 /* Controls if the side title are 1 or 2 line heigh */
			 $('.title-banner-center').each(function(){
			 	if($(this).css('height')!='12px')
			 	{
			 		$(this).parent().children().addClass('double-ligne');
			 	}
			 })
			 ;
		},
		
		showSideTitle: function(itemPosition, side)
		{	
			
			var e = this.items[itemPosition];
		    $('<h2 class="small-title '+side+'-title"><div class="title-banner-left"></div><a href="'+config['base_url']+'index.php/'+config['language_abbr']+'/serie/show/'+e.id+'" class="title-banner-center">'+e.title+'</a><div class="title-banner-right"></div></h2>').appendTo('#bigcarousel-wrap');
		    
		},
		
		showCenterTitle: function( itemPosition)
		{	
			var e = this.items[itemPosition];
	    	$('<a href="'+config['base_url']+'index.php/'+config['language_abbr']+'/serie/show/'+e.id+'" class="pbslider-download"><img src="'+config['base_url']+'img/button/watch_download_big.png" /></a>').appendTo('#bigcarousel-wrap');
	    	$('<h2><div class="title-banner-left"></div><a href="'+config['base_url']+'index.php/'+config['language_abbr']+'/serie/show/'+e.id+'" class="title-banner-center">'+e.title+'</a><div class="title-banner-right"></div></h2>').appendTo('#bigcarousel-wrap');
	    	$('<h3 class="pbslider-top-title"><div class="title-banner-left"></div><div class="title-banner-center">'+e.infos+'</div><div class="title-banner-right"></div></h3>').appendTo('#bigcarousel-wrap');
	    	$('<h3 class="pbslider-tags"><div class="title-banner-left"></div><div class="title-banner-center">'+e.tags+'</div><div class="title-banner-right"></div></h3>').appendTo('#bigcarousel-wrap')
	  	}
	})
})(jQuery);

jQuery(document).ready(function() {

	 if($('#bigcarousel').html()!=null)
	 {
  	$('#bigcarousel').pbslider({
  		startItem:0,
  		imgWidth: "690px",
  		visibleItems: 3,
  		ajaxURL: config['base_url']+"index.php/"+config['language_abbr']+"/slider/get_slides/big",
  		autoSlide: true
  	});
    }


	

});