$(document).ready(function(){ /*$("#slid_text").fadeTo(0, 0.0); */ /* var $min_h = "555"; */ var $win_h = screen.height; var $win_w = $(window).width(); $('#player').css('height' , $win_h); $('#player').css('position','absolute'); //$('#player').css('top' , '-35px'); $('#player').css('left' , '0px'); $('#player').css('width' , $win_w); //setInterval('alert(document.body.clientWidth)', 4000); function chekSize() { /* var $screen_w = document.body.clientWidth; var $screen_h = document.body.clientHeight; */ var $screen_w = screen.width; var $screen_h = screen.height; //alert("h:"+$screen_h+" w:"+$screen_w); if (($screen_h > 500 ) && ($screen_h < 780 ) && ($screen_w > 1000) && ($screen_w < 1290)) { $('#player').css('width' , '1366px');}; if (($screen_h > 780 ) && ($screen_h < 810) && ($screen_w > 1270) && ($screen_w < 1300)) { $('#buttons').css('bottom' , '42px'); //1280*800 no }; if (($screen_h > 740 ) && ($screen_h < 785) && ($screen_w > 1355) && ($screen_w < 1380)) { $('#player').css('width' , '1366px');}; if (($screen_h > 860) && ($screen_h < 920) && ($screen_w > 1420) && ($screen_w < 1460)) { $('#player').css('width' , '1601px');//1440*900 no $('#player').css('height' , '900px'); $('#player').css('left' , '-80px'); }; if (($screen_h > 860 ) && ($screen_h < 920) && ($screen_w > 1580) && ($screen_w < 1620)) { $('#player').css('width' , '1601px'); $('#player').css('height' , '900px'); }; if (($screen_h > 1000 ) && ($screen_h < 1020) && ($screen_w > 1660) && ($screen_w < 1050)) { $('#player').css('width' , '1868px'); $('#player').css('height' , '1050px'); }; if (($screen_h > 1020) && ($screen_h < 1280) && ($screen_w > 1900) && ($screen_w < 1940)) { $('#player').css('width' , '1921px'); $('#player').css('height' , '1080px'); }; if (($screen_h > 1000) && ($screen_h < 1050) && ($screen_w > 1260) && ($screen_w < 1290)) { $('#player').css('width' , '1828px'); }; //if (($screen_h > ) && ($screen_h < ) && ($screen_w > ) && ($screen_w < )) { }; /* // var $win_h = screen.height; var $win_h = $(window).height; var $win_w = $(window).width(); if ($win_w < 860) { $('#player').css('top', '-160px'); } else { $('#player').css('top', '-30px'); $('#player').css('height' , $win_h); $('#player').css('width' , $win_w); $('#blocked_div').css('height' , $win_h); $('#blocked_div').css('width' , $win_w); } */ /*if ($win_h < $min_h ) { $('body').css('overflow', "auto"); } else { $('body').css('overflow', "hidden"); }*/ }; setTimeout(chekSize, 1); var unmuteVol; $('#blocked_div').css('height' , $win_h); $('#blocked_div').css('width' , $win_w); /*player.pauseVideo(); YT.PlayerState.PAUSED;*/ $('#start').click(function(){ player.playVideo(); }); $('#pause').click(function(){ player.pauseVideo(); }); $('#mute').click(function(){ if (!player.isMuted()){ var curVol = player.getVolume(); $('#curent_vol').val(curVol); player.mute(); $('#volCur').text("0%"); } if (player.isMuted()){ player.unMute(); curVol=$('#curent_vol').val(); $('#volCur').text(curVol+"%"); } }); var $currentVol; $('#volMin').click(function(){ $currentVol=player.getVolume(); if ($currentVol >=10) { $currentVol=$currentVol-10; player.setVolume($currentVol); $('#volCur').text($currentVol+"%"); } }); $('#volPlus').click(function(){ $currentVol=player.getVolume(); if ($currentVol <=90) { $currentVol=$currentVol+10; $('#volCur').text($currentVol+"%"); player.setVolume($currentVol); } }); });