//===EQUAL HEIGHTS
function equalHeight(group) {
	var tallest = 0;
	group.each(function() {
		var thisHeight = $(this).height();
		if(thisHeight > tallest) {
			tallest = thisHeight;
		}
	});
	group.height(tallest);
}
	
	$(function(){

    var config = {    
         sensitivity: 3, // number = sensitivity threshold (must be 1 or higher)    
         interval: 200,  // number = milliseconds for onMouseOver polling interval    
         over: doOpen,   // function = onMouseOver callback (REQUIRED)    
         timeout: 200,   // number = milliseconds delay before onMouseOut    
         out: doClose    // function = onMouseOut callback (REQUIRED)    
    };
    
    function doOpen() {
        $(this).addClass("hover");
        $('ul:first',this).css('visibility', 'visible');
    }
 
    function doClose() {
        $(this).removeClass("hover");
        $('ul:first',this).css('visibility', 'hidden');
    }

    $("ul.currencyDropdown li").hoverIntent(config);
    
    $("ul.currencyDropdown li ul li:has(ul)").find("a:first").append(" &raquo; ");

});
	
	$(document).ready(function() {
	equalHeight($(".equal"));
	
    
//===DATA TABLES 
	$('.dataTable').dataTable();
		
	//Tabs    
$(".tabs").accessibleTabs({
     tabhead:'h2',
	 tabbody: '.tabbody', 
     fx:"fadeIn"
});

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

    $().jshare({
jsharedir:	'js/jshare/',	// Set the directory for the jshare files like style.css & script.js
title:	'<strong>Share, Bookmark or Email</strong> this page.',
highlight:	true,// Highlight share icon on hover?
share:	'facebook,twitter,digg,print,google_buzz,delicious,stumbleupon,orkut,tumblr,linkedin,myspace,yahoo_buzz,bebo,mixx,friendfeed',	// Enter buttons to show on share tab
bookmark:	'favorites,google,yahoo,live,digg,squidoo',	// Enter buttons to show on bookmark tab
iconsdir:	'js/jshare/images/icons/',	//  Default is jsharedir + images/icons/
imageextension:	'png',// Icon image format (jpg, png, gif, etc...)
opentab:	'share',	// first tab to open when clicked on jshare. share or bookmark?
blanktarget:	true,// Open links on new tab/window?
stickybutton:	false,// Add the sticky button on the side?
emailform:	true,// Disply email form?
shareurl:	'',// URL to share (Default is your current page's URL)
sharetitle:	'',// Page title to share (Default is your current page's title)
overlay:	true,// cover up the background?
overlayopacity:	0.3,
overlaycolor:	'#000',
speedin:	300,// Set durations of fadein in milliseconds
speedout:	300// Set durations of fadeout in milliseconds
});


$(function() {
// OPACITY OF BUTTON SET TO 50%
$(".jqFade").css("opacity","0.5");
		
// ON MOUSE OVER
$(".jqFade").hover(function () {
										  
// SET OPACITY TO 100%
$(this).stop().animate({
opacity: 1.0
}, "slow");
},
		
// ON MOUSE OUT
function () {
			
// SET OPACITY BACK TO 50%
$(this).stop().animate({
opacity: 0.5
}, "slow");
});
});


//Fancybox maps   
$("a.iframe").fancybox({
		'transitionIn'	:	'fade',
		'transitionOut'	:	'fade',
		'type'			:	'iframe',
		'speedIn'		:	500, 
		'speedOut'		:	200,
		'overlayShow'	:	true,
		'autoScale'			: true
	});
	
	//Fancybox maps   
$("a.fbMap").fancybox({
		'transitionIn'	:	'fade',
		'transitionOut'	:	'fade',
		'type'			:	'iframe',
		'width'			:	500,
		'height'		:	500, 
		'speedIn'		:	500, 
		'speedOut'		:	200,
		'overlayShow'	:	true,
		'autoScale'			: false
	});
$("a.fbConverter").fancybox({
		'transitionIn'	:	'fade',
		'transitionOut'	:	'fade',
		'type'			:	'iframe',
		'width'			:	190,
		'height'		:	250, 
		'speedIn'		:	500, 
		'speedOut'		:	200,
		'overlayShow'	:	true,
		'autoScale'			: false
	});
$("a.fbCalculator").fancybox({
		'transitionIn'	:	'fade',
		'transitionOut'	:	'fade',
		'type'			:	'iframe',
		'width'			:	650,
		'height'		:	450, 
		'speedIn'		:	500, 
		'speedOut'		:	200,
		'overlayShow'	:	true,
		'autoScale'			: false
	});
    
    	$("a.fancyboxImage").fancybox({
		'transitionIn'	:	'fade',
		'transitionOut'	:	'fade',
		'speedIn'		:	600, 
		'speedOut'		:	600,
		'autoScale'		:	true,
		'width'			:	600, 
		'overlayShow'	:	true
    });
	
$('a.converter').fancybox({
    'width': '80%',
    'height': '80%',
    'type': 'ajax',
    'ajax': {
        dataFilter: function(data) {
            return $(data).find('#converter')[0];
        }
    }
});

$("select, input:text, input:password, input:checkbox, input:radio, input:file").uniform();
 
 



        $("#homepage #results").simplyScroll({
            className: 'custom',
            autoMode: 'loop',
            pauseOnHover: false,
            frameRate: 30,
            speed: 1
        });

$('a.help').cluetip({
cluezIndex: 900,
width: 300,
showTitle: false,
     ajaxProcess: function(data) {
       $div = $('<div>' + data + '</div>').find(this.hash);
       return $div;
     }
}); 
   
    $('#slider').SexySlider({
      width  : 620,
      height : 330,
      strips : 10,
      delay  : 5000,
      effect : 'random',
      direction: 'random'
    });

$('.message').hide().fadeIn(2500);

//Toggle Content
$(".toggleContent").hide();
  $(".toggleTrigger").click(function()
  	{
    $(this).next(".toggleContent").slideToggle(500);
	});
	$(".toggleTrigger").click(function() { return false; });
});
		
		
		
		
	
