	$(document).ready(function() {




	// Email Link
		$('a.jquery_email_link').each(function(i) {
			var subject = $(this).text();
			var domain = $(this).attr("href");
			var address = $(this).attr("title");
			$(this).attr('href', 'mailto:' + address + "@" + domain + "?subject=" + subject);
			$(this).text(address + "@" + domain);
			// OR $(this).text("Email Me");
		});


	// Print Link
		$('.jquery_print_me').click(function() {
			window.print();
			return false;
		});


		


// JQUERY =================================

	$("#accordion").accordion({ header: "h3" });		
	$('#tabs').tabs();

	$("#ajax_tabs").tabs({
			ajaxOptions: {
			error: function(xhr, status, index, anchor) {
				$(anchor.hash).html("<em>Sorry there has been an error in loading the content</em>");
			}
		}
	});


	$("#button").button();
	$("#radioset").buttonset();
	$(".jquery_button").button();
	$(".jquery_button_prev").button({
            icons: {
                primary: 'ui-icon-circle-arrow-w'
            },
            text: false
        });
	$(".jquery_button_next").button({
            icons: {
                primary: 'ui-icon-circle-arrow-e'
            },
            text: false
        });



// EXTERNAL =================================
	$('#external_links a').filter(function() {
			return this.hostname && this.hostname !== location.hostname;
		}).after(' <img src="inc/js/images/external.png" alt="external link"/>');

// EQUAL =================================
	$(".pod_equal_box div").equalHeights();


// FANCYBOX =================================
	$("a.jq_fancy").fancybox({
		'titleShow'     : false
	});

	$("a.jq_fancy_gal").fancybox({
		'titleShow'     : false,
		'transitionIn'	: 'elastic',
		'transitionOut'	: 'elastic'
	});
	$("a.jq_fancy_gal_desc").fancybox({
		'titlePosition'  : 'inside',
		'transitionIn'	: 'elastic',
		'transitionOut'	: 'elastic'
	});

	$("a.jq_fancy_zoom").fancybox({
		'titleShow'     : false,
		'transitionIn'	: 'none',
		'transitionOut'	: 'none'
	});

	$(".jq_fancy_ajax").fancybox({

	});

	$("a.jq_fancy_inline").fancybox({
		'titleShow'     : false,
		'width'		:	800,
		'height'		:	500
	});

	$(".jq_fancy_iframe").fancybox({
		'width'				: '90%',
		'height'			: '90%',
		'autoScale'     	: false,
		'transitionIn'		: 'none',
		'transitionOut'		: 'none',
		'type'				: 'iframe'
	});


// SLIDERS =================================
	$(".jq_trigger_container").hide(); 

	$("div.jq_trigger").toggle(function() { //Switch the "Open" and "Close" state per click
		$(this).addClass("jq_trigger_active");
		}, function () {
		$(this).removeClass("jq_trigger_active");
	});

	$("div.jq_trigger").click(function() {	//Slide up and down on click
		$(this).next(".jq_trigger_container").slideToggle();
	});

// FEEDBACK STRIP  =================================
	$(".jq_feedback_error .jq_feedback_img").click(function(){
		  $(this).parents(".jq_feedback_error").animate({ opacity: "hide" }, "slow");
	});
	$(".jq_feedback_ok .jq_feedback_img").click(function(){
		  $(this).parents(".jq_feedback_ok").animate({ opacity: "hide" }, "slow");
	});
	$(".jq_feedback_info .jq_feedback_img").click(function(){
		  $(this).parents(".jq_feedback_info").animate({ opacity: "hide" }, "slow");
	});
	$(".jq_feedback_message .jq_feedback_img").click(function(){
		  $(this).parents(".jq_feedback_message").animate({ opacity: "hide" }, "slow");
	});
	$(".jq_feedback_content .jq_feedback_img").click(function(){
		  $(this).parents(".jq_feedback_content").animate({ opacity: "hide" }, "slow");
	});
   setTimeout(function(){
		$("div.jq_feedback_action").fadeOut("slow", function () {
		$("div.jq_feedback_action").remove();
      });
	 }, 2000);

/* SHOW HIDE PODS */
	$("div.jq_showhide_element_plain").hide(); 
	 $(".jq_showhide_close_plain").hide(); 

	    $(".jq_showhide_plain").click(function () {
      $("div.jq_showhide_element_plain").toggle("blind");
	  $(".jq_showhide_plain").hide(); 
	  $(".jq_showhide_close_plain").show(); 
	 
    });

	  $(".jq_showhide_close_plain").click(function () {
      $("div.jq_showhide_element_plain").toggle("blind");
	  $(".jq_showhide_plain").show();
	   $(".jq_showhide_close_plain").hide(); 
    });

	$("div.jq_showhide_element_1").hide(); 
	$("div.jq_showhide_element_2").hide();
	$("div.jq_showhide_element_3").hide(); 
	$("div.jq_showhide_element_4").hide(); 
	$("div.jq_showhide_element_5").hide();
	$("div.jq_showhide_element_6").hide();
    $(".jq_showhide_1").click(function () {
      $("div.jq_showhide_element_1").toggle("slow");
    });
	 $(".jq_showhide_2").click(function () {
      $("div.jq_showhide_element_2").toggle("slow");
    });
	 $(".jq_showhide_3").click(function () {
      $("div.jq_showhide_element_3").toggle("slow");
    });
	 $(".jq_showhide_4").click(function () {
      $("div.jq_showhide_element_4").toggle("slow");
    });
	 $(".jq_showhide_5").click(function () {
      $("div.jq_showhide_element_5").toggle("slow");
    });
	 $(".jq_showhide_6").click(function () {
      $("div.jq_showhide_element_6").toggle("slow");
    });

 $('.slideshow').cycle({
		fx: 'fade' // choose your transition type, ex: fade, scrollUp, shuffle, etc...
	});


// =================================
	}); // END OF document ready

