function docReady() {

	var bg = $('.round').attr('style');
	 
	$('.count span[class!="v"]').each( function(){
		var bp = '0 0';
		var n = ($(this).index()+0)*0.05+'em';
		switch ($(this).text())
			{
  				case '1': bp = '2px 0';
                    break;
  				case '2': bp = '-22px 0';
                    break;
  				case '3': bp = '-47px 0';
                    break;
  				case '4': bp = '-73px 0';
                    break;
  				case '5': bp = '-101px 0';
                    break;
  				case '6': bp = '-127px 0';
                    break;
  				case '7': bp = '-152px 0';
                    break;
  				case '8': bp = '-178px 0';
                    break;
  				case '9': bp = '-200px 0';
                    break;
  				case '0': bp = '-229px 0';
                    break;

			}
			$(this).css({'background-position':bp, 'bottom':n});
	});

	var v = ($('.count span').size()-2)*0.01;
	$('.count span.v').css({'bottom': v +'em'});
    
	
	if (!$.browser.webkit) {
         
        $('input[placeholder], textarea[placeholder]').blur(function(){
             
            if ($(this).val()=='') {
                $(this).val($(this).attr('placeholder'));
                $(this).addClass('m-placeholder');
            }
                  }).focus(function(){
            
           $(this).removeClass('m-placeholder');
            if ($(this).val()==$(this).attr('placeholder'))
                $(this).val('');
             
        }).each(function(){
             
            if ( ($(this).val()=='') || ($(this).val()==$(this).attr('placeholder')) ) {
                $(this).val( $(this).attr('placeholder') );
                $(this).addClass('m-placeholder');
            }
             
            var form = $(this).closest('form');
            if (form.length)
                form.submit(function(){
                    if ($(this).val()==$(this).attr('placeholder'))
                        $(this).val('');
                });
             
        });
         
    }
	
    
	
	if($('.pages .page').size()>0){
		$('.pages .page a span').each( function(){
		var bp = '0';
		switch ($(this).text())
			{
  				case '1': bp = '-10px';
                    break;
  				case '2': bp = '-29px';
                    break;
  				case '3': bp = '-50px';
                    break;
  				case '4': bp = '-68px';
                    break;
  				case '5': bp = '-88px';
                    break;
  				case '6': bp = '-108px';
                    break;
  				case '7': bp = '-128px';
                    break;
  				case '8': bp = '-148px';
                    break;
  				case '9': bp = '-168px';
                    break;
  				case '0': bp = '-188px';
                    break;

			}
			var bpy = '-57px';
			if (($('.clubs').size()>0)|($('.vse_photo').size()>0)){
				bpy = '-97px';
				}
			if ($(this).attr('class')=='cur'){
				bpy = '-13px';
				}
			$(this).css({'background-position':bp+' '+bpy});
	});

	}
	
	if ($('.pages').size()>0){
		$('.pages').css('margin-left', ($('.pages').parent().width()-$('.pages').width())/2);
		
		}

}

$(document).ready(function(){
	docReady();
});

