Cufon.replace('.cufon', { hover: true, fontFamily: 'Futura Std' });
Cufon.replace('#collection-pagination li a', { fontFamily: 'Futura Std',hover: true });
Cufon.replace('.entry-content h2, .entry-content h3, .entry-content h4, .entry-content h5', { hover: true, fontFamily: 'Times' });
Cufon.now();

(function($) {
	/*
	$('#StyleImage1 img, #StyleImage5 img').rotate({angle:1.8});
	$('#StyleImage2 img').rotate({angle:-5});
	$('#StyleImage3 img').rotate({angle:3});
	$('#StyleImage4 img').rotate({angle:-6.5});
	$('#StyleImage5 img').rotate({angle:3});
	*/
	
	$("#yourfancyboxlink").fancybox({'onStart': fbonstart});

	var fbonstart = function() {
		if ($('.fancybox-ie').length > 0) {
			if($('#fbiecssfix').length == 0) {
				$('head').append('<link id="fbiecssfix" rel="stylesheet" type="text/css" media="screen" href="http://www.rutmfl.se/rut2010/wp-content/themes/rut_2010/js/fancybox/jquery.fancybox-ie.css" />');
			}	
		}
	}

	$("a.fancybox, .entry-content .gallery .gallery-item a").fancybox({
		'hideOnContentClick'	: false,
		'titleShow' 			: true,
		'overlayOpacity' 		: 0.2,
		'centerOnScroll' 		: true,
		'titlePosition' 		: 'inside',
		'overlayColor'			: '#666',
		'onStart'				: fbonstart
	});
	
	$("#collection-pagination li").each(function() {
		$(this).width($(this).width()+3);	
	});
	setTimeout(function(){ 
		//alert('tick');
		
		$('#Login #log, #Login #pwd').each(function() {
			var $this = $(this);
			var span = $this.prev('span');
			if ($this.val() == '') { 			
				span.text($this.attr('title'));
			} 
			
			$this.keydown( function() {
				span.text('');
			});
			
			$this.focus(function() {	
				if($this.val() == '') {	
					span.text('');
				}
			});
			$this.blur(function() {			
				if($this.val() == '') {
					span.text($this.attr('title'));
				}
			});
		});
	 }, 800);
	$("#AllCatSort select").change(function(event) {
		window.location = window.location.pathname+"?colcat="+$(this).val();
	});
	
	$("#categoryposts-3 li, #categoryposts-4 li, #categoryposts-5 li, #BlogTrio li.rut-latest-style").biggerlink();
	
	var clicks = $(".click");
	clicks.each(function() {
		var href = $(this).attr('href');
		$(this).append("<div class='div_to_popup'><h1>OBS!</h1><p><a href='" + href + "'>Du l&auml;mnar nu v&aring;r webbplats (Forts&auml;tt)</a></p></div>")
	});						   
	$(".click").bind('click', function(){
		$(this).find(".div_to_popup").bPopup();
		return false
	});
/*	
   $(".click").append("<div id='div_to_popup'><h1>OBS!</h1><p><a href='http://www.rutstore.se'>Du l&auml;mnar nu v&aring;r webbplats (Forts&auml;tt)</a></p></div>")						   
   $(".click").bind('click', function(){
      $("#div_to_popup").bPopup();
      return false
	});
 */	
})(jQuery)



