// <![CDATA[
jQuery(function(){ 	

	// wrap 'span' to nav page link
	jQuery('.topnav ul').children('li').each(function() {
		jQuery(this).children('a').html('<span>'+jQuery(this).children('a').text()+'</span>'); // add tags span to a href
	});
	
	jQuery('.topnav ul li ul ').css({"border-bottom-left-radius":"5px", "border-bottom-right-radius":"5px",  "-moz-border-radius-bottomleft":"5px", "-moz-border-radius-bottomright":"5px", "-webkit-border-bottom-left-radius":"5px", "-webkit-border-bottom-right-radius":"5px"});
	
	jQuery('#columns, .box, #rightcol, .wp-pagenavi .current, .wp-pagenavi a, .wp-pagenavi .current, .topnav ul li ul li ul   ').css({"border-radius":"5px", "-moz-border-radius":"5px", "-webkit-border-radius":"5px"});

	
	// Slider
	jQuery('#coin-slider').coinslider({width:960,height:268,opacity:1});
	jQuery('#coin-slider-2').coinslider({width:960,height:450,opacity:1});
	
	
	// Superfish tabs
	jQuery("ul.sf-menu").superfish({
		autoArrows:  false,
		delay:       1000,                             // 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 			
	}); 
	jQuery('ul.list li').each(function() {
	  var a = jQuery(this).children('a');
	  var aClass = a.attr('rel');
	  if (a.hasClass('active')) {     
	   jQuery('.'+aClass).css({'display':'block'});
	  } else {
	   jQuery('.'+aClass).css({'display':'none'});
	  }
	 });
	 jQuery('ul.list li a').click(function () {             
	  var thisaClass = jQuery(this).attr('rel');
	  jQuery(this).parent('li').parent('ul').children('li').each(function() {
	   var a = jQuery(this).children('a');
	   var aClass = a.attr('rel');
	   if (thisaClass == aClass) {
		jQuery('.'+aClass).show();
		a.attr('class','active');
	   } else {
		jQuery('.'+aClass).hide();
		a.attr('class','');
	   }
	  });
	  return false;
	});
	
});	

/*Cufon.replace('h1, #header .graybutton a, .logo small, .post-title h2 a, .wtitle h2, #header .bigtext,  .content .index-right h3, .index h2, .post-comments a, .header2  .rss_but a', { hover: true });*/
// ]]>
