// videopage functionsvar favo_url = '/index/ajax_favorite/' + entry_id;var send_to_friend_url = '/index/ajax_send_to_friend/' + entry_id;var deadlink_form = '/index/ajax_deadlink/' + entry_id;$(document).ready(function(){	// Like / hate functions	$("#like").click(function () {		$.ajax({		  url: "/index/ajax_vote?vote=like&entry_id="+entry_id,		  cache: false,		  success: function(data){			$("#likes").html(data);		  }		});		});	$("#dislike").click(function () {				$.ajax({		  url: "/index/ajax_vote?vote=dislike&entry_id="+entry_id,		  cache: false,		  success: function(data){			$("#dislikes").html(data);		  }		});			});	$("#like_uservideo").click(function () {		$.ajax({		  url: "/index/ajax_vote_uservideo?vote=like&entry_id="+entry_id,		  cache: false,		  success: function(data){			$("#likes").html(data);		  }		});		});	$("#dislike_uservideo").click(function () {				$.ajax({		  url: "/index/ajax_vote_uservideo?vote=dislike&entry_id="+entry_id,		  cache: false,		  success: function(data){			$("#dislikes").html(data);		  }		});			});	// Open favorite submit    $("#add_to_favorites").click(function () {		      if ($("#ffd_content").is(":hidden")) {				// clear html		$("#ffd_content").html('');        $("#ffd_content").slideDown("fast", function () {												// set loading and load page		 	    $("#ffd_content").html('<center><img src=/images/site/2009/indicator.gif></center>');				setTimeout("load_favorite_form()", 1000);		});      } else {        $("#ffd_content").hide();      }	 });		// Open send to friend submit    $("#send_to_friend").click(function () {				$("#ffd_content").html('');	      if ($("#ffd_content").is(":hidden")) {			// clear html		$("#ffd_content").html('');        $("#ffd_content").slideDown("fast", function () {				// set loading and load page		 	    $("#ffd_content").html('<center><img src=/images/site/2009/indicator.gif></center>');				setTimeout("load_stf_form()", 1000);		});      } else {        $("#ffd_content").hide();      }	 });	// Open deadlink form    $("#dead_link").click(function () {		$("#ffd_content").html('');    	  if ($("#ffd_content").is(":hidden")) {			// clear html		$("#ffd_content").html('');        $("#ffd_content").slideDown("fast", function () {				// set loading and load page		 	    $("#ffd_content").html('<center><img src=/images/site/2009/indicator.gif></center>');				setTimeout("load_deadlink_form()", 1000);		});      } else {        $("#ffd_content").hide();      }			 });		// referres under video	var toggle_ref = false;	$(".last_refs_heading").click(function() {			if(!toggle_ref) {			$(".last_refs").toggle();			$(".toggler").html('-');			toggle_ref = true;		}else{			$(".last_refs").toggle();			$(".toggler").html('+');			toggle_ref = false;		}	});});function load_favorite_form() {	$("#ffd_content").load(favo_url);}function load_stf_form() {	$("#ffd_content").load(send_to_friend_url);}function load_deadlink_form(){	$("#ffd_content").load(deadlink_form);}
