Change video link onclick algorythm