//Calculate width of all ul's

(function($) { 
	jQuery.fn.calcSubWidth = function() {
		rowWidth = 0;
		//Calculate row
		$(this).find("ul").each(function() {					
			rowWidth += $(this).width(); 
		});	
	};
})(jQuery); 

function sitecode_init() {	

	/*
	Function : 	Implement the client page behaviours 
	Hook: 		Functino fired on document DOM is ready event (jquery Document.Ready)
	Auth:		Neotoxic
	*/

	// Cufon

	/*
    Cufon.replace('h1');
    Cufon.replace('h2.title');
    Cufon.replace('.entry h2');
   

	// Apply smooth scrolling for internal links
	
	$("a.intlink").anchorAnimate()	

	// Apply Big Target to homepage links, increasing usablity especialy on mobile devices

	$("ul#topnav li .sub").css({'opacity':'0'});
	$("ul#topnav li").hoverIntent(config);
 */
	// Init slider

	$('#coin-slider').coinslider({
		width: 880,
		height: 350,
		spw: 10,
		sph: 4,
		sDelay: 10,
		navigation: false,
		opacity: 0.7,
		titleSpeed: 50,
		effect: 'rain',
		links:true,
		hoverPause:true,
		delay: 4000 
	});
	
	// Menu fix for IE

	// $("#menu-main-menu li").mouseover(function(){$(this).find("ul").css('display','block');})
	// $("#menu-main-menu li").mouseout(function(){$(this).find("ul").css('display','none');})
	// $("#menu-main-menu li ul").mouseover(function(){$(this).parent().classname('display','none');})

};
