if (!window.console) console = {}; console.log = console.log || function(){}; console.warn = console.warn || function(){}; console.error = console.error || function(){}; console.info = console.info || function(){}; var fire_count=0; //http://4loc.wordpress.com/2009/04/28/documentready-vs-windowload/ //jQuery(document).ready(function (jQuery) { //jQuery(window).load(function () { jQuery("#ret_autosize").live("ON", function (e, a) { /* a.width= largeur de l'image a.height= hauteur de l'image a.theImage= l'objet image a.src_img= url de l'image */ fire_count = fire_count+1; if(dyn_mode=='FLOW' || dyn_mode=='FLOW0'){ console.log('info : returned by autosize are these a.width x a.height :'+a.width+'x'+a.height); console.log('info : returned by autosize are these a.window_width x a.window_height :'+a.window_width+'x'+a.window_height); console.log('saving in cookie the actual size ('+a.window_width+'x'+a.window_height+') for next pic'); jQuery.cookie("dynamic_width", a.window_width); jQuery.cookie("dynamic_height", a.window_height); }else if(dyn_mode =='XHR'){ //trying to download actual picture if (typeof dyn_src_img == "undefined") { console.error('var dyn_src_img is not defined !! please check template'); }else if(fire_count>1){ console.log('source not downloaded again'); }else{ console.log(dyn_src_img); console.log("fire_count:"+fire_count); //@todo: deal with alternative methods dyn_src='/slir/w'+a.width+'-h'+a.height+'/'+dyn_src_img; //dyn_src_img=dyn_src_img+'&dyn_width='+a.width+'&dyn_height='+a.height; console.log('dyn_src_img:'+dyn_src_img); a.theImage.src = dyn_src_img; } } }) //}) //}) function fire_ret_autosize(){ jQuery("#ret_autosize").trigger("ON"); } jQuery(document).ready(function (jQuery) { jQuery(window).load(function () { $("
").attr({ id: "prefetchContainer", }).appendTo("#tabZone").css({ display: "none" }); simpleLoad(next_dyn_url); }) }) //simple image load function simpleLoad(fileName) { $("").attr({ id: "next_pic", src: fileName, title: fileName }).appendTo("#prefetchContainer").css({ display: "none" }); };