(function($){$.fn.jFlow=function(options){var opts=$.extend({},$.fn.jFlow.defaults,options);var randNum=Math.floor(Math.random()*11);var jFC=opts.controller;var jFS=opts.slideWrapper;var jSel=opts.selectedWrapper;var cur=0;var timer;var maxi=$(jFC).length;var slide=function(dur,i){$(opts.slides).children().css({overflow:"hidden"});$(opts.slides+" iframe").hide().addClass("temp_hide");$(opts.slides).animate({marginLeft:"-"+(i*$(opts.slides).find(":first-child").width()+"px")},opts.duration*(dur),opts.easing,function(){$(opts.slides).children().css({overflow:"hidden"});$(".temp_hide").show();});}
$(this).find(jFC).each(function(i){var id_people=$(this).attr('id');var people_name=$('#'+id_people+'').attr('name');var people_photo=$('#'+id_people+' > img').attr('src');var name_normalise=$('#'+id_people+'').attr('normalise');var cible=$('#slide_'+id_people);var cible_img=$('#slide_img_'+id_people);if(people_photo!=undefined&&people_photo!="undefined"){cible_img.html('<a href="http://www.news-porno.fr/'+name_normalise+'/"><img src="'+people_photo+'" border="0" width="114" height="194"></a>');}
var data_html='';data_html=data_html+'<h2><a href="http://www.news-porno.fr/'+name_normalise+'/">'+people_name+'</a></h2>';data_html=data_html+"<div class='description'>";$('a[name|="'+people_name+'"]').each(function(z){data_html=data_html+"<br>&#149; <a class='a_lien' href='"+$(this).attr('href')+"'>";var mag_title=$(this).attr('title');var news_photo=$(this).attr('photo');if(mag_title!=undefined&&mag_title!="undefined"&&mag_title!=''){var the_href=$(this).attr('href');the_href=the_href.replace("http://www.news-porno.fr/","");var pos_texte1=the_href.indexOf('-avec-');var texte1=the_href.substr(0,pos_texte1);var pos_texte2=texte1.indexOf('-');var texte2=texte1.substr(pos_texte2+1,2000);var pos_texte3=texte2.indexOf('-n');var nom_mag=texte2.substr(0,pos_texte3);var numero_mag=texte2.substr(pos_texte3+2,2000);var image_mag="images/presse/"+nom_mag+"-"+numero_mag+".jpg";data_html=data_html+'<img src="'+image_mag+'" border=0 style="float:left;margin-right:2px;" width="100px">';}else if(news_photo!=undefined&&news_photo!="undefined"&&news_photo!=''){var image_mag="photos_news/"+news_photo+".jpg";data_html=data_html+'<img src="'+image_mag+'" border=0 style="float:left;margin-right:2px;" width="60px">';}
data_html=data_html+$(this).html()+"</a>";});data_html=data_html+"</div>";cible.html(data_html);$(this).click(function(){dotimer();if($(opts.slides).is(":not(:animated)")){$(jFC).removeClass(jSel);$(this).addClass(jSel);var dur=Math.abs(cur-i);slide(dur,i);cur=i;}});});$(opts.slides).before('<div id="'+jFS.substring(1,jFS.length)+'"></div>').appendTo(jFS);$(opts.slides).find("div").each(function(){$(this).before('<div class="jFlowSlideContainer"></div>').appendTo($(this).prev());});$(jFC).eq(cur).addClass(jSel);var resize=function(x){$(jFS).css({position:"relative",width:opts.width,height:opts.height,overflow:"hidden"});$(opts.slides).css({position:"relative",width:$(jFS).width()*$(jFC).length+"px",height:$(jFS).height()+"px",overflow:"hidden"});$(opts.slides).children().css({position:"relative",width:$(jFS).width()+"px",height:$(jFS).height()+"px","float":"left",overflow:"hidden"});$(opts.slides).css({marginLeft:"-"+(cur*$(opts.slides).find(":eq(0)").width()+"px")});}
resize();$(window).resize(function(){resize();});$(opts.prev).click(function(){dotimer();doprev();});$(opts.next).click(function(){dotimer();donext();});var doprev=function(x){if($(opts.slides).is(":not(:animated)")){var dur=1;if(cur>0)
cur--;else{cur=maxi-1;dur=cur;}
$(jFC).removeClass(jSel);slide(dur,cur);$(jFC).eq(cur).addClass(jSel);}}
var donext=function(x){if($(opts.slides).is(":not(:animated)")){var dur=1;if(cur<maxi-1)
cur++;else{cur=0;dur=maxi-1;}
$(jFC).removeClass(jSel);slide(dur,cur);$(jFC).eq(cur).addClass(jSel);}}
var dotimer=function(x){if((opts.auto)==true){if(timer!=null)
clearInterval(timer);timer=setInterval(function(){$(opts.next).click();},3000);}}
dotimer();};$.fn.jFlow.defaults={controller:".jFlowControl",slideWrapper:"#jFlowSlide",selectedWrapper:"jFlowSelected",auto:false,easing:"swing",duration:400,width:"100%",prev:".jFlowPrev",next:".jFlowNext"};})(jQuery);
(function($){jQuery.fn.backOpacity=function(settings){settings=jQuery.extend({background:'#000000',opacity:0.5},settings);jQuery(this).each(function(intIndex){var pt=parseInt($(this).css('paddingTop'));var pb=parseInt($(this).css('paddingBottom'));var pl=parseInt($(this).css('paddingLeft'));var pr=parseInt($(this).css('paddingRight'));var fixedleft=parseInt($(this).css('marginLeft'));var fixedright=parseInt($(this).css('marginRight'));var parentow=$(this).width();var fixedwidth,fixedheight,fixedleft,fixedright=0;fixedwidth=parentow+pl+pr;fixedheight=$(this).height()+pt+pb;$(document.createElement('div')).width(fixedwidth).height(fixedheight).css({backgroundColor:settings.background,opacity:settings.opacity,position:'relative',marginLeft:fixedleft+'px',marginRight:fixedright+'px',left:0,top:0,bottom:0,zIndex:((10)+intIndex*10)}).insertAfter($(this));$(this).css({width:parentow,position:'absolute',zIndex:((20)+intIndex*20)});});return jQuery;};})(jQuery);
