// JavaScript Document

/* Add Blank Window Icon */
$(function() {
    $("a[target=_blank]").addClass("blank");
});
/* HR tag Replace*/
$(function() {
	$("hr").wrap("<div class='hr'></div>");
});
/* Form Back Button*/
function fnPageBack() {
  var frm = document.forms[0];
  frm.action = "./index.php";
  frm.submit();
}
/* BG Switcher */
$(function() {
	$('body').bgSwitcher({
		bgImages : ['../common/img/bg.jpg'],
		fadeOut  : false,
		sequence : true,
		seqFirst : 1,
		seqLast  : 7,
		startNum : 1
	});
});

/* Index News Headline */
$(function() {
		$('#news-headline').innerfade({
			animationtype: 'slide',
			speed: 750,
			timeout: 5000,
			type: 'random',
			containerheight: '30px'
		});
		$('#main-vis').innerfade({
			speed: 750,
			timeout: 7500,
			type: 'sequence',
			containerheight: '385px'
		});
/*
		$('.fade').innerfade({
			speed: 'slow',
			timeout: 1000,
			type: 'sequence',
			containerheight: '1.5em'
		});
*/
});

/* LightBox*/
$(function() {
	// Use this example, or...
	$('a[rel*=lightbox]').lightBox(); // Select all links that contains lightbox in the attribute rel
	// This, or...
//	$('#gallery a').lightBox(); // Select all links in object with gallery ID
	// This, or...
//	$('a.lightbox').lightBox(); // Select all links with lightbox class
	// This, or...
//	$('a').lightBox(); // Select all links in the page
	// ... The possibility are many. Use your creative or choose one in the examples above
});