function winHei(moz){ return (moz) ? window.innerHeight : document.body.clientHeight; } $(document).ready(function(){ var iframe = ''; var browser = (document.getElementById && !document.all) ? 1 : 0; var height = window.innerHeight; //winHei(browser); var casinoid = $('span#casino-id').attr('data-id'); if(casinoid=='3' || casinoid=='4' || casinoid=='5' || casinoid=='10' || casinoid=='7' || casinoid=='1' || casinoid == '11' || casinoid == '17') var casinoNameBox = 'casino-info-box-right'; else var casinoNameBox = 'casino-info-box'; var casinoInfoBox = '
'; var artName = ''; var link = ''; $('body').prepend(iframe); $('span#hidden-site').hide(); $('nav#top-nav ul').css({'top':(height+65)+'px'}); $('iframe#casino-form').before(casinoInfoBox); $.get('/scripts/casino-tracker.php',{id:casinoid},function(data){ link = data; $('iframe#casino-form').attr('src', link); $('iframe#casino-form').focus(); }); $('iframe#casino-form').css({'width':'100%','height':height+'px'}); $('div#'+casinoNameBox).css({'height':(height)+'px'}); $('img#casino-info, div#'+casinoNameBox).animate({opacity: 1}, 500, function(){ $.get('/scripts/casino-info.php',{id:casinoid},function(data){ if(data){ $('div#'+casinoNameBox).html(data); } }); }); $('a#more-about').live('click', function(){ $('span#hidden-site').toggle(); if($('a#more-about').text()=='Czytaj więcej o William Hill') $('a#more-about').text('ukryj tekst'); else $('a#more-about').text('Czytaj więcej o William Hill'); $(window).scrollTo('span#hidden-site',200); return false; }); $('img.hide-image').live('click', function(){ $('img#casino-info, div#'+casinoNameBox).animate({opacity:0},500); $('iframe#casino-form').focus(); }); });