$(function() {	

	$('.slider-item a').find('img').each(function () {
		$(this).rotateRight(-2);	
	});
	$('#slideshow').cycle({ 
		fx:     		'fade', 
		//easing: 		'easeInBack', 
		delay:  		-2000,
		cleartypeNoBg:	true,
        pager:  		'#slider_nav',
        pagerAnchorBuilder: function(idx, slide) {
            // return sel string for existing anchor
            return '#slider_nav li:eq(' + (idx) + ') a';
        } 
	});
	
	$("ul.sf-menu").superfish({
		autoArrows:  false,
		delay:       400,                             // one second delay on mouseout 
		animation:   {opacity:'show',height:'show'},  // fade-in and slide-down animation 
		speed:       'fast',                          // faster animation speed 
		autoArrows:  false,                           // disable generation of arrow mark-up 
		dropShadows: false                            // disable drop shadows 			
	}); 
	$('ul.list li').each(function() {
	  var a = $(this).children('a');
	  var aClass = a.attr('rel');
	  if (a.hasClass('active')) {     
	   $('.'+aClass).css({'display':'block'});
	  } else {
	   $('.'+aClass).css({'display':'none'});
	  }
	 });
	 $('ul.list li a').click(function () {             
	  var thisaClass = $(this).attr('rel');
	  $(this).parent('li').parent('ul').children('li').each(function() {
	   var a = $(this).children('a');
	   var aClass = a.attr('rel');
	   if (thisaClass == aClass) {
		$('.'+aClass).show();
		a.attr('class','active');
	   } else {
		$('.'+aClass).hide();
		a.attr('class','');
	   }
	  });
	  return false;
	});
	 

	
	// radius Box 
	$('#slider_controls a').css({"border-radius": "5px", "-moz-border-radius":"5px", "-webkit-border-radius":"5px"});	
	$('.wp-pagenavi a,.wp-pagenavi .current').css({"border-radius": "5px", "-moz-border-radius":"5px", "-webkit-border-radius":"5px"});	
	$('#centercol .box').css({"border-radius": "7px", "-moz-border-radius":"7px", "-webkit-border-radius":"7px"});
	
});

Cufon.replace('h1, h2, h3,.topnav li a,.rss,.wtitle',{ hover:true } );	
