
function showNewPlayer(id, preroll, midroll, postroll, postad, notShowEmbed) {
    var flashvars = {
		log: 0,
        as: 0,
        data: "videoinfo_xml.php?videoid="+id,

		c1:'29618C',
		c2:'a5bed6',
		c3:'FFFFFF',
		c4:'FFFFFF',
		c5:'102042',
		c6:'6B96BD',
		c7:'102042',
		c8:'FFFFFF',
		c9:'2D5273',
		c10:'000000',
		c14:'000000',	
		
		preroll: preroll,
        midroll: midroll,
        postroll: postroll,
       	postad: postad,
		nc : notShowEmbed, 
        noad: 1
    };
    
    var params = {
        quality: "high",
        wmode: "opaque",
        bgcolor: "#A5BED6",
		nc : notShowEmbed, 
        allowfullscreen: "true",
        allowscriptaccess: "always"
    };
  
    var attributes = {
        id: "videoplayer",
        name: "videoplayer"
    };
	//"special_player_unified.swf"
    swfobject.embedSWF('rtl_regional_player.swf', "container_video", "320", "252", "9.0.0","expressInstall.swf", flashvars, params, attributes);
};



function show_player(url, ads) {
    document.write(get_playercode_size(url, 320, 220, ads));
}


function get_playercode_size(url, width, height, ads){
    var code  = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="'+width+'" height="'+height+'" id="player" align="middle">';
    code += '<param name="allowScriptAccess" value="always" />';
    code += '<param name="src" value="'+url+ads+'" />';
    code += '<param name="quality" value="high" />';
    code += '<param name="bgcolor" value="#FFFFFF" />';
    code += '<param name="allowFullScreen" value="true" />';
	code += '<param name="flashvars" value="'+ads+'" />';
    code += '<embed src="'+url+ads+'" quality="high" bgcolor="#FFFFFF" allowFullScreen="true" width="'+width+'" height="'+height+'" name="player" align="middle" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';
    code += '</object>';
    //return url;
    return code;
}



 $(document).ready(function() {
    // Führe irgendwas aus sobald das DOM bereit ist
    
    $("#showVote").click(function() {
        //$("#votesymbols").toggle();
		$('#votesymbols').show();
		//$('#votesymbols').fadeIn(200);
		$('#votelink').hide();
		// $('#votelink').fadeOut(200);
		
    });
/*
	$("#commentbutton").click(function() {
        $('#commentform').fadeIn(200);
	});

/*
        $("#votesymbols .do_vote").click(function() {
            alert("1");

        });
*/


});
 


	function star_fill(number) {

	  for(i=1;i<=number;i++) {

		  document.getElementById('vote_'+i).src='images/star.gif';
	  }
	  if (i <= 5) {
		for(j=i;j<=5;j++) {
		  document.getElementById('vote_'+j).src='images/star_leer.gif';
		}
	  }
	}



function vote(points) {
$.ajax({
		type: "POST", 
		url: 'action/do_vote.php',
		data: '&action=send'+'&media_id='+$('#media_id').val()+"&points="+points,    //$('#voteForm').serialize() + 
		dataType: 'html',
		complete: function (xhr) {
			$('#votesymbols').html('<div style="padding-bottom:6px; ">Vielen Dank</div>');
			/*
			$('#votesymbols').fadeOut(200, function () {
				$('#showVote').html('Vielen Dank');

			});
			*/


		},
		error: contact.error
});
}







