var css_browser_selector=function(){var ua=navigator.userAgent.toLowerCase(),is=function(t){return ua.indexOf(t)!=-1;},h=document.getElementsByTagName('html')[0],b=(!(/opera|webtv/i.test(ua))&&/msie\s(\d)/.test(ua))?('ie ie'+RegExp.$1):is('firefox/2')?'gecko ff2':is('firefox/3')?'gecko ff3':is('gecko/')?'gecko':is('opera/9')?'opera opera9':/opera\s(\d)/.test(ua)?'opera opera'+RegExp.$1:is('konqueror')?'konqueror':is('chrome')?'chrome webkit safari':is('applewebkit/')?'webkit safari':is('mozilla/')?'gecko':'',os=(is('x11')||is('linux'))?' linux':is('mac')?' mac':is('win')?' win':'';var c=b+os+' js';h.className+=h.className?' '+c:c;}();
jQuery(function() {
  $('a.blank').attr('target', '_blank');

  $('.navigation a').click(function() {  	$(this).blur();
  	return true;  });

  $("a.videoObject-link").fancybox({
	  'width'				  : '80%',
		'height'			  : '90%',
		'autoScale'			: false,
		'transitionIn'  : 'none',
		'transitionOut' : 'none',
		'type'				  : 'iframe'
	});


  if(document.getElementById('slider-slider'))
  {
    var visible_height = minus = $('.slider-wrapper').height();
    var total_height = $('.slider-text').height();
    var curr_value = total_height-minus;

    if(typeof $().slider == 'function')
    {
      $('#slider-slider').slider({
        orientation: 'vertical',
        value: total_height,
        min: 0,
        max: curr_value,
        step: 5,
        animate: true,
        slide: function(event, ui) {
          $('.slider-text').css('top', '-'+(curr_value-ui.value)+'px');
          $('.ui-slider-handle').blur();
        }
      });
    }

    var step = $('#slider-slider').slider('option', 'step');


    $('.slider-moveUp').click(function() {
      var value = $('#slider-slider').slider('option', 'value');
			var max = $('#slider-slider').slider('option', 'max');
			var val = Number(value + step);
			$('#slider-slider').slider('option', 'value', val);
			var top = -(max - value - step);
			if(top > 0) top = 0;
			$(".slider-text").css('top', top+'px');
			this.blur();
		});
		$('.slider-moveDown').click(function() {
			var value = $('#slider-slider').slider('option', 'value');
			var max = $('#slider-slider').slider('option', 'max');

			var val = Number(value - step);
			$('#slider-slider').slider('option', 'value', val);
			var top = -((max - value) + step);
			if(Math.abs(top) > max) top = -(max);
			$(".slider-text").css('top', top+'px');
			this.blur();
		});

  }

});
if(typeof Cufon == 'function') {
  Cufon.replace("h1", {
    textShadow : " 4px 4px black"
  });
  //Cufon.replace('div.pagination a, div.pagination i');
}
