$(function(){$("a.fatal").click(function(){if(confirm("Ар ю шнур?"))
{return true;}
else
{return false;}});var page=$('form.filterForm input[name=page]').val();var year=$('form.filterForm select[name=filterYears]').val();var user=$('form.filterForm select[name=filterUsers]').val();var place=$('form.filterForm select[name=filterPlaces]').val();$('form.filterForm select').change(function(){if($(this).attr('name')=='filterYears'){year=$(this).val();}
if($(this).attr('name')=='filterUsers'){user=$(this).val();}
if($(this).attr('name')=='filterPlaces'){place=$(this).val();filterPlaceGo();return;}
filterGo();});function filterGo()
{window.location.href='/albums/filter/y/'+year+'/u/'+user+'/pl/'+place+'/p/'+page;}
function filterPlaceGo()
{window.location.href='/albums/filter/pl/'+place+'/p/'+page;}
$("a.targetBlank").attr('target',"_blank");$('a.launch_selector').overlay({onLoad:function(){this.getOverlay().css('left',this.getTrigger().offset().left);this.getOverlay().css('top',this.getTrigger().offset().top);if(this.getOverlay().attr('id')=='places_list'){setTimeout(function(){$("#place_filter").focus();},200);}
var thisgetoverlay=this.getOverlay().find('.selector_container');if(this.getOverlay().find('.static').length!=0)setTimeout(function(thisgetoverlay){thisgetoverlay.scrollTo("a.static",400);},200,thisgetoverlay);},speed:0,fixed:false,mask:{opacity:0,closeOnEsc:true}});$("#place_filter").keyup(function(e){var filter=$(this).val(),count=0;$(this).parents(".selector_data").find("a").each(function(){if($(this).text().search(new RegExp(filter,"i"))<0){$(this).css('display','none');}else{$(this).css('display','block');count++;}});$("#filter-count").text(count);});});