jQuery(document).ready(function($){
	
	init();
	//browserCookie();
	
	function browserCookie(){
	
		$.cookie('browser', 'nope', { expires: 365, path: '/', domain: 'notcool.nl'});	
	
	}
	
	function init(){
		
		//ui buttons
		$('.button-login').button({icons:{primary:'ui-icon-locked'}});
		$('.button-mail').button({icons:{primary:'ui-icon-mail-closed'}});
		$('.button-prev').button({icons:{primary:'ui-icon-arrowthick-1-w',secondary:'ui-icon-radio-on'}});
		$('.button-next').button({icons:{primary:'ui-icon-radio-on',secondary:'ui-icon-arrowthick-1-e'}});
		$('button, .button-class, .comment-reply-link, a.flashmeerlink').button();
		$('a.meerlink').button();
		
		//custom excerpt
		$('.showmore').click(function(){
			$(this).parent().next().slideDown();
			$(this).hide();
			return false;
		});
		$('.hideit').click(function(){
			$(this).parent().parent().slideUp();
			$('.showmore').show();
			return false;
		});
		
		//post accordion 
		$('div.inneraccordion').accordion();
		
		//add target blank to links
		$('.post p a').attr('target','_blank');
		$('.ads a').attr('target','_blank');
		
		//sidebar tr color
		$('.tabitem:even, #populair ul li:odd, #populair ul li:odd').css({background:'#f2f2f2'}).addClass('ui-corner-all');
		
		//tabs beneath posts
		$('.tabs').tabs({event: 'mouseover'});
		
		//hover header color
		$('.post div.clearfix, #specialflash p, #specialflash a').hover(
			function(){
				$(this).parent().find('h2 a, h2').stop().animate({'color':'black'},500);
			},
			function(){
				$(this).parent().find('h2 a, h2').stop().animate({'color':'white'},500);
			}
		);
		
	};

});
