$(document).ready(function() {	function megaHoverOver(){		$(this).find(".sub").stop().fadeTo('fast', 1).show();					//Calculate width of all ul's		(function($) { 			jQuery.fn.calcSubWidth = function() {				rowWidth = 0;				//Calculate row				$(this).find("ul").each(function() {										rowWidth += $(this).width(); 				});				};		})(jQuery); 				if ( $(this).find(".row").length > 0 ) { //If row exists...			var biggestRow = 0;				//Calculate each row			$(this).find(".row").each(function() {							   				$(this).calcSubWidth();				//Find biggest row				if(rowWidth > biggestRow) {					biggestRow = rowWidth;				}			});			//Set width			$(this).find(".sub").css({'width' :biggestRow});			$(this).find(".row:last").css({'margin':'0'});					} else { //If row does not exist...						$(this).calcSubWidth();			//Set Width			$(this).find(".sub").css({'width' : rowWidth});					}	}		function megaHoverOut(){ 	  $(this).find(".sub").stop().fadeTo('fast', 0, function() {		  $(this).hide(); 	  });	}	var config = {    		 sensitivity: 2, // number = sensitivity threshold (must be 1 or higher)    		 interval: 100, // number = milliseconds for onMouseOver polling interval    		 over: megaHoverOver, // function = onMouseOver callback (REQUIRED)    		 timeout: 100, // number = milliseconds delay before onMouseOut    		 out: megaHoverOut // function = onMouseOut callback (REQUIRED)    	};	$("ul#navigation li .sub").css({'opacity':'0'});	$("ul#navigation li").hoverIntent(config);	$('#featItem').cycle({    	fx:        'scrollHorz',        timeout:   8000,        delay:     -3000,        easing:    'easeInOutCubic',        prev:    '#featPrev',        next:    '#featNext'    });    $.localScroll({    	easing:    'easeInOutCubic',    	hash:      true    });});jQuery().ready(function(){	jQuery('#subnav').accordion({		active: '.selected',		header: '.head',		navigation: true,		event: 'mouseover',		fillSpace: true,		animated: 'easeslide'	});});$(function() {    $("h4.expand").toggler({method: "slideFadeToggle", initShow: "div.collapse:first"});});function randomString(length) {      var chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz'.split('');      var str = '';      for (var i = 0; i < length; i++) {        str += chars[Math.floor(Math.random() * chars.length)];      }      return str;    }    var rnd = randomString(8);    jQuery(document).ready(function($) {      $(".tweet").tweet({        join_text: "auto",        username: "ALARMInc",        avatar_size: 48,        count: 3,        auto_join_text_default: "",         auto_join_text_ed: "",        auto_join_text_ing: "",        auto_join_text_reply: "",        auto_join_text_url: "",        loading_text: "loading tweets..."      });})	$(document).ready(function(){	$('#fbox').jflickrfeed({		limit: 20,		qstrings: {			id: '59155851@N08'		},		itemTemplate: '<li>'+						'<a href="{{image}}" title="{{title}}">' +							'<img src="{{image_s}}" width="120" height="90" alt="{{title}}" />' +						'</a>' +					  '</li>'	}, function(data) {		$('#fbox a').fancybox();	});	$("fbox a").fancybox({		'overlayShow'	: false,		'transitionIn'	: 'elastic',		'transitionOut'	: 'elastic'	});});$(document).ready(function() {	$(".popup").fancybox({		'titlePosition': 'outside',		'autoScale': true,		'margin': 0,		'padding': 0,		'overlayShow': true,		'hideOnContentClick': true,		'overlayOpacity': 0.7,		'transitionIn': 'none',		'transitionOut': 'none',		'type': 'iframe'	});});
