//Sova Player BOF if (typeof count_of_players == 'undefined') { count_of_players = 0; } function detectIE6(){ var browser = navigator.appName; var b_version = navigator.appVersion; var version = parseFloat(b_version); if ((browser == "Microsoft Internet Explorer") && (version <= 6)){ return true; }else{ return false; } } function make_players() { var id_base = 'ID_1679_93720_37283hgmd_r8e4jhdsdjkf84_478gVL'; jQuery(".sova_player").each(function (i) { el = jQuery(this); if (el.find('.sovplayer').length == 0) { //alert('make player'); css_width = el.css('width'); var widthFixed = css_width.substring(0, css_width.length - 2); css_height = el.css('height'); var heightFixed = css_height.substring(0, css_height.length - 2); cur_width = widthFixed; cur_height = heightFixed; videoplayerId = id_base + count_of_players; var prev_image_src = el.find('input[name=prev_image]').val(); var header_text = el.find('input[name=header]').val(); prev_width = Math.round(cur_width - 20); prev_height = Math.round(cur_height - 70); var prev_img = 'showimg.php?src=' + prev_image_src + '&max_width=' + prev_width + '&max_height=' + prev_height + ''; el.css('background-image', 'url(' + prev_img + ')' ); var obj = jQuery(this).offset(); lefttt = obj.left; if ( detectIE6() ){ lefttt = lefttt + 3; } if (detectIPhoneUA() != 1) { cur_link = el.find('input[name=videolink_flash]').val(); var htmlToAdd = '
' + '' + ''+ '' + '' + '' + ''+ '' + '' + '
'; } else { cur_link = el.find('input[name=videolink_iphone]').val(); var htmlToAdd = '
'; htmlToAdd += ''; htmlToAdd += '
'; } jQuery(this).html(htmlToAdd); count_of_players++; } }) } function playerResizeJS(videoplayerId, src, set_width, set_height) { //alert('playerResizeJS' + videoplayerId); var width = 1 * set_width + 20; var height = 1 * set_height + 70; jQuery('#' + videoplayerId).attr('width', width); jQuery('#' + videoplayerId + ' embed').attr('width', width); jQuery('#' + videoplayerId).attr('height', height); jQuery('#' + videoplayerId + ' embed').attr('height', height); jQuery('#' + videoplayerId + ' embed').attr('flashvars', 'videoplayerId=' + videoplayerId + 'link=' + src + '&window_width=' + width + '&window_height=' + height + '&show_smaller=1'); widthPre = jQuery('#' + videoplayerId).parent().parent().css('width'); widthFixed = widthPre.substring(0, widthPre.length - 2); heightPre = jQuery('#' + videoplayerId).parent().parent().css('height'); heightFixed = heightPre.substring(0, heightPre.length - 2); var ml = (widthFixed - width) / 2; jQuery('#' + videoplayerId).parent().css('margin-left', ml + 'px' ); var mt = (heightFixed - height) / 2; jQuery('#' + videoplayerId).parent().css('margin-top', mt + 'px' ); } function resetVideo(videoplayerId, restore_link, restore_objectWidth, restore_objectHeight) { //alert('resetVideo ' + videoplayerId); var width = restore_objectWidth; var height = restore_objectHeight; jQuery('#' + videoplayerId + '').attr('width', width); jQuery('#' + videoplayerId + ' embed').attr('width', width); jQuery('#' + videoplayerId + '').attr('height', height); jQuery('#' + videoplayerId + ' embed').attr('height', height); jQuery('#' + videoplayerId + ' embed').attr('flashvars', 'videoplayerId=' + videoplayerId + '&link=' + restore_link + '&window_width=' + restore_objectWidth + '&window_height=' + restore_objectHeight + '&show_smaller=0'); jQuery('#' + videoplayerId).parent().css('margin-left', '0px'); jQuery('#' + videoplayerId).parent().css('margin-top', '0px'); } function flashPlayerVersion() { var plugin; var version = 5; var flash = false; if (navigator.plugins) { if (navigator.plugins["Shockwave Flash"]) { plugin = navigator.plugins["Shockwave Flash"].description; flash = parseInt(plugin.indexOf('Flash') + 6) >= version; } else { if ((navigator.userAgent.indexOf('MSIE') != -1) && (navigator.userAgent.indexOf('Win') != -1)) { var vb = '