$(function(){$(".WidgetsSwitcher span").click
(
function()
{$(this).parent().find("span").each(function(){$(this).addClass('ajax').removeClass('fwb')});$(this).removeClass('ajax').addClass('fwb');var object_id=$(this).attr('id').split('_')[1];var salt=$(this).attr('id').split('_')[2];var widget_id='Widget_'+object_id+( salt?'_'+salt:'');var widgetLink_id='WidgetAllFilms_'+object_id+( salt?'_'+salt:'');var obj_widget=$("#"+widget_id);obj_widget.parent().find(".widget_list").hide();obj_widget.parent().find(".all_films").hide();if (obj_widget.html()=='')
{var params=new Object;params.action='GetWidget';params.object_id=object_id;params.widget_id=widget_id;params.entity='person';$("#"+widget_id).show().html('<div style="width:200px;padding:25px 50px 25px 0px;text-align:center"><img src="'+HOST_BASE+'img/loading.gif" alt="" title="" /></div>');$("#"+widgetLink_id).show();$("#"+widget_id).load(script_url, params, function (){bindMagicStar();});}
else{$("#"+widget_id).show();$("#"+widgetLink_id).show();}
return false;}
)});$(document).ready(function ()
{$(".WidgetsSwitcherExtended span.clble").click
(
function()
{$(this).parent().find("span.clble span").each(function(){$(this).addClass('ajax').removeClass('fwb')});$(this).parent().find("span.clble").each(function(){$(this).removeClass('bgg')});$(this).find("span").removeClass('ajax').addClass('fwb');$(this).removeClass('bgw').addClass('bgg');var object_id=$(this).attr('id').split('_')[1];var salt=$(this).attr('id').split('_')[2];var widget_id='Widget_'+object_id+( salt?'_'+salt:'');block_object_relations_id='blockObjectRelations_'+object_id;var obj_widget=$("#"+widget_id);obj_block_object_relations=$("#"+block_object_relations_id);obj_widget.parent().find(".widget_list").hide();$("div[id ^= 'blockObjectRelations_']").hide();if (obj_widget.html()=='')
{var params=new Object;params.action='GetObjectRelations';params.object_id=object_id;params.widget_id=widget_id;params.widget=1;params.entity='person';$("#"+widget_id).show().html('<div class="db center" style="padding:65px 0px 65px 0px;text-align:center"><img src="'+HOST_BASE+'img/loading.gif" alt="" title="" /></div>').load(script_url, params, function(){var orHtml=$("div#tmpObjectRelations").html();obj_block_object_relations.show().html(orHtml);$("div#tmpObjectRelations").remove();bindMagicStar();});}
else
{$("#"+widget_id).show();obj_block_object_relations.show();}
return false;}
)});$(function()
{img=$('#module_person_dynamic_img');if (img.width()>175)
img.css({width:'175px',display:'block'});else
img.css({display:'block'});});function postSpecialObjectFanat(value, person_id)
{if ((user_fanat==1&&value==0)||(user_fanat==0&&value==1))
{params=new Object;params.action='SpecialObject';params.code='fanat';params.user_id=USER_ID;params.value=value;params.person_id=person_id;user_fanat=1 - user_fanat;$("#module_person_fan_progress").show();$.post(script_url, params, postSpecialObjectFanatCallback);}}
function postSpecialObjectFanatCallback(response)
{$("#module_person_fan_progress").hide();if (response==1)
{$("#module_person_not_fan").show();$("#module_person_fan").removeClass('cp');}
else
{$("#module_person_fan").addClass('cp');$("#module_person_not_fan").hide();}}
function postSpecialObjectWatchPerson(person_id, value, reload)
{params=new Object;params.action='SpecialObject';params.code='watch_person';params.value=value;params.person_id=person_id;$('#personSpecialWatchProgress').show();if (reload)
$.post(script_url, params, reloadCallback);else
$.post(script_url, params, postSpecialObjectWatchPersonCallback);}
function postSpecialObjectWatchPersonCallback(response)
{$('#personSpecialWatchProgress').hide();if (response==1)
{$('#personSpecialWatch').hide();$('#personSpecialWatchActive').show();}
else
{$('#personSpecialWatch').show();$('#personSpecialWatchActive').hide();}}