var clsMain = new Main();

function Main()
{
	var clsMethod = new Method();

	if (typeof Sub == 'function') {
		var clsSub = new Sub();
	}

	$('.blank').click(clsMethod.blank);
	$('#back').click(clsMethod.back);
	$('#close').click(clsMethod.close);
	$('a.open').click(clsMethod.open);
	$().piroBox({
		  my_speed: 200, //animation speed
		  bg_alpha: 0.3, //background opacity
		  radius: 4, //caption rounded corner
		  scrollImage : true, // true == image follows the page _|_ false == image remains in the same open position
							   // in some cases of very large images or long description could be useful.
		  slideShow : 'true', // true == slideshow on, false == slideshow off
		  slideSpeed : 10, //slideshow 
		  pirobox_next : 'piro_next', // Nav buttons -> piro_next == inside piroBox , piro_next_out == outside piroBox
		  pirobox_prev : 'piro_prev', // Nav buttons -> piro_prev == inside piroBox , piro_prev_out == outside piroBox
		  close_all : '.piro_close' // add class .piro_overlay(with comma)if you want overlay click close piroBox
	});
}

function Method()
{
	this.back = function()
	{
		history.back();
		return false;
	};

	this.blank = function()
	{
		window.open(this.href);
		return false;
	};

	this.close = function()
	{
		window.close();
		return false;
	};

	this.open = function()
	{
		window.open(this.href, '_blank', 'scrollbars=yes,width=640,height=500');
		return false;
	};

}

