var window_width = $(window).width(); var window_height = $(window).height(); $(document).ready(function(){ /* SNS보내기 URL복사 */ //URL복사 창 가운데 정렬 rePostion = function() { $("#Url_Layer").each(function(){ $(this).css('left', (window_width / 2) - ($(this).width() /2) + 'px'); $(this).css('top', (window_height / 2) - ($(this).height() /2) + 'px'); }); } //URL복사 창 띄우기 showPopup = function() { $("#Url_Layer").show(); $("#Url_Layer_bg").show(); rePostion(); } //URL복사 창 브라우저 사이즈에 따라 위치 재설정 $(window).bind("resize", function(){ rePostion(); }); //닫기버튼 클릭시 닫기 $("#Url_Layer .close").bind("click", function(){ $("#Url_Layer").css('display','none'); $("#Url_Layer_bg").css('display','none'); }); //URL주소 클릭시 자동 전체석택 $("#Url_Layer .ct_bg textarea").click( function () { $(".ct_bg textarea").select(); }); //URL복사 창 뒤에 배경 클릭시 닫기 $("#Url_Layer_bg").bind("click", function(){ $("#Url_Layer").css('display','none'); $("#Url_Layer_bg").css('display','none'); }); /* //SNS보내기 URL복사 */ /* tss 추가 */ audio = new Audio(); tts_chk = false; $('#tts_on').toggle(function() { var a= $(this).attr('tts_url'); var b= $(this).attr('tts_uid'); var s=document.getElementById("tts_on"); var tts_data="tts_url="+a+"&tts_uid="+b; if(!tts_chk) { $.ajax({ data: tts_data, type: 'GET', cache: false, async: false, url: 'https://tts.inswave.net/tts_ins.php', success:function(args){ tts_chk = true; audio.src = args; audio.load(); audio.play(); $("#tts_on").attr("speak","off"); }, error:function(request,status,error){ alert(request.status+":"+request.responseText+"::"+error); } }); } else { audio.play(); $("#tts_on").attr("speak","off"); } }, function() { audio.pause(); audio.currentTime = 0; $("#tts_on").attr("speak","on"); }); /* tts 끝 */ //ssl 적용시 이미지 주소들이 http:// 인 경우 해당 이미지 주소가 강제 https:// 접속으로 인하여 ssl 적용 안된 곳은 접속 오류로 노출 안되는 문제 적용 /*var protocol = location.protocol; if(protocol=="https:") { $("img").each(function() { var imgsrc = $(this).attr("src"); if(imgsrc.indexOf("http:") != -1) { $(this).attr("src","https://f.xza.co.kr/"+imgsrc); } }); $("span.img").each(function() { var bg_url = $(this).css('background-image'); bg_url = /^url\((['"]?)(.*)\1\)$/.exec(bg_url); bg_url = bg_url ? bg_url[2] : ""; $(this).css({"background":"url(https://f.xza.co.kr/"+ bg_url +")"}); }); }*/ }); function MM_openBrWindow(theURL,winName,features) { //v2.0 var popup = window.open(theURL,winName,features); popup.focus(); } var ajax = { request : '', ajax_init : function(){ try { ajax.request = new XMLHttpRequest(); } catch (trymicrosoft) { try { ajax.request = new ActiveXObject("Msxml2.XMLHTTP"); } catch (othermicrosoft) { try { ajax.request = new ActiveXObject("Microsoft.XMLHTTP"); } catch (failed) { ajax.request = false; } } } if (!ajax.request) { alert("Error initializing XMLHttpRequest!"); } }, ajax_action: function (url,method,parameters,onok,onfail) { ajax.ajax_init(); if(method=="get") { ajax.request.open("GET",url, true); ajax.request.onreadystatechange =onok; ajax.request.send(null); } else if(method=="post") { ajax.request.open('POST',url, true); ajax.request.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); ajax.request.setRequestHeader("Content-length",parameters.length); ajax.request.setRequestHeader("Connection", "close"); ajax.request.send(parameters); ajax.request.onreadystatechange = onok; } }, script_add : function () { var url = "./j1_exe.php?uid="; ajax.ajax_action(url,'get','',rPage,''); }, ins_main_create : function () { // alert('aa'); var url = "./ins_main_create.php"; ajax.ajax_action(url,'get','',rPage,''); } }; function rPage() { if (ajax.request.readyState == 4) { if (ajax.request.status == 200) { //result = ajax.request.responseText; //alert(result); } else { //alert('입력 에러'); } } } function img_resize() { // content 아이디 내의 모든 이미지 크기가 maxsize 보다 크면 maxsize로 리사이즈. maxsize = document.body.clientWidth; //창크기 //var content = document.getElementById("content"); // eval('content.width = maxsize/1.2') ; var img = document.getElementsByTagName("img"); var table = document.getElementsByTagName("table"); for(i=0; i maxsize') ) { eval('img[' + i + '].width = maxsize/1.2') ; } } } //window.onload = img_resize; //window.onresize = img_resize; //카카오톡 보내기 function executeURLLink(a,b,c,d) { kakao_send_mobile.link("talk").send({ msg : a, url : b, appid : c, appver : "2.0", appname : d, type : "link" }); } //카카오스토리 보내기 function executeKakaoStoryLink(a,b,c,d,e,f,g) { kakao_send_mobile.link("story").send({ post : b, appid : c, appver : "1.0", appname : d, urlinfo : JSON.stringify({title:a, desc:e, imageurl:[f], type:g}) }); } function log_count(url) { ajax.ajax_action(url,'get','',null_ok,''); } function m_count(url) { ajax.ajax_action(url,'get','',null_ok,''); //ajax.ajax_action(url,'post','',null_ok,''); return false; } function null_ok() { } function reader_checkForm_body(){ formObj = document.rc; if (formObj.reader_name.value == '') { alert('이름을 입력해 주십시오 '); formObj.reader_name.focus(); return false; } else if(formObj.reader_passwd.value == '') { alert(' 패스워드를 입력해 주십시오'); formObj.reader_passwd.focus(); return false; } else if(formObj.reader_body.value == '') { alert(' 내용을 입력해 주십시오'); formObj.reader_body.focus(); return false; } else if(formObj.nospam.value == '') { alert(' 스팸검사에 옆의 숫자를 입력해 주십시오'); formObj.nospam.focus(); return false; } var url=$rss_url +"/m/php_bin/ins_reader_add_exe.php"; var parameters="d_mode=input&newsuid="+formObj.newsuid.value; parameters +="&reader_name="+ encodeURI(formObj.reader_name.value); parameters +="&reader_passwd="+ encodeURI(formObj.reader_passwd.value); parameters +="&reader_body="+ encodeURI(formObj.reader_body.value); parameters +="&nospam="+ encodeURI(formObj.nospam.value); parameters +="&u_id="+ encodeURI(formObj.d_id.value); //alert(parameters); ajax.ajax_action(url,'post',parameters,r_c,''); formObj.reader_name.value=""; formObj.reader_passwd.value=""; formObj.reader_body.value=""; formObj.nospam.value=""; return false; } function vod_main_view(v_uid) { var url2="/php_bin/ins_news_vod_main_view.php?d_mode=get&v_uid="+v_uid; ajax.ajax_action(url2,'get','',vod_ok,''); } function vod_ok() { if (ajax.request.readyState == 4) { if (ajax.request.status == 200) { result = ajax.request.responseText; document.getElementById('ins_vod_main').innerHTML = result; } else { alert('입력 에러'); } } } //무단복사 방지 마우스 드래드 금지 function mou() { // } document.contextmenu = new Function ('return false'); /* function MRKN_imgProportion($targetWidth, $targetHeight) { var DeviceWidth = parseInt($(window).width()) - 30; //핸드폰의 가로 사이즈를 구합니다. var a1 = DeviceWidth * $targetHeight; //이미지 세로사이즈 계산식 var newHeight = (a1 / $targetWidth); //이미지 세로사이즈 계산식 var rtnSize = new Array((DeviceWidth), newHeight); //리사이징 된 이미지 사이즈 리턴 //console.log("0 :: $targetWidth : "+$targetWidth+"\n"+"$targetHeight : "+$targetHeight+"\n"+"DeviceWidth : "+DeviceWidth+"\n"+"a1 : "+a1+"\n"+"newHeight : "+newHeight+"\n"+"rtnSize : "+rtnSize+"\n"); return rtnSize; } $(document).ready(function(){ $('#textinput').find('img').each(function(){ //이미지를 먼저 찾습니다. var $this = $(this); //선택자를 지정합니다. var $thisWidth = parseInt($this.css("width")); //선택된 이미지의 가로사이즈를 구합니다. var $thisHeight = this.naturalHeight; //선택된 이미지의 세로사이즈를 구합니다. var clientWidth = parseInt($(window).width()); //핸드폰의 가로사이즈를 구합니다. if($thisWidth > clientWidth) //만약에 이미지 가로가 핸드폰 가로보다 길다면.... { var rtn = MRKN_imgProportion($thisWidth, $thisHeight); //Function 에 파라미터를 넘김니다 var newWidth = rtn[0]; //Return 된 배열의 0번째 값을 읽어옵니다. var newHeight = rtn[1]; //Return 된 배열의 1번째 값을 읽어옵니다. if(newHeight==0) { newHeight="auto"; } $this.css({ //선택된 이미지에 CSS를 변경합니다. "width" : newWidth, "height" : newHeight }) $thisWidth1 = parseInt($('#textinput').find('.img_resize').css("width")); $('#textinput').find('.table_resize').css({ //선택된 이미지에 CSS를 변경합니다. "width" : $thisWidth1 }) } //console.log("1 :: $thisWidth : "+$thisWidth+"\n"+"$thisHeight : "+$thisHeight+"\n"+"clientWidth : "+clientWidth+"\n"+"newWidth : "+newWidth+"\n"+"newHeight : "+newHeight+"\n"+"thisWidth1 : \n"); }); */ /* $('#textinput').find('table').each(function(){ //이미지를 먼저 찾습니다. var $this = $(this); //선택자를 지정합니다. var $thisWidth = parseInt($this.css("width")); //선택된 이미지의 가로사이즈를 구합니다. var $thisHeight = parseInt($this.css("height")); //선택된 이미지의 세로사이즈를 구합니다. var clientWidth = parseInt($(window).width()); //핸드폰의 가로사이즈를 구합니다. if($thisWidth > clientWidth) //만약에 이미지 가로가 핸드폰 가로보다 길다면.... { var rtn = MRKN_imgProportion($thisWidth, $thisHeight); //Function 에 파라미터를 넘김니다 var newWidth = rtn[0]; //Return 된 배열의 0번째 값을 읽어옵니다. var newHeight = rtn[1]; //Return 된 배열의 1번째 값을 읽어옵니다. $this.css({ //선택된 이미지에 CSS를 변경합니다. "width" : newWidth }) } console.log("2 :: $thisWidth : "+$thisWidth+"\n"+"$thisHeight : "+$thisHeight+"\n"+"clientWidth : "+clientWidth+"\n"+"newWidth : "+newWidth+"\n"+"newHeight : "+newHeight+"\n"); });*/ /* }); $(window).resize(function(){ $('#textinput').find('img').each(function(){ //이미지를 먼저 찾습니다. var $this = $(this); //선택자를 지정합니다. var $thisWidth = parseInt($this.css("width")); //선택된 이미지의 가로사이즈를 구합니다. var $thisHeight = parseInt($this.css("height")); //선택된 이미지의 세로사이즈를 구합니다. var clientWidth = parseInt($(window).width()); //핸드폰의 가로사이즈를 구합니다. if($thisWidth > clientWidth) //만약에 이미지 가로가 핸드폰 가로보다 길다면.... { var rtn = MRKN_imgProportion($thisWidth, $thisHeight); //Function 에 파라미터를 넘김니다 var newWidth = rtn[0]; //Return 된 배열의 0번째 값을 읽어옵니다. var newHeight = rtn[1]; //Return 된 배열의 1번째 값을 읽어옵니다. if(newHeight<=0) { newHeight="auto"; } $this.css({ //선택된 이미지에 CSS를 변경합니다. "width" : newWidth, "height" : newHeight }) $thisWidth1 = parseInt($('#textinput').find('.img_resize').css("width")); $('#textinput').find('.table_resize').css({ //선택된 이미지에 CSS를 변경합니다. "width" : $thisWidth1 }) } //console.log("3 :: $thisWidth : "+$thisWidth+"\n"+"$thisHeight : "+$thisHeight+"\n"+"clientWidth : "+clientWidth+"\n"+"newWidth : "+newWidth+"\n"+"newHeight : "+newHeight+"\n"+"thisWidth1 : "+$thisWidth1+"\n"); }); */ /* $('#textinput').find('table').each(function(){ //이미지를 먼저 찾습니다. var $this = $(this); //선택자를 지정합니다. var $thisWidth = parseInt($this.css("width")); //선택된 이미지의 가로사이즈를 구합니다. var $thisHeight = parseInt($this.css("height")); //선택된 이미지의 세로사이즈를 구합니다. var clientWidth = parseInt($(window).width()); //핸드폰의 가로사이즈를 구합니다. if($thisWidth > clientWidth) //만약에 이미지 가로가 핸드폰 가로보다 길다면.... { var rtn = MRKN_imgProportion($thisWidth, $thisHeight); //Function 에 파라미터를 넘김니다 var newWidth = rtn[0]; //Return 된 배열의 0번째 값을 읽어옵니다. var newHeight = rtn[1]; //Return 된 배열의 1번째 값을 읽어옵니다. $this.css({ //선택된 이미지에 CSS를 변경합니다. "width" : newWidth }) } console.log("4 :: $thisWidth : "+$thisWidth+"\n"+"$thisHeight : "+$thisHeight+"\n"+"clientWidth : "+clientWidth+"\n"+"newWidth : "+newWidth+"\n"+"newHeight : "+newHeight+"\n"); }); */ /* }).resize(); $(window).on("orientationchange",function(){ $('#textinput').find('.img_resize').each(function(){ //이미지를 먼저 찾습니다. var $this = $(this); //선택자를 지정합니다. var $thisWidth = parseInt($this.css("width")); //선택된 이미지의 가로사이즈를 구합니다. var $thisHeight = parseInt($this.css("height")); //선택된 이미지의 세로사이즈를 구합니다. var clientWidth = parseInt($(window).width()); //핸드폰의 가로사이즈를 구합니다. if(window.orientation != 0) //만약에 이미지 가로가 핸드폰 가로보다 길다면.... { var rtn = MRKN_imgProportion($thisWidth, $thisHeight); //Function 에 파라미터를 넘김니다 var newWidth = rtn[0]; //Return 된 배열의 0번째 값을 읽어옵니다. var newHeight = rtn[1]; //Return 된 배열의 1번째 값을 읽어옵니다. if(newHeight<=0) { newHeight="auto"; } $this.css({ //선택된 이미지에 CSS를 변경합니다. "width" : newWidth, "height" : newHeight }) $thisWidth1 = parseInt($('#textinput').find('.img_resize').css("width")); $('#textinput').find('.table_resize').css({ //선택된 이미지에 CSS를 변경합니다. "width" : newWidth }) } //alert('thisWidth : '+$thisWidth+' thisHeight : '+$thisHeight+' thisWidth1 : '+$thisWidth1+' clientWidth : '+clientWidth+' newWidth : '+newWidth+' newHeight : '+newHeight); //console.log("5 :: $thisWidth : "+$thisWidth+"\n"+"$thisHeight : "+$thisHeight+"\n"+"clientWidth : "+clientWidth+"\n"+"newWidth : "+newWidth+"\n"+"newHeight : "+newHeight+"\n"+"thisWidth1 : "+$thisWidth1+"\n"); }); */ /* $('#textinput').find('.table_resize').each(function(){ //이미지를 먼저 찾습니다. var $this = $(this); //선택자를 지정합니다. var $thisWidth = parseInt($this.css("width")); //선택된 이미지의 가로사이즈를 구합니다. var $thisHeight = parseInt($this.css("height")); //선택된 이미지의 세로사이즈를 구합니다. var clientWidth = parseInt($(window).width()); //핸드폰의 가로사이즈를 구합니다. if(window.orientation != 0) //만약에 이미지 가로가 핸드폰 가로보다 길다면.... { var rtn = MRKN_imgProportion($thisWidth, $thisHeight); //Function 에 파라미터를 넘김니다 var newWidth = rtn[0]; //Return 된 배열의 0번째 값을 읽어옵니다. var newHeight = rtn[1]; //Return 된 배열의 1번째 값을 읽어옵니다. $this.css({ //선택된 이미지에 CSS를 변경합니다. "width" : newWidth }) } console.log("6 :: $thisWidth : "+$thisWidth+"\n"+"$thisHeight : "+$thisHeight+"\n"+"clientWidth : "+clientWidth+"\n"+"newWidth : "+newWidth+"\n"+"newHeight : "+newHeight+"\n"); });*/ //}); function stylewidth(url) { var tag = ""; if(url) { var regExp = /width:( )?([0-9]{0,4})(%|px)?/; var matchs = url.match(regExp); if (matchs) { tag += matchs[2]; } return tag; } } function stylewidth2(url) { var tag = ""; if(url) { var regExp = /([0-9]{0,4})(%|px)?/; var matchs = String(url).match(regExp); if (matchs) { tag += matchs[1]; } return tag; } } function tree_ad(line, style, up_down) { line = typeof line !== 'undefined' ? line : 1; style = typeof style !== 'undefined' ? style : 'float:right; width:200px; height:200px; padding: 0 0 0 10px; position: relative; z-index:999999999;'; up_down = typeof up_down !== 'undefined' ? up_down : 'up'; var p_i = 0; var div_i = 0; var br_i = 0; var chk = 0; //console.log("1_"+line+'_'+chk); $("#textinput").find('p').each(function(){ if($.trim(this.innerHTML) !== " " && this.innerHTML !== " " && $(this).attr('class') !== 'body_img_caption' && $(this).find('img').attr('id') !== 'img_pop_view') { p_i++; if(p_i==line) { var index = $('#textinput p').index(this); if(up_down=='up') { $("#textinput p:eq("+index+")").before("
"); } else { $("#textinput p:eq("+index+")").after("
"); } window['tree_line_'+line] = $("#tree_line_"+line); window['tree_line_tmp_'+line] = $("#tree_line_tmp_"+line); window['tree_line_tmp_'+line].css('display','block'); window['tree_line_'+line].append(window['tree_line_tmp_'+line]); chk = 1; //console.log("2_"+line+'_'+chk); return false; } } }); if(chk==0) { //console.log("3_"+line+'_'+chk); $("#textinput").find('br').each(function(){ if($.trim(this.innerHTML) !== " " && this.innerHTML !== " " && $(this).attr('class') !== 'body_img_caption') { br_i++; if(br_i==line) { var index = $('#textinput br').index(this); if(up_down=='up') { $("#textinput br:eq("+index+")").before("
"); } else { $("#textinput br:eq("+index+")").after("
"); } window['tree_line_'+line] = $("#tree_line_"+line); window['tree_line_tmp_'+line] = $("#tree_line_tmp_"+line); window['tree_line_tmp_'+line].css('display','block'); window['tree_line_'+line].append(window['tree_line_tmp_'+line]); chk = 1; //console.log("4_"+line+'_'+chk); return false; } } }); if(chk==0) { $("#textinput").find('div').each(function(){ if($(this).attr('id')) { if($.trim(this.innerHTML) !== " " && $.trim(this.innerHTML) !== "" && $(this).attr('class') !== 'thumb_box' && $(this).attr('class') !== 'body_img_table2' && $(this).attr('id').indexOf('tree_line_') !== -1 && $(this).attr('id').indexOf('mov') !== -1 && $(this).attr('id').indexOf('tree_line_tmp_') !== -1) { div_i++; if(div_i==line) { var index2 = $('#textinput div').index(this); if(up_down=='up') { $("#textinput div:eq("+index2+")").before("
"); } else { $("#textinput div:eq("+index2+")").after("
"); } window['tree_line_'+line] = $("#tree_line_"+line); window['tree_line_tmp_'+line] = $("#tree_line_tmp_"+line); window['tree_line_tmp_'+line].css('display','block'); window['tree_line_'+line].append(window['tree_line_tmp_'+line]); chk = 1; //console.log("5_"+line+'_'+chk); return false; } } } else { if($.trim(this.innerHTML) !== " " && $.trim(this.innerHTML) !== "" && $(this).attr('class') !== 'thumb_box' && $(this).attr('class') !== 'body_img_table2') { div_i++; if(div_i==line) { var index2 = $('#textinput div').index(this); if(up_down=='up') { $("#textinput div:eq("+index2+")").before("
"); } else { $("#textinput div:eq("+index2+")").after("
"); } window['tree_line_'+line] = $("#tree_line_"+line); window['tree_line_tmp_'+line] = $("#tree_line_tmp_"+line); window['tree_line_tmp_'+line].css('display','block'); window['tree_line_'+line].append(window['tree_line_tmp_'+line]); chk = 1; //console.log("6_"+line+'_'+chk); return false; } } } }); } } } //본문이미지 가운데 정렬 작은 이미지일 경우 원본 사이즈 $(document).ready(function(){ /* 이미지 크키가 큰데 좌우측 정렬이면 작게나오는 현상 적용 */ $("#textinput").find('.body_img_left,.body_img_right').each(function (i) { var _this = $(this); _this.find('img').each(function(){ var old_w = $(this).get(0).naturalWidth; //console.log("1_1: "+old_w); if(old_w!=0 && old_w<=300) { _this.width(old_w); //$(this).width(old_w); //console.log("1: "+_this.attr("width")); } else { _this.width("100%"); _this.css("width","100% !important"); //console.log("2: "+_this.attr("width")); } }); }); /* //이미지 크키가 큰데 좌우측 정렬이면 작게나오는 현상 적용 */ $("#textinput").find('.body_img_center').find('img').each(function (i) { var old_w = $(this).get(0).naturalWidth; //console.log("1_1: "+old_w); if(old_w!=0 && old_w<=300) { $(this).width(old_w); //$(this).width(old_w); //console.log("1: "+$(this).attr("width")); } }); $('#textinput').find('table').each(function(){ var _this = $(this); if($(this).attr("style")) { if($(this).attr("style").match("width: 100%")) { $(this).find('img').each(function(){ $(this).load(function(){ var old_w = $(this).get(0).naturalWidth; //console.log("2_2: "+old_w); if(old_w!=0 && old_w<=300) { _this.attr("style",old_w); //console.log("1: "+$(this).attr("width")+' /// '+old_w); } }).each(function(){ if(this.complete){ $(this).trigger("load"); //console.log("2: "+$(this).attr("width")); } }); }); } else { if(stylewidth($(this).attr("style"))>320) { $(this).attr('style',$(this).attr("style").replace(/(width:( )?.[0-9]{0,4}(%|px)?)/gi, 'width: 100% !important')); $(this).css("width","100% !important"); //console.log("2: "+$(this).attr("width")); } } } if($(this).attr("width")) { if($(this).attr("width").match("100%")) { //console.log("3: "+$(this).attr("width")); $(this).find('img').each(function(){ $(this).load(function(){ var old_w = $(this).get(0).naturalWidth; //console.log("2_2: "+old_w); if(old_w!=0 && old_w<=300) { _this.attr("width",old_w); //console.log("1: "+$(this).attr("width")+' /// '+old_w); } }).each(function(){ if(this.complete){ $(this).trigger("load"); //console.log("2: "+$(this).attr("width")); } }); }); } else { //console.log("4: "+"a_1_"+stylewidth2($(this).attr("width"))); if(stylewidth2($(this).attr("width"))>320) { //console.log("5: "+"a_"+$(this).attr("width")); $(this).attr('width',"100%"); $(this).css("width","100% !important"); } } } }); $('#textinput').find('img').each(function(){ //console.log("6: "+$(this).attr("width")); if(Number(stylewidth2($(this).attr("width")))>320) { //console.log("7: "+"a_2_"+$(this).attr("width")); $(this).removeAttr("width"); $(this).attr('width',"100%"); //var w_t = 100+"%"; //$(this).attr("width", w_t ); $(this).css("width","100% !important"); //console.log($(this).attr("src")) //console.log("8: "+"a_22_"+$(this).attr("width")+" : "+w_t); } //console.log($(this).attr("src")); $(this).load(function(){ var old_w = $(this).get(0).naturalWidth; //console.log("2_2: "+old_w); if(old_w!=0 && old_w<=300) { $(this).width(old_w); //console.log("1: "+$(this).attr("width")+' /// '+old_w); } }).each(function(){ if(this.complete){ $(this).trigger("load"); //console.log("2: "+$(this).attr("width")); } }); /*_this.on("load",function(){ var old_w = $(this).get(0).naturalWidth; //console.log("2_2: "+old_w); if(old_w!=0 && old_w<=300) { $(this).width(old_w); //$(this).width(old_w); //console.log("1: "+$(this).attr("width")); } }).each(function(){ if(this.complete){ $(this).trigger("load"); } });*/ }); }); /* jwplayer */ /*if(typeof jQuery == 'undefined') { var jqueryElement = document.createElement('script'); jqueryElement.src = 'http://code.jquery.com/jquery-1.7.2.min.js'; if(jqueryElement.addEventListener) { jqueryElement.addEventListener("load",callback,false); } else if(jqueryElement.readyState) { jqueryElement.onreadystatechange = callback; } document.getElementsByTagName('head')[0].appendChild(jqueryElement); } var jwplayerElement = document.createElement('script'); jwplayerElement.src = '/js/jwplayer.js'; if(jwplayerElement.addEventListener) { jwplayerElement.addEventListener("load",callback,false); } else if(jwplayerElement.readyState) { jwplayerElement.onreadystatechange = callback; } document.getElementsByTagName('head')[0].appendChild(jwplayerElement); function callback() { }*/