'; view_pix_window(_text, width_new, height_new, 'hidden'); var height_image_view_pix = $('.image_view_pix').css('height').replace('px', ''); if(height_image_view_pix > height_new){ height_image_view_pix = height_new; } $('#window').css({'height':height_image_view_pix}); $('#window').css({'overflow':'scroll'}); $('.image_view_pix').on('dblclick', function(){ if(url.indexOf('fizord.ru') !== -1){ url_ = url + '&o=true'; if(height_image_view_pix > height_new){ h_w = 'height'; } else { h_w = 'width'; } if(fizord['device'] == 'd'){ h_w_px = 1200; } else { h_w_px = 800; } var _text = text_closed + ''; view_pix_window(_text, width_new, height_new, 'hidden'); $('.image_view_pix').on('dblclick', function(){ view_pix(url); }); } else { var width_image = $('.image_view_pix').width(); if(width_image == img.width){ $('.image_view_pix').css({'width':width_new}); $('#window').css({'height':height_image_view_pix}); $('#window').css({'width':width_new}); } else { $('.image_view_pix').css({'width':img.width}); if(img.height > height_new){ $('#window').css({'height':height_new}); } else { $('#window').css({'height':img.height}); } if(width_new > img.width){ $('#window').css({'width':img.width}); } else { $('#window').css({'width':width_new}); } } } }); }; img.src = url; } else { console.log(3); var _text = text_closed + ''; view_pix_window(_text, width_new, height_new, 'auto'); } } else { window.history.pushState("", "", location_href); $('.site_image_view').html(''); } } function resize_window_m(){ $('#container').css({'width':'auto'}); $('#header').css({'width':'100%'}); fizord['device'] = 'm';} function resize_window_d(){ $('#container').css({'width':'890px'}); $('#header').css({'width':'890px'}); fizord['device'] = 'd';} function resize_window(){ var w = $(window).width(); if(w < 900){ resize_window_m(); } else { if($.cookie('d') == 'm'){ resize_window_m(); } else { resize_window_d(); } } } resize_window(); $(window).resize(function(){ resize_window(); });