$(function () { 
	$('.notification').hide().append('<span class="close" title="close">x</span>').fadeIn('slow');
	
		$('.notification .close').hover(
										
			function() { $(this).addClass('hover'); },
			
			function() { $(this).removeClass('hover'); }
		);
		
		$('.notification .close').click(function() {
												 
			$(this).parent().fadeOut('slow', function() { $(this).remove(); });
			
	}); 
		
});
	
/*========================================================================================

======================================================================================== */

$(document).ready(function(){

//ACCORDION 
//Set default open/close settings
$('.acc_container').hide(); //Hide/close all containers
$('.acc_trigger:first').addClass('active').next().show(); //Add "active" class to first trigger, then show/open the immediate next container

//On Click
$('.acc_trigger').click(function(){
	if( $(this).next().is(':hidden') ) { //If immediate next container is closed...
		$('.acc_trigger').removeClass('active').next().slideUp(); //Remove all .acc_trigger classes and slide up the immediate next container
		$(this).toggleClass('active').next().slideDown(); //Add .acc_trigger class to clicked trigger and slide down the immediate next container
	}
	return false; //Prevent the browser jump to the link anchor
});

//ACCORDION 
//Set default open/close settings
$('.acc_containers').hide(); //Hide/close all containers
$('.acc_triggers:first').addClass('active').next().show(); //Add "active" class to first trigger, then show/open the immediate next container

//On Click
$('.acc_triggers').click(function(){
	if( $(this).next().is(':hidden') ) { //If immediate next container is closed...
		$('.acc_triggers').removeClass('active').next().slideUp(); //Remove all .acc_trigger classes and slide up the immediate next container
		$(this).toggleClass('active').next().slideDown(); //Add .acc_trigger class to clicked trigger and slide down the immediate next container
	}
	return false; //Prevent the browser jump to the link anchor
});


});

/*========================================================================================
Qtip
======================================================================================== */

// Create the tooltips only on document load
$(document).ready(function() 
{
   // Match all link elements with href attributes within the content div
   $('.qt').qtip(
   {
   	  style: { 
      width: 100,
      padding: 2,
      background: '#333',
      color: 'white',
      textAlign: 'center',
	  border: {
         width: 3,
         radius: 1,
         color: '#111'
      },
      tip: 'bottomMiddle',
      name: 'dark' 
      },
      //content: 'Some basic content for the tooltip', // Give it some content, in this case a simple string
	  position: {
      corner: {
         target: 'topMiddle',
         tooltip: 'bottomMiddle'
      },
   }

	  
   });
});

/*========================================================================================
POP UP
======================================================================================== */

function newWindow(a_str_windowURL, a_str_windowName, a_int_windowWidth, a_int_windowHeight, a_bool_scrollbars, a_bool_resizable, a_bool_menubar, a_bool_toolbar, a_bool_addressbar, a_bool_statusbar, a_bool_fullscreen) {
  var int_windowLeft = (screen.width - a_int_windowWidth) / 2;
  var int_windowTop = (screen.height - a_int_windowHeight) / 2;
  var str_windowProperties = 'height=' + a_int_windowHeight + ',width=' + a_int_windowWidth + ',top=' + int_windowTop + ',left=' + int_windowLeft + ',scrollbars=' + a_bool_scrollbars + ',resizable=' + a_bool_resizable + ',menubar=' + a_bool_menubar + ',toolbar=' + a_bool_toolbar + ',location=' + a_bool_addressbar + ',statusbar=' + a_bool_statusbar + ',fullscreen=' + a_bool_fullscreen + '';
  var obj_window = window.open(a_str_windowURL, a_str_windowName, str_windowProperties)
    if (parseInt(navigator.appVersion) >= 4) {
      obj_window.window.focus();
    }
}
/*========================================================================================
COLORBOX
======================================================================================== */
$(document).ready(function(){
	//Examples of how to assign the ColorBox event to elements
	$("a[rel='ex']").colorbox();
	$("a[rel='cd']").colorbox();
	$("a[rel='book']").colorbox();
	//$("a[rel='example2']").colorbox({transition:"fade"});
//			$("a[rel='example3']").colorbox({transition:"none", width:"75%", height:"75%"});
//			$("a[rel='example4']").colorbox({slideshow:true});
	
});
