var General = {};
General.tools = {
	searched: false,	
	collection: Array(),	
	prepareGet: function(){
		var vars = window.location.search.substring( 1 ).split( '&' );
		for( i = 0; i < vars.length; i++ ){
			var tmp = vars[i].split( '=' );
			this.collection[tmp[0]] = tmp[1] || true;
		}
		return true;
	},
	get: function( str ){
		this.searched = this.searched || this.prepareGet();
		return this.collection[str];
	},
	basename: function(){
		var vars = window.location.pathname.split( '/' );
		return vars[vars.length-1] || vars[vars.length-2];
	},
	hash: function(){
		var vars = window.location.hash.substring( 1 ).split( '/' );
		return vars[vars.length-1] || vars[vars.length-2];
	},
	embedFlash: function( filename, container, width, height, version, vars ){
		return swfobject.embedSWF( filename, container, width, height, (version||'9.0.0'), 'flash/expressinstall.swf', (vars||{}), {menu:false, wmode:'opaque', allowFullScreen:true} );
	},	
	hasFlash: function( version ){
		return swfobject.hasFlashPlayerVersion( version||'9.0.0' );	
	},
	reqDoc: function( id ){
        $( '.background' ).show();
        $( '.lightbox' ).show();
        $( '.request-form' ).show();
        $( '.filelist option' ).each(function(i, selected){
            $(this).attr('selected', $(this).val() == id);
        });
        return false;
    }
}
General.prescript = {
    init: function() {
        
    }
}
General.prescript.init();