jQuery(document).ready(function(){
	
	jQuery(".toggle_container").hide();
	jQuery("#first").toggleClass("active");
	jQuery("#first").next().show();

	jQuery("div.trigger").click(function(){
		jQuery(this).toggleClass("active").next().toggle();
	});
	function expandAll (){
		jQuery(".toggle_container").show();
		jQuery("div.trigger").addClass("active");
	}
	jQuery(".expandAll").bind('click', expandAll);
	function collapseAll() {
		jQuery(".toggle_container").hide();
		jQuery("div.trigger").removeClass("active");
	}
	jQuery(".collapseAll").bind('click', collapseAll);

});
jQuery(document).ready(function() {
 
    //Select all anchor tag with rel set to tooltip
    jQuery('a[rel=tooltip]').mouseover(function(e) {
         
        //Grab the title attribute's value and assign it to a variable
        var tip = jQuery(this).attr('title');   
         
        //Remove the title attribute's to avoid the native tooltip from the browser
        jQuery(this).attr('title','');
         
        //Append the tooltip template and its value
        jQuery(this).append('<div id="tooltip">' + tip + '</div>');
         
        //Set the X and Y axis of the tooltip
        jQuery('#tooltip').css('top', e.pageY - 40 );
        jQuery('#tooltip').css('left', e.pageX + 20 );
         
        //Show the tooltip with faceIn effect
         
    }).mousemove(function(e) {
     
        //Keep changing the X and Y axis for the tooltip, thus, the tooltip move along with the mouse
        jQuery('#tooltip').css('top', e.pageY - 40 );
        jQuery('#tooltip').css('left', e.pageX + 20 );
         
    }).mouseout(function() {
     
        //Put back the title attribute's value
        jQuery(this).attr('title',jQuery('#tooltip').html());
     
        //Remove the appended tooltip template
        jQuery(this).children('div#tooltip').remove();
         
    });
 
});
jQuery(document).ready(function() {
	jQuery("a.accara").click(function(event){
        event.preventDefault();
        linkLocation = this.href;
        jQuery(".mask").slideDown(1000, redirectPage);
    });
 
    function redirectPage() {
        window.location = linkLocation;
    }
});
	jQuery(window).load(function() {
		jQuery('.flexslider').flexslider({
			start: function(slider) {
				slider.removeClass('loading');
			},
			animation: "fade",
			directionNav: false,
			slideshow: false,
			animationDuration: 0
		});
	});
