/**
 * @author André Babinsky
 */

/* onLoad Handler */

$(document).ready(function() {
	$('.background-color--elPopup').click( function(){
		 openWindowC( $(this).attr('href') );
		 return false;
	} );
	
	if(typeof window.openWindowC != 'function') {
		openWindowC = function (ak) {
			features = new Array('toolbar=no', 'location=no', 'directories=no', 'status=no', 'menubar=no',
				'scrollbars=no', 'resizable=no');
			urlParts = ak.split('?');
			if (urlParts.length > 1 && urlParts[1] != null) {
				params = urlParts[1].replace(',&amp;', '&').split('&');
				for (var i = 0; i < params.length; i++) {
    				if (params[i].indexOf('elPHeight') == 0) {
    					features.push(params[i].replace('elPHeight', 'height'));
    				}
    				if (params[i].indexOf('elPWidth') == 0) {
    					features.push(params[i].replace('elPWidth', 'width'));
    				}
    			}
			}
			dlg = window.open (ak,"Dialog",features.join(', '));
			return false;
		}
	}
	

});


