/*
 * nyroModal startup script
 *
 * Copyright (c) 2008 Eric Martin - http://ericmmartin.com
 *
 * Licensed under the MIT license:
 *   http://www.opensource.org/licenses/mit-license.php
 *
 * Revision: $Id: contact.js 132 2008-05-23 16:05:17Z emartin24 $
 *
 */

jQuery(document).ready(function()
{
	jQuery.nyroModalSettings(
	{
		debug:		false,
		bgColor:	'#000'
	});

	bindMapModal();
	bindBasicModal();
	bindShopModal();
	bindInfoModal();
	//bindAuthModal();
	bindSpecieModal();
	
});

function bindBasicModal()
{	
	jQuery("a[rel='basicModal']").click(function(e)
	{				
		jQuery.nyroModalManual(
		{
			minWidth:		'400',
			minHeight:		'50',
			modal:			false,
			url:			jQuery(this).attr('ajax'),
			openSelector:	'.basicModal',
			endShowContent:	bindBasicModal
		});
		e.preventDefault();
	});	
};

function bindMapModal()
{	
	jQuery("a[rel='mapModal']").click(function(e)
	{				
		jQuery.nyroModalManual(
		{
			width:			'820',
			height:			'520',
			modal:			false,
			url:			jQuery(this).attr('ajax'),
			endShowContent:	bindMapModal
		});
		e.preventDefault();
	});	
};

function bindInfoModal()
{	
	jQuery("a[rel='infoModal']").click(function(e)
	{				
		jQuery.nyroModalManual(
		{
			width:			'780',
			height:			'640',
			modal:			false,
			url:			jQuery(this).attr('ajax'),
			endShowContent:	bindInfoModal
		});
		e.preventDefault();
	});	
};

function bindAuthModal()
{	
	jQuery("a[rel='authModal']").click(function(e)
	{				
		jQuery.nyroModalManual(
		{
			minWidth:		'400',
			height:			null,
			minHeight: 		'100',
			modal:			true,
			url:			jQuery(this).attr('ajax'),
			openSelector:	'.authModal',
			endShowContent:	bindAuthModal
			//endFillContent:	init,
		});
		e.preventDefault();
	});	
};

function bindShopModal()
{	
	jQuery("a[rel='shopModal']").click(function(e)
	{				
		jQuery.nyroModalManual(
		{
			minWidth: 		'400',
			minHeight: 		'300',
			modal:			false,			
			url:			jQuery(this).attr('ajax'),
			endShowContent:	bindShopModal
		});
		e.preventDefault();
	});	
};		

function bindSpecieModal()
{	
	jQuery("a[rel='specieModal']").click(function(e)
	{				
		jQuery.nyroModalManual(
		{
			width: 			'800',
			height: 		'550',
			modal:			false,
			url:			jQuery(this).attr('ajax'),
			endShowContent:	bindSpecieModal 
		});
		e.preventDefault();
	});	
};