js/KBmodal.js
/* 
		// Variables accessible outside KBmodal object

		KBmodal_name - name of opened KBmodal object
		KBcurrent_item - array index of clicked gallery element (only set if clicked element is type of gallery)
	
	*/
Variables accessible outside KBmodal object
KBmodal_name - name of opened KBmodal object
KBcurrent_item - array index of clicked gallery element (only set if clicked element is type of gallery)
Variables accessible outside KBmodal object KBmodal_name - name of opened KBmodal object KBcurrent_item - array index of clicked gallery element ( only set if clicked element is type of gallery )
function generateKBmodal(url, type, gallery, name){
		var modalID = Math.floor((Math.random() * 100) + 1);
		if (typeof name != 'undefined') {
	    	var modalName = name;
		}else{
			var modalName = "KBmodal"+modalID;
		}
		window[modalName] = new KBmodal(url, type, modalName, gallery);
		window[modalName].openModal();
	}
function generateKBmodal ( url , type , gallery , name ) { var modalID = Math . floor ( ( Math . random ( ) * 100 ) + 1 ) ; if ( typeof name != 'undefined' ) { var modalName = name ; } else { var modalName = "KBmodal" + modalID ; } window [ modalName ] = new KBmodal ( url , type , modalName , gallery ) ; window [ modalName ] . openModal ( ) ; }
Variables accessible outside KBmodal object
KBmodal_name - name of opened KBmodal object
KBcurrent_item - array index of clicked gallery element (only set if clicked element is type of gallery)
Variables accessible outside KBmodal object KBmodal_name - name of opened KBmodal object KBcurrent_item - array index of clicked gallery element ( only set if clicked element is type of gallery )