if( !General ) var General = {};

General.tools = {
	embedFlash: function( filename, container, width, height, transparent, vars, version ){
		return swfobject.embedSWF( filename, container, width, height, ( version||'9.0.0' ), 'flash/expressinstall.swf', ( vars||{} ) , {wmode:( transparent ? 'transparent': 'opaque' ), menu:false, allowFullScreen:true} );
	},	
	hasFlashVersion: function( version ){
		return swfobject.hasFlashPlayerVersion( version||'9.0.0' );	
	}
}
General.subscript = {
	init: function(){
		this.preparePng();
		this.prepareFlash();
		this.prepareLogin();
	},
	preparePng: function(){
		if( typeof( ddpngfix ) !== 'undefined' ){
			$( 'img[src$=.png]:not(.opaque), #footer' ).each( function(){
				ddpngfix.fixPng( this );					
			} );			
		}
	},
	prepareFlash: function(){
		//General.tools.embedFlash( '/flash/filename.swf', 'main-container', '100%', '100%' );
	},
	prepareLogin: function(){
		$( '#login-user input' ).focus( function(){
			if( $( this ).val() == this.defaultValue ){
				$( this ).val( '' );
			}
		 } ).blur( function(){
			if( $( this ).val() == '' ){
				$( this ).val( this.defaultValue );
			}													 
		 } );
	}
}
$( 'document' ).ready( function(){
	General.subscript.init();
} );

