1$(document).ready(function () { 2 3 var hasFlash = false; 4 5 try { 6 hasFlash = Boolean(new ActiveXObject('ShockwaveFlash.ShockwaveFlash')); 7 } catch (exception) { 8 hasFlash = ('undefined' != typeof navigator.mimeTypes['application/x-shockwave-flash']); 9 } 10 11 if(!hasFlash){ 12 $('#timemachine_flash').append('<p class="flash-not-found home">A lejátszáshoz Flash Player engedélyezése szükséges | Javasolt böngészÅ: Mozilla Firefox | További segÃtség: <a target="_blank" href="https://support.google.com/chrome/answer/6258784?co=GENIE.Platform%3DDesktop&hl=hu">itt található</a> | Az oldal fejlesztés alatt, hamarosan minden más böngészÅvel elérhetÅ lesz!</p>'); 13 $('#player_flash').append('<p class="flash-not-found player">A lejátszáshoz Flash Player engedélyezése szükséges | Javasolt böngészÅ: Mozilla Firefox | További segÃtség: <a target="_blank" href="https://support.google.com/chrome/answer/6258784?co=GENIE.Platform%3DDesktop&hl=hu">itt található</a> | Az oldal fejlesztés alatt, hamarosan minden más böngészÅvel elérhetÅ lesz!</p>'); 14 } 15 16 ie6=$.browser.msie && ($.browser.version == "6.0") && !window.XMLHttpRequest; 17 18 $.ajaxSetup ({ cache: false }) 19 20 //init cufón fonts 21 Cufon.replace('body.home h3, body.watch h3, #nav .items a, body.common h3',{ hover:true}); 22 23 //init community 24 $("#community").mouseover(function() { 25 $("#community .comm").css({"backgroundColor":"#f79312", 'color':'#ffffff'}); 26 $("#community .communitypanel").css({'visibility':'visible'}); 27 }); 28 $("#community").mouseleave(function() { 29 $("#community .comm").css({"backgroundColor":"transparent",'color':'#8C8C8C'}); 30 $("#community .communitypanel").css({'visibility':'hidden'}); 31 }); 32 33 //init login 34 $("#login").mouseover(function() { 35 $("#login .reg").css({"backgroundColor":"#f79312"}); 36 $("#login .loginpanel").css({'visibility':'visible'}); 37 }); 38 $("#login").mouseleave(function() { 39 $("#login .reg").css({"backgroundColor":"transparent"}); 40 $("#login .loginpanel").css({'visibility':'hidden'}); 41 }); 42 $("#login .rememberblock").hide(); 43 $("#login .loginblock .submit").click(function(e) { 44 e.preventDefault(); 45 $.post("index.php", {username:$("#login .loginblock .username").val(),password:$("#login .loginblock .password").val()}, function(data) { 46 if (data.error == 0) { 47 location.reload(true); 48 } else if (data.error == 1) { 49 $("#login .loginblock .username").focus(); 50 showAlert('Hibás e-mail cÃm vagy felhasználónév. Kérjük, Ãrja be adatait újra.'); 51 } 52 }, "json"); 53 }); 54 $("#login .loginblock input").keypress(function (e) { 55 if (e.which == 13) $("#login .loginblock .submit").trigger('click'); 56 }); 57 $("#login .loginblock .remember_link").click(function(e) { 58 e.preventDefault(); 59 $("#login .rememberblock").slideToggle(200); 60 }); 61 $("#login .rememberblock .submit").click(function(e) { 62 e.preventDefault(); 63 $.post("index.php", {email:$("#login .rememberblock .email").val()}, function(data) { 64 if (data.error == 0) { 65 showAlert('A jelszót a megadott e-mail cÃmre elküldtük. Kérjük, ellenÅrizze postafiókját!'); 66 } else if (data.error == 1) { 67 $("#login .rememberblock .email").focus(); 68 showAlert('Nincs ilyen email cÃm!'); 69 } else { 70 showAlert('A jelszó továbbÃtásakor hiba lépett fel. Kérjük, próbálkozzon késÅbb!'); 71 } 72 }, "json"); 73 }); 74 75 //init registration 76 $("#registration").mouseover(function() { 77 $("#registration .reg").css({"backgroundColor":"#f79312"}); 78 $("#registration .regpanel").css({'visibility':'visible'}); 79 }); 80 $("#registration").mouseleave(function() { 81 $("#registration .reg").css({"backgroundColor":"transparent"}); 82 $("#registration .regpanel").css({'visibility':'hidden'}); 83 }); 84 $("#registration .submit").click(function(e) { 85 e.preventDefault(); 86 if ($('#registration .username').val() == "") { 87 showAlert('Kérjük, adjon meg egy felhasználónevet!'); 88 $('#registration .username').focus(); 89 return; 90 } 91 if ($('#registration .name').val() == "") { 92 showAlert('Kérjük, adja meg teljes nevét!'); 93 $('#registration .name').focus(); 94 return; 95 } 96 if ($('#registration .pass').val() == "") { 97 showAlert('Kérjük, adja meg jelszavát!'); 98 $('#registration .pass').focus(); 99 return; 100 } 101 if ($('#registration .pass').val() != $('#registration .passagain').val()) { 102 showAlert('A két jelszó nem azonos. Kérjük, adja meg újra!'); 103 $('#registration .pass').focus(); 104 return; 105 } 106 if (!isValidEmailAddress($('#registration .email').val())) { 107 showAlert('Az email cÃm hibás. Kérjük, adja meg újra!'); 108 $('#registration .email').focus(); 109 return; 110 } 111 112 if (!$('#registration .check').is(':checked')) { 113 showAlert('A felhasználási feltételek elfogadása nélkül nem tudjuk rögzÃteni adatait!'); 114 return; 115 } 116 $.post("index.php", {reg:'1',username:$('#registration .username').val(),name:$('#registration .name').val(),password:$('#registration .pass').val(),email:$('#registration .email').val()}, function(data) { 117 if (data.error == 0) { 118 showAlert('Köszönjük! A regisztrációja megerÅsÃtéséhez szükséges linket elküldtük e-mail cÃmére!'); 119 } else if (data.error == 1) { 120 showAlert('Ez a felhasználónév már szerepel adatbázisunkban. Kérjük, válasszon másikat.'); 121 } 122 }, "json"); 123 }); 124 $("#registration input").keypress(function (e) { 125 if (e.which == 13) $("#registration .submit").trigger('click'); 126 }); 127 128 $(".reglink").click(function(e){ e.preventDefault(); $.scrollTo( '#header', 400); $("#registration").trigger("mouseover");}); 129 $(".loginlink").click(function(e){ e.preventDefault(); $.scrollTo( '#header', 400); $("#login").trigger("mouseover");}); 130 131 132 133 //init header navigation 134 actmenu = 0; 135 $("#nav .menu").css({'height':'0px','visibility':'visible'}); 136 $("#nav .items a").mouseover(function() { 137 var id = $(this).attr('id'); 138 $("#nav .items a").removeClass('hover'); 139 $(this).addClass('hover'); 140 if (actmenu && $("#"+actmenu+"_menu").length != 0) $("#"+actmenu+"_menu").stop(true).animate({'height':'0px'},200); 141 actmenu = id; 142 if ($("#"+actmenu+"_menu").length != 0) { 143 $("#"+actmenu+"_menu").stop(true).animate({'padding-left':'0'},200).animate({'height':'165px'},100); 144 } 145 }); 146 $('#nav').mouseleave(function() { 147 $("#nav .items a").removeClass('hover'); 148 Cufon.replace('#nav .items a'); 149 if (actmenu) $("#"+actmenu+"_menu").stop(true).animate({'height':'0px'},200); 150 }); 151 $('#nav .menu_nav a').click(function(e) { 152 e.preventDefault(); 153 var url = $(this).attr('href').split("?"); 154 $(this).parents(".menu").find(".cols").load(url[0],url[1]); 155 }); 156 $('#nav .search a').click(function(e) { 157 e.preventDefault(); 158 location.href = 'search.php?q='+encodeURIComponent($('#search_input').val()); 159 }); 160 $("#search_input").keypress(function (e) { 161 if (e.which == 13) $('#nav .search a').trigger('click'); 162 }); 163 164 165
166 //tags block init 167 getTags = function(v) { 168 var new_list = ""; 169 if (typeof(v) != "undefined") new_list="gettags="+v+"&"; 170 var a = $('#tags select').val().split("|"); 171 $(".tags_wrapper .tags").animate({'opacity':0},100).load("index.php",new_list+"tagsfield="+a[0]+"&sort="+a[1], function() {$(".tags_wrapper .tags").animate({'opacity':1},200)}); 172 } 173 $('#tags .tabs a').click(function(e) { 174 e.preventDefault(); 175 $('#tags .tabs a').removeClass('selected'); 176 $(this).addClass('selected'); 177 getTags($(this).attr('id').split("_")[2]) 178 }); 179 $('#tags select').change(function() {getTags()}); 180 $("#tags select").styleSelect({optionsWidth: 1, speed: 200}); 181 182 //init spotlight 183 initSpotlightItems(); 184 185 //init alertmsg 186 initAlertMsg(); 187 //GLOBAL init end 188 189 //set common pages height 190 if ($('#content').length > 0) { 191 if ($('#content').height() < $(window).height() - 327) $('#content').css({'height': $(window).height() - 327 +"px"}); 192 } 193 194 195 //HOME init 196 if ($('body.home').length > 0) { 197 swfobject.embedSWF("/flash/timemachine.swf?rnd="+Math.round(Math.random()*1000000000), "timemachine_flash", "100%", "100%", "9.0.115.0", "/flash/expressInstall.swf", playerVars, {menu:'false' , AllowScriptAccess:'always', wmode:'opaque',bgcolor:'#0F0F0F'}, { id:'timemachine_flash'}); 198 } 199 //HOME init end 200 201 202 //SEARCH init 203 if ($('body.search').length > 0) { 204 //init search item 205 $(".search_item .tags").css({'margin-top':(120-$(".search_item .tags").height())/2}); 206 207 //footer positioning on search page 208 $('.pager_container').css('visibility','visible'); 209 $(window).scroll(footerPositioning); 210 $(window).resize(footerPositioning); 211 footerPositioning(); 212 213 //add select skin 214 $(".pager_container select").styleSelect({optionsPos: 'up'}); 215 $(".search_header select").styleSelect({optionsWidth: 1, speed: 200}); 216 $(".search_header select").change(function() { 217 location.href="search.php?ord="+$(this).val()+$(this).attr('title'); 218 }); 219 } 220 //SEARCH init end 221 222 223 //WATCH init 224 if ($('body.watch').length > 0) { 225 226 //add block close button behavior 227 $('h3 span.close').click(function() { 228 $(this).parent().parent().find('.wrapper_content').animate({'height':'toggle'},300); 229 if ($(this).hasClass('close')) { 230 $(this).removeClass("close"); 231 $(this).addClass("open"); 232 } else { 233 $(this).removeClass("open"); 234 $(this).addClass("close"); 235 }; 236 }); 237 238 239 onTagsLoaded(); 240 $('#filmtags input').val('Ãj cÃmke hozzáadása'); 241 $('#filmtags input').autocomplete({serviceUrl:'tag_autocomplete.php', minChars:1, width:145, zIndex: 300, params: { category:5 }}); 242 $('#filmtags input').focus(function() {if ($(this).val() == 'Ãj cÃmke hozzáadása') $(this).val("");}); 243 $('#filmtags input').blur(function() {if ($(this).val() == "") $(this).val('Ãj cÃmke hozzáadása')}); 244 $('#filmtags .add_tag .button').click(function(e) { 245 var t =$('#filmtags input').val(); 246 if (t == "" || t == "Ãj cÃmke hozzáadása") { 247 showAlert("A cÃmke mezÅje üres!"); 248 $('#filmtags input').focus(); 249 return; 250 } 251 var fid = $('#filmtags input').attr('id').split("_")[1]; 252 $.post("watch.php", {tag:t,film_id:fid}, function(data) { 253 if (data.error == 0) { 254 $("#filmtags .tags_list").load("watch.php","id="+fid+"&at=1",onTagsLoaded); 255 } else if (data.error == 3) { 256 showAlert('Ezt a cÃmkét már hozzárendelték a filmhÃrhez!'); 257 } else { 258 showAlert('Nincs jogosultsága az cÃmke hozzáadásához!'); 259 } 260 }, "json"); 261 }); 262 $("#filmtags .add_tag input").keypress(function (e) { 263 if (e.which == 13) $("#filmtags .add_tag .button").trigger('click'); 264 }); 265 266 267 onCommentsLoaded(); 268 $('.comment_input .submit').click(function(e) { 269 e.preventDefault(); 270 var msg = $('.comment_input textarea').val(); 271 if (msg == "") { 272 showAlert("A hozzászólás mezÅje üres!"); 273 return; 274 } 275 var fid = $('.comment_input textarea').attr('id').split("_")[1]; 276 $.post("watch.php", {message:msg,film_id:fid}, function(data) { 277 if (data.error == 0) { 278 var fid = $('.comment_input textarea').attr('id').split("_")[1]; 279 $(".wrapper_comments").load("watch.php","id="+fid+"&page=0&ac=1",onCommentsLoaded); 280 $('.comment_input textarea').val(""); 281 limitChars($(this), 1000, $('.comment_input .textarea_title')); 282 } else { 283 showAlert('Nincs jogosultsága az üzenet törléséhez!'); 284 } 285 }, "json"); 286 }); 287 288 $('.comment_input textarea').keyup(function(){ 289 limitChars($(this), 1000, $('.comment_input .textarea_title')); 290 }); 291 292 if (playerStatus == 1) { 293 $('#player_flash').flash({ 294 swf: "/flash/player.swf?rnd="+Math.round(Math.random()*1000000000), 295 width: 465, 296 height: 350, 297 params: {menu:'false' , AllowScriptAccess:'always', wmode:'opaque', bgcolor:'#000000', AllowFullscreen:'true' }, 298 flashvars: playerVars 299 }); 300 } 301 302 //add tooltip 303 if ($(".tooltip").length > 0) $(".tooltip").toolTip(); 304 305 //add share links 306 $("#forwardpanel .panel_wrapper").css({'visibility':'visible'}).fadeOut(0);
307 $("#forwardpanel").mouseover(function(e) { $(this).find(".panel_wrapper").fadeIn(100); }); 308 $("#forwardpanel").mouseleave(function(e) { $(this).find(".panel_wrapper").fadeOut(200); }); 309 $("#forwardpanel textarea").click(function() {$(this).select();}); 310 311 $("#embedpanel .panel_wrapper").css({'visibility':'visible'}).slideUp(0); 312 $("#embedpanel").mouseover(function(e) { $(this).find(".panel_wrapper").fadeIn(100); }); 313 $("#embedpanel").mouseleave(function(e) { $(this).find(".panel_wrapper").fadeOut(200); }); 314 $("#embedpanel textarea").click(function() {$(this).select();}); 315 316 $(".twitter").click(function(e) { 317 e.preventDefault(); 318 var fid = $('.sharing').attr('id').split("_")[1]; 319 $.get("watch.php","share=1&id="+fid); 320 msgContent = 'Ezt látni kell!: https://filmhiradokonline.hu/watch.php?id='+fid; 321 window.open("http://twitter.com/home?status="+msgContent); 322 }); 323 324 $(".facebook").click(function(e) { 325 e.preventDefault(); 326 var fid = $('.sharing').attr('id').split("_")[1]; 327 $.get("watch.php","share=1&id="+fid); 328 msgContent = 'u='+escape('https://filmhiradokonline.hu/watch.php?id='+fid)+'&t='+escape('Mutatok valamitâ¦'); 329 window.open("http://www.facebook.com/sharer.php?"+msgContent); 330 }); 331 332 $(".iwiw").click(function(e) { 333 e.preventDefault(); 334 var fid = $('.sharing').attr('id').split("_")[1]; 335 $.get("watch.php","share=1&id="+fid); 336 msgContent = 'u='+escape('https://filmhiradokonline.hu/watch.php?id='+fid)+'&t='+escape('Ezt látni kell!'); 337 window.open("http://iwiw.hu/pages/share/share.jsp?"+msgContent); 338 }); 339 340 } 341 //WATCH init end 342 343}); 344 345 346function initSpotlightItems() { 347 $("#spotlight .item").hover( 348 function () { 349 $(this).find('.b').stop().animate({"opacity": "1"}, 100); 350 $(this).find('.a').stop().animate({"opacity": "0"}, 100); 351 $(this).find('.title').stop().animate({color:'#f79312'},100); 352 }, 353 function () { 354 $(this).find('.b').stop().animate({"opacity": "0"}, 200); 355 $(this).find('.a').stop().animate({"opacity": "1"}, 200); 356 $(this).find('.title').stop().animate({color:'white'},200); 357 } 358 ); 359 $("#spotlight .item .img .b").css({'opacity':0}); 360 $("#spotlight .item .img .a").css({'opacity':1}); 361} 362 363function initAlertMsg() { 364 $('#alertmsg').css({'opacity':0}); 365 if (ie6) { 366 $('#alertmsg').css({'position':'absolute'}); 367 $(window).scroll(function() { 368 $('#alertmsg').css({'top':$(window).scrollTop()+"px"}); 369 }); 370 } 371} 372 373function showAlert(text) { 374 $('#alertmsg .wrapper').text(text); 375 $('#alertmsg').stop(true).animate({'height':39,'opacity':1},300).animate({'left':0},3000).animate({'height':0,'opacity':0},300); 376} 377 378function footerPositioning() { 379 var pager = $('body.search .pager_container'); 380 var ph = pager.height(); 381 var h = $(window).scrollTop()+$(window).height()-ph; 382 if ($('.search_items').height() < $(window).height() - 381) $('.search_items').css({'height': $(window).height() - 381 +"px"}); 383 var ft = $('#footer').offset().top; 384 h = h < ft-ph ? h : ft-ph; 385 if (ie6 || h == ft-ph) { 386 $('body.search .pager_container').css({'position':'absolute','top':h+'px','left':'0px'}); 387 return; 388 } else { 389 $('body.search .pager_container').css({'position':'fixed','top':$(window).height()-ph+'px'}); 390 } 391} 392 393function initCommentDelButtons(e) { 394 e.preventDefault(); 395 var p = confirm("Biztosan törölni szeretné a hozzászólást?"); 396 if (p) { 397 var msgId = $(this).attr('href').split('delmsg=')[1]; 398 $.get("watch.php", {'delmsg':msgId}, function(data) { 399 if (data.error == 0) { 400 var fid = $('.comment_input textarea').attr('id').split("_")[1]; 401 $(".wrapper_comments").load("watch.php","id="+fid+"&page=0&ac=1",onCommentsLoaded); 402 } else { 403 showAlert('Nincs jogosultsága az üzenetküldéshez!'); 404 } 405 }, "json"); 406 } 407} 408 409function initTagDelButtons(e) { 410 e.preventDefault(); 411 var p = confirm("Biztosan törölni szeretné a cÃmkét?"); 412 if (p) { 413 var msgId = $(this).attr('href').split('deltag=')[1]; 414 $.get("watch.php", {'deltag':msgId}, function(data) { 415 if (data.error == 0) { 416 var fid = $('#filmtags input').attr('id').split("_")[1]; 417 $("#filmtags .tags_list").load("watch.php","id="+fid+"&at=1",onTagsLoaded); 418 } else { 419 showAlert('Nincs jogosultsága az üzenetküldéshez!'); 420 } 421 }, "json"); 422 } 423} 424 425 426function onTagsLoaded () { 427 $("#filmtags a.tagdelete").click(initTagDelButtons); 428} 429 430function onCommentsLoaded() { 431 $("#comments select").styleSelect({optionsWidth: 1, speed: 300}); 432 $("#comments select").change(onCommentsPagerChange);
433 $("#comments .pager a.left, #comments .pager a.right").click(onCommentsPagerClick); 434 $("#comments a.msgdelete").click(initCommentDelButtons); 435} 436 437function onCommentsPagerChange() { 438 var fid = $('.comment_input textarea').attr('id').split("_")[1]; 439 $(".wrapper_comments").load("watch.php","id="+fid+"&page="+$(this).val()+"&ac=1",onCommentsLoaded); 440} 441 442function onCommentsPagerClick(e) { 443 e.preventDefault(); 444 var vars = $(this).attr('href').split("?")[1]; 445 $(".wrapper_comments").load("watch.php",vars+"&ac=1",onCommentsLoaded); 446} 447 448function isValidEmailAddress(emailAddress) { 449 var pattern = new RegExp(/^(("[\w-\s]+")|([\w-]+(?:\.[\w-]+)*)|("[\w-\s]+")([\w-]+(?:\.[\w-]+)*))(@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$)|(@\[?((25[0-5]\.|2[0-4][0-9]\.|1[0-9]{2}\.|[0-9]{1,2}\.))((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})\.){2}(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})\]?$)/i); 450 return pattern.test(emailAddress); 451} 452 453function limitChars(textarea, limit, infodiv) { 454 var text = textarea.val(); 455 var textlength = text.length; 456 if(textlength > limit-1) { 457 showAlert('Egy hozzászólás legfeljebb '+limit+' karakteres lehet. Kérjük, fogalmazzon tömörebben!') 458 infodiv.html('<strong>Ãj hozzászólás</strong> ('+limit+'/'+textlength+' karakter)'); 459 textarea.val(text.substr(0,limit-1)); 460 return false; 461 } else { 462 infodiv.html('<strong>Ãj hozzászólás</strong> ('+limit+'/'+textlength+' karakter)'); 463 return true; 464 } 465}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.